mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 07:37:03 +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
|
@ -2635,7 +2635,7 @@ static void generate_html_constructor(SourceGenerator& generator, IDL::Construct
|
|||
return JS::throw_completion(WebIDL::InvalidStateError::create(realm, "Custom element has already been constructed"_string));
|
||||
|
||||
// 12. Perform ? element.[[SetPrototypeOf]](prototype).
|
||||
auto actual_element = element.get<GC::Root<DOM::Element>>();
|
||||
auto actual_element = element.get<GC::Ref<DOM::Element>>();
|
||||
TRY(actual_element->internal_set_prototype_of(&prototype.as_object()));
|
||||
|
||||
// 13. Replace the last entry in definition's construction stack with an already constructed marker.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue