Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2362173002: Clear Document::m_frame after dispatching ContextLifecycleObesrver::contextDestroyed (Closed)
Patch Set: temp Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 4423b5be5a22df588b91743fcbe9156dd041266d..9c107592c0d797f84dfe57c01071d5e9ee4248ec 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2270,13 +2270,6 @@ void Document::shutdown()
m_timers.setTimerTaskRunner(
Platform::current()->currentThread()->scheduler()->timerTaskRunner()->clone());
- // This is required, as our LocalFrame might delete itself as soon as it detaches
- // us. However, this violates Node::detachLayoutTree() semantics, as it's never
- // possible to re-attach. Eventually Document::detachLayoutTree() should be renamed,
- // or this setting of the frame to 0 could be made explicit in each of the
- // callers of Document::detachLayoutTree().
- m_frame = nullptr;
-
if (m_mediaQueryMatcher)
m_mediaQueryMatcher->documentDetached();
@@ -2289,6 +2282,13 @@ void Document::shutdown()
// a contextDestroyed() notification. This can happen for a document
// created by DOMImplementation::createDocument().
ExecutionContext::notifyContextDestroyed();
+
+ // This is required, as our LocalFrame might delete itself as soon as it detaches
+ // us. However, this violates Node::detachLayoutTree() semantics, as it's never
+ // possible to re-attach. Eventually Document::detachLayoutTree() should be renamed,
+ // or this setting of the frame to 0 could be made explicit in each of the
+ // callers of Document::detachLayoutTree().
+ m_frame = nullptr;
}
void Document::removeAllEventListeners()
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698