[webkit-changes] [WebKit/WebKit] 4972d2: Avoid using GCReachableRef for custom elements rea...
Ryosuke Niwa
noreply at github.com
Thu Mar 7 22:21:58 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4972d2d69403a9edc08e1b14470453dab10c5955
https://github.com/WebKit/WebKit/commit/4972d2d69403a9edc08e1b14470453dab10c5955
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2024-03-07 (Thu, 07 Mar 2024)
Changed paths:
M Source/WebCore/bindings/js/JSNodeCustom.cpp
M Source/WebCore/dom/CustomElementReactionQueue.cpp
M Source/WebCore/dom/CustomElementReactionQueue.h
M Source/WebCore/dom/Node.h
Log Message:
-----------
Avoid using GCReachableRef for custom elements reaction queue
https://bugs.webkit.org/show_bug.cgi?id=270675
Reviewed by Yusuke Suzuki.
Add a new Node StateFlag to indicate that an element is in a custom element reaction queue,
and use this mechanism to keep JS wrapper alive instead of using GCReachableRef.
* Source/WebCore/bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
* Source/WebCore/dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementQueue::invokeAll):
(WebCore::CustomElementQueue::takeElements):
(WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue):
(WebCore::CustomElementReactionStack::takeElements):
* Source/WebCore/dom/CustomElementReactionQueue.h:
* Source/WebCore/dom/Node.h:
(WebCore::Node::isInCustomElementReactionQueue const):
(WebCore::Node::setIsInCustomElementReactionQueue):
(WebCore::Node::clearIsInCustomElementReactionQueue):
Canonical link: https://commits.webkit.org/275824@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list