diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-19 17:39:59 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-19 18:29:13 +0100 |
commit | 497f1fd472c58094f29002d864857a88fd128bc6 (patch) | |
tree | 2eda46e1e006a39020588de436eb90dcf5f1e62d /Libraries/LibWeb/Loader | |
parent | 48d74c53565f6bd87e70430ea5b0bc7e6dedb957 (diff) | |
download | serenity-497f1fd472c58094f29002d864857a88fd128bc6.zip |
LibWeb: Don't use ByteBuffer::wrap() when loading about: URLs
Let's just copy an empty string here to make ourselves a ByteBuffer.
Diffstat (limited to 'Libraries/LibWeb/Loader')
-rw-r--r-- | Libraries/LibWeb/Loader/ResourceLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Libraries/LibWeb/Loader/ResourceLoader.cpp index 53dbd60d7f..8e7f304426 100644 --- a/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -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; } |