Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 4fa8b8b9c967ac96e518ae08f00915e822a667e9..0dad7073402860febc75e698ceb6fe87a146a749 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -135,6 +135,14 @@ Range::~Range() |
} |
#endif |
+void Range::dispose() |
+{ |
+#if ENABLE(OILPAN) |
+ // A prompt detach from the owning Document helps avoid GC overhead. |
+ m_ownerDocument->detachRange(this); |
+#endif |
+} |
+ |
void Range::setDocument(Document& document) |
{ |
ASSERT(m_ownerDocument != document); |