[webkit-changes] [WebKit/WebKit] 76aef8: Convert Node::deletionHasBegun() to an ASSERT
geoffreygaren
noreply at github.com
Fri Jan 31 10:47:01 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 76aef8def17e15598dee6a4c4b34d1a13bd391e1
https://github.com/WebKit/WebKit/commit/76aef8def17e15598dee6a4c4b34d1a13bd391e1
Author: Geoffrey Garen <ggaren at apple.com>
Date: 2025-01-31 (Fri, 31 Jan 2025)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h
Log Message:
-----------
Convert Node::deletionHasBegun() to an ASSERT
https://bugs.webkit.org/show_bug.cgi?id=286762
rdar://143904585
Reviewed by David Kilzer.
Like RefCounted, Node maintains an overlooking ref() of 1 during destruction,
and RELEASE_ASSERTs that it doesn't exceed 1 after destruction.
This ensures that we can't re-enter our destructor, making the explicit check
for "deletionHasBegun()" redundant.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::removedLastRef):
* Source/WebCore/dom/Document.h:
(WebCore::Document::decrementReferencingNodeCount):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::removedLastRef):
* Source/WebCore/dom/Node.h:
(WebCore::Node::deletionHasBegun const):
(WebCore::Node::deref const):
Canonical link: https://commits.webkit.org/289617@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