1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibProtocol: Remove use of ByteBuffer::wrap() in protocol API

This commit is contained in:
Andreas Kling 2020-12-19 13:09:02 +01:00
parent 77515fead2
commit 685d5f4e25
6 changed files with 10 additions and 10 deletions

View file

@ -46,11 +46,11 @@ void Download::did_finish(Badge<Client>, bool success, Optional<u32> status_code
if (!on_finish)
return;
ByteBuffer payload;
ReadonlyBytes payload;
RefPtr<SharedBuffer> shared_buffer;
if (success && shbuf_id != -1) {
shared_buffer = SharedBuffer::create_from_shbuf_id(shbuf_id);
payload = ByteBuffer::wrap(shared_buffer->data<void>(), total_size);
payload = { shared_buffer->data<void>(), total_size };
}
// FIXME: It's a bit silly that we copy the response headers here just so we can move them into a HashMap with different traits.