mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Don't capture raw ptr in Document::completely_finish_loading()
It's not safe to capture a raw pointer in a HTML task, as the garbage collector doesn't have visibility into the task captures.
This commit is contained in:
parent
233208b640
commit
4901f69345
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4901f69345 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 1 deletions
|
@ -1399,7 +1399,7 @@ void Document::completely_finish_loading()
|
|||
// FIXME: 2. Set document's completely loaded time to the current time.
|
||||
|
||||
// 3. Let container be document's browsing context's container.
|
||||
auto* container = browsing_context()->container();
|
||||
auto container = JS::make_handle(browsing_context()->container());
|
||||
|
||||
// If container is an iframe element, then queue an element task on the DOM manipulation task source given container to run the iframe load event steps given container.
|
||||
if (container && is<HTML::HTMLIFrameElement>(*container)) {
|
||||
|
|
Loading…
Reference in a new issue