Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: Source/core/dom/Node.cpp

Issue 26900006: Rename Node::willBeDeletedFrom() to willBeDeletedFromDocument() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 99c8197c9f1ec1137fd2a0c741d3a1e7862bab87..523d53a55654629dd8e766fea129ec2a74b76653 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -294,7 +294,7 @@ Node::~Node()
if (!isContainerNode()) {
if (Document* document = documentInternal())
- willBeDeletedFrom(document);
+ willBeDeletedFrom(*document);
}
if (m_previous)
@@ -307,18 +307,15 @@ Node::~Node()
InspectorCounters::decrementCounter(InspectorCounters::NodeCounter);
}
-void Node::willBeDeletedFrom(Document* document)
+void Node::willBeDeletedFrom(Document& document)
{
if (hasEventTargetData()) {
- if (document)
- document->didRemoveEventTargetNode(this);
+ document.didRemoveEventTargetNode(this);
clearEventTargetData();
}
- if (document) {
- if (AXObjectCache* cache = document->existingAXObjectCache())
- cache->remove(this);
- }
+ if (AXObjectCache* cache = document.existingAXObjectCache())
+ cache->remove(this);
}
NodeRareData* Node::rareData() const

Powered by Google App Engine
This is Rietveld 408576698