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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp

Issue 2744483002: Move asserts for tracking global object detachment to WindowProxy. (Closed)
Patch Set: GlobalProxy -> GlobalObject Created 3 years, 9 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/bindings/core/v8/RemoteWindowProxy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
index efad7d6a828fab92d52b9714bba693e4a4a80078..47b58f7dd7629c8ca269082aa9d2e2c26d9e5b02 100644
--- a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
@@ -92,6 +92,10 @@ void LocalWindowProxy::disposeContext(GlobalDetachmentBehavior behavior) {
}
V8DOMWrapper::clearNativeInfo(isolate(), context->Global());
m_scriptState->detachGlobalObject();
+
+#if DCHECK_IS_ON()
+ didDetachGlobalObject();
+#endif
}
m_scriptState->disposePerContextData();
@@ -187,6 +191,10 @@ void LocalWindowProxy::createContext() {
}
CHECK(!context.IsEmpty());
+#if DCHECK_IS_ON()
+ didAttachGlobalObject();
+#endif
+
m_scriptState = ScriptState::create(context, m_world);
// TODO(haraken): Currently we cannot enable the following DCHECK because
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698