[webkit-changes] [WebKit/WebKit] 12e1fe: Use CheckedPtr<Element> / CheckedRef<Element> less...
Chris Dumez
noreply at github.com
Tue Dec 12 12:54:41 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 12e1fe4f7f33197ac8b7093bf2b66a850090a74f
https://github.com/WebKit/WebKit/commit/12e1fe4f7f33197ac8b7093bf2b66a850090a74f
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-12-12 (Tue, 12 Dec 2023)
Changed paths:
M Source/WebCore/dom/Attr.h
M Source/WebCore/dom/DatasetDOMStringMap.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/NamedNodeMap.h
M Source/WebCore/dom/RadioButtonGroups.cpp
M Source/WebCore/dom/ScriptElement.h
M Source/WebCore/dom/ShadowRoot.cpp
M Source/WebCore/dom/ShadowRoot.h
M Source/WebCore/dom/SimulatedClick.cpp
M Source/WebCore/html/HTMLCollection.h
M Source/WebCore/html/HTMLCollectionInlines.h
Log Message:
-----------
Use CheckedPtr<Element> / CheckedRef<Element> less for non-stack variables
https://bugs.webkit.org/show_bug.cgi?id=266286
Reviewed by Ryosuke Niwa.
Use CheckedPtr<Element> / CheckedRef<Element> less for non-stack variables
since it introduces crashes that are not actionable.
Use WeakRef<Element> / WeakPtr<Element> instead.
This tested as performance neutral on Speedometer 2 & 3.
* Source/WebCore/dom/Attr.h:
* Source/WebCore/dom/DatasetDOMStringMap.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::findNearestCommonComposedAncestor):
(WebCore::Document::registerArticleElement):
(WebCore::Document::unregisterArticleElement):
(WebCore::Document::updateMainArticleElementAfterLayout):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::addShadowRoot):
* Source/WebCore/dom/NamedNodeMap.h:
* Source/WebCore/dom/RadioButtonGroups.cpp:
* Source/WebCore/dom/ScriptElement.h:
* Source/WebCore/dom/ShadowRoot.cpp:
* Source/WebCore/dom/ShadowRoot.h:
* Source/WebCore/dom/SimulatedClick.cpp:
(WebCore::simulateClick):
* Source/WebCore/html/HTMLCollection.h:
* Source/WebCore/html/HTMLCollectionInlines.h:
(WebCore::CollectionNamedElementCache::findElementsWithId const):
(WebCore::CollectionNamedElementCache::findElementsWithName const):
(WebCore::CollectionNamedElementCache::find const):
(WebCore::CollectionNamedElementCache::append):
Canonical link: https://commits.webkit.org/271949@main
More information about the webkit-changes
mailing list