Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index d15908211b4b57fcda2a9368ec2579faf56e2dfc..9d849bb4146e69551d11e1a0f9ec82f151d114ea 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -925,13 +925,13 @@ bool Document::importContainerNodeChildren(ContainerNode* oldContainerNode, Pass |
return true; |
} |
-PassRefPtr<Node> Document::importNode(Node* importedNode, ExceptionState& ec) |
+PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, ExceptionState& ec) |
{ |
UseCounter::countDeprecation(this, UseCounter::DocumentImportNodeOptionalArgument); |
return importNode(importedNode, true, ec); |
} |
-PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionState& exceptionState) |
+PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionState& exceptionState) |
{ |
if (!importedNode) { |
exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
@@ -5745,6 +5745,14 @@ void Document::clearWeakMembers(Visitor* visitor) |
for (unsigned i = 0; i < deadNodes.size(); ++i) |
didClearTouchEventHandlers(deadNodes[i]); |
} |
+ if (m_domWindow && !visitor->isAlive(m_domWindow)) { |
+ ASSERT(isDisposed()); |
Mads Ager (chromium)
2014/05/26 06:15:20
This seems fishy to me. If the Document is dead an
|
+ // Oilpan: this mirrors the clearing of the document object's touch |
+ // handlers that happen when the DOMWindow is destructed in a non-Oilpan |
+ // setting (done via DOMWindow::removeAllEventListeners().) |
+ didClearTouchEventHandlers(this); |
+ m_domWindow.clear(); |
+ } |
} |
void Document::trace(Visitor* visitor) |