mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +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
Notes:
sideshowbarker
2024-07-19 00:44:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/497f1fd472c
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") {
|
||||
dbg() << "Loading about: URL " << url;
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue