diff options
author | Andreas Kling <kling@serenityos.org> | 2022-09-03 15:24:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | 4901f69345907eb381b0b0cdaa41147a362c1db9 (patch) | |
tree | e13ee7bafaef8859ca538f7f060bf0d5b7314d9b /Userland/Libraries/LibWeb | |
parent | 233208b640cfc524aef862b88237c78bb05cb86c (diff) | |
download | serenity-4901f69345907eb381b0b0cdaa41147a362c1db9.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 432ad4d445..21ffb80ef7 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -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)) { |