mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Make BrowsingContext GC-allocated
(And BrowsingContextGroup had to come along for the ride as well.) This solves a number of nasty reference cycles between browsing contexts, history items, and their documents.
This commit is contained in:
parent
2898701459
commit
83c5ff57d8
Notes:
sideshowbarker
2024-07-17 05:17:17 +09:00
Author: https://github.com/awesomekling
Commit: 83c5ff57d8
Pull-request: https://github.com/SerenityOS/serenity/pull/15672
15 changed files with 225 additions and 44 deletions
|
@ -83,7 +83,7 @@ void LabelablePaintable::handle_associated_label_mouseup(Badge<Layout::Label>)
|
|||
{
|
||||
// NOTE: Handling the click may run arbitrary JS, which could disappear this node.
|
||||
NonnullRefPtr protected_this = *this;
|
||||
NonnullRefPtr protected_browsing_context = browsing_context();
|
||||
JS::NonnullGCPtr protected_browsing_context { browsing_context() };
|
||||
|
||||
set_being_pressed(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue