mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 14:15:08 +00:00
LibWeb: Fix "stack-use-after-return" in navigate_to_a_fragmement()
Callback running on the session history queue should capture necessary pointers by value instead of reference, because navigate_to_a_fragment stack will have been destroyed by the time it will be executed.
This commit is contained in:
parent
23569f8690
commit
15d265da65
1 changed files with 1 additions and 1 deletions
|
@ -1095,7 +1095,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_fragment(AK::URL const& url,
|
|||
auto traversable = traversable_navigable();
|
||||
|
||||
// 17. Append the following session history synchronous navigation steps involving navigable to traversable:
|
||||
traversable->append_session_history_traversal_steps([&] {
|
||||
traversable->append_session_history_traversal_steps([this, traversable, history_entry, entry_to_replace] {
|
||||
// 1. Finalize a same-document navigation given traversable, navigable, historyEntry, and entryToReplace.
|
||||
finalize_a_same_document_navigation(*traversable, *this, history_entry, entry_to_replace);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue