Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 2fde12d12c9964267c012388d65e6ec000ca413d..0b4277c3be96e0c2a25dc71792fb3cf47fdc8481 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2248,6 +2248,12 @@ void Document::detach(const AttachContext& context) |
lifecycleNotifier().notifyDocumentWasDetached(); |
m_lifecycle.advanceTo(DocumentLifecycle::Stopped); |
#if ENABLE(OILPAN) |
+ // FIXME: Oilpan: With Oilpan dispose should not be needed. At |
+ // this point we still have dispose in order to clear out some |
+ // RefPtrs that would otherwise cause leaks. However, when the |
+ // Document is detached the document can still be alive, so we |
+ // really shouldn't clear anything at this point. It should just |
+ // die with the document when the document is no longer reachable. |
dispose(); |
#endif |
} |