mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibWeb: Don't use ByteBuffer::wrap() when loading about: URLs
Let's just copy an empty string here to make ourselves a ByteBuffer.
This commit is contained in:
parent
48d74c5356
commit
497f1fd472
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ void ResourceLoader::load(const LoadRequest& request, Function<void(const ByteBu
|
||||||
if (url.protocol() == "about") {
|
if (url.protocol() == "about") {
|
||||||
dbg() << "Loading about: URL " << url;
|
dbg() << "Loading about: URL " << url;
|
||||||
deferred_invoke([success_callback = move(success_callback)](auto&) {
|
deferred_invoke([success_callback = move(success_callback)](auto&) {
|
||||||
success_callback(ByteBuffer::wrap(const_cast<char*>(String::empty().characters()), 1), {});
|
success_callback(String::empty().to_byte_buffer(), {});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue