mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Move mutation observers from IntrusiveList to GC::RootVector
We need to prevent these mutation observers from being garbage collected, and since they are only part of SimilarOriginWindowAgent and themselves as part of the intrusive list, nobody is visiting them. Make the list of pending mutation observers a GC::RootVector so we keep them alive until they have been processed in the microtask. Restores 1400+ WPT subtest passes in `dom/nodes/Element-classlist.html`.
This commit is contained in:
parent
150828af98
commit
e281e3a274
Notes:
github-actions[bot]
2025-11-24 12:46:48 +00:00
Author: https://github.com/gmta
Commit: e281e3a274
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6917
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 6 additions and 19 deletions
|
|
@ -14,7 +14,7 @@ namespace Web::HTML {
|
|||
NonnullOwnPtr<SimilarOriginWindowAgent> SimilarOriginWindowAgent::create(GC::Heap& heap)
|
||||
{
|
||||
// See 'creating an agent' step in: https://html.spec.whatwg.org/multipage/webappapis.html#obtain-similar-origin-window-agent
|
||||
auto agent = adopt_own(*new SimilarOriginWindowAgent(CanBlock::No));
|
||||
auto agent = adopt_own(*new SimilarOriginWindowAgent(heap, CanBlock::No));
|
||||
agent->event_loop = heap.allocate<HTML::EventLoop>(HTML::EventLoop::Type::Window);
|
||||
return agent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue