mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +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
|
@ -1209,10 +1209,13 @@ void TerminalWidget::drop_event(GUI::DropEvent& event)
|
|||
if (!first)
|
||||
send_non_user_input(" "sv.bytes());
|
||||
|
||||
if (url.scheme() == "file")
|
||||
send_non_user_input(url.serialize_path().bytes());
|
||||
else
|
||||
send_non_user_input(url.to_byte_string().bytes());
|
||||
if (url.scheme() == "file") {
|
||||
auto path = url.serialize_path();
|
||||
send_non_user_input(path.bytes());
|
||||
} else {
|
||||
auto url_string = url.to_byte_string();
|
||||
send_non_user_input(url_string.bytes());
|
||||
}
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue