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

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: Take comments into consideration 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
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 445d1888d125c3798d7677b1f8c7e2b3ea0a4c14..afaead1921a380356e74cf2965522db934489038 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -293,10 +293,8 @@ Node::~Node()
RELEASE_ASSERT(!renderer());
- if (!isContainerNode()) {
- if (Document* document = documentInternal())
- willBeDeletedFrom(document);
- }
+ if (!isContainerNode())
+ willBeDeletedFromDocument();
if (m_previous)
m_previous->setNextSibling(0);
@@ -308,18 +306,19 @@ Node::~Node()
InspectorCounters::decrementCounter(InspectorCounters::NodeCounter);
}
-void Node::willBeDeletedFrom(Document* document)
+void Node::willBeDeletedFromDocument()
{
+ Document* document = documentInternal();
+ if (!document)
+ return;
+
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
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698