mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 06:22:53 +00:00
Userland: Avoid some conversions from rvalue strings to StringView
These are all actually fine, there is no UAF here. But once e.g. `ByteString::view() &&` is deleted, these instances won't compile.
This commit is contained in:
parent
23b25333a5
commit
683c08744a
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/trflynn89
Commit: 683c08744a
Pull-request: https://github.com/SerenityOS/serenity/pull/23830
Reviewed-by: https://github.com/shannonbooth ✅
17 changed files with 48 additions and 26 deletions
|
@ -1337,7 +1337,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
|
|||
// 11. If httpRequest’s referrer is a URL, then:
|
||||
if (http_request->referrer().has<URL::URL>()) {
|
||||
// 1. Let referrerValue be httpRequest’s referrer, serialized and isomorphic encoded.
|
||||
auto referrer_value = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(http_request->referrer().get<URL::URL>().serialize().bytes()));
|
||||
auto referrer_string = http_request->referrer().get<URL::URL>().serialize();
|
||||
auto referrer_value = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(referrer_string.bytes()));
|
||||
|
||||
// 2. Append (`Referer`, referrerValue) to httpRequest’s header list.
|
||||
auto header = Infrastructure::Header {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue