mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibWeb: Fix use-after-move in URLSearchParams::update
This was previously still valid since the `Optional<String>` move constructor copied its input, but since the move is now destructive, the code no longer works.
This commit is contained in:
parent
2457118024
commit
a733e2a31c
Notes:
github-actions[bot]
2024-10-31 22:27:17 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/a733e2a31c0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2032 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ void URLSearchParams::update()
|
|||
serialized_query = {};
|
||||
|
||||
// 4. Set query’s URL object’s URL’s query to serializedQuery.
|
||||
m_url->set_query({}, move(serialized_query));
|
||||
m_url->set_query({}, serialized_query);
|
||||
|
||||
// 5. If serializedQuery is null, then potentially strip trailing spaces from an opaque path with query’s URL object.
|
||||
if (!serialized_query.has_value())
|
||||
|
|
Loading…
Reference in a new issue