mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibWeb: Fix clicking on links
Since ff2f31b
LibWeb has segfaulted when clicking on links, as the
browsing context (a GCPtr) in the lambda was captured by reference
and was out of scope by the time the callback fired.
This commit is contained in:
parent
c2b20b5681
commit
862320828f
Notes:
sideshowbarker
2024-07-17 10:39:39 +09:00
Author: https://github.com/MacDue
Commit: 862320828f
Pull-request: https://github.com/SerenityOS/serenity/pull/16103
Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -534,7 +534,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
|
|||
// set to source.
|
||||
// FIXME: "navigate" means implementing the navigation algorithm here:
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate
|
||||
hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, &target] {
|
||||
hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, target]() mutable {
|
||||
target->loader().load(url_string, FrameLoader::Type::Navigation);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue