Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
index 455a2f3e40120b7d65947dcafbfb5b4292885d22..f6573e38431fe5c1f24825e2a4c473edb2563d4e 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
@@ -171,14 +171,12 @@ private: |
m_disposalAllowed = false; |
m_window->postMessageTimerFired(this); |
dispose(); |
+ // Oilpan optimization: unregister as an observer right away. |
+ clearContext(); |
} |
void dispose() |
{ |
- // Oilpan optimization: unregister as an observer right away. |
- clearContext(); |
- // Will destroy this object, now or after the next GC depending |
- // on whether Oilpan is disabled or not. |
m_window->removePostMessageTimer(this); |
} |