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 |