mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 06:38:22 +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
|
@ -101,7 +101,7 @@ ErrorOr<NonnullRefPtr<Node const>> Node::try_find_from_help_url(URL::URL const&
|
|||
child_node_found = false;
|
||||
auto children = TRY(current_node->children());
|
||||
for (auto const& child : children) {
|
||||
if (TRY(child->name()) == url.path_segment_at_index(i).view()) {
|
||||
if (auto path = url.path_segment_at_index(i); TRY(child->name()) == path.view()) {
|
||||
child_node_found = true;
|
||||
current_node = child;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue