mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 04:37:22 +00:00
LibWeb: Make CustomElementDefinition relationship with GC more sane
1. Stop using GC::Root in member variables, since that usually creates a realm leak. 2. Stop putting OrderedHashMap<FlyString, GC::Ptr> on the stack while setting these up, since that won't protect the objects from GC.
This commit is contained in:
parent
062e33438e
commit
ceefe7d858
Notes:
github-actions[bot]
2024-12-27 09:03:54 +00:00
Author: https://github.com/awesomekling
Commit: ceefe7d858
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3049
5 changed files with 17 additions and 14 deletions
|
@ -2181,7 +2181,7 @@ JS::ThrowCompletionOr<void> Element::upgrade_element(GC::Ref<HTML::CustomElement
|
|||
}
|
||||
|
||||
// 6. Add element to the end of definition's construction stack.
|
||||
custom_element_definition->construction_stack().append(GC::make_root(this));
|
||||
custom_element_definition->construction_stack().append(GC::Ref { *this });
|
||||
|
||||
// 7. Let C be definition's constructor.
|
||||
auto& constructor = custom_element_definition->constructor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue