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

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

Issue 2744483002: Move asserts for tracking global object detachment to WindowProxy. (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
index d582360d44a27884e0f1d7ec3b5239a506f1e32d..4fc6b1c28a2aadef9ab8fdd8a8b3d2505fa3f9cb 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -80,10 +80,11 @@ v8::Local<v8::Object> WindowProxy::globalIfNotDetached() {
v8::Local<v8::Object> WindowProxy::releaseGlobal() {
DCHECK(m_lifecycle != Lifecycle::ContextInitialized);
+
// Make sure the global object was detached from the proxy by calling
// clearForNavigation().
- if (m_lifecycle == Lifecycle::ContextDetached)
- ASSERT(m_scriptState->isGlobalObjectDetached());
+ DLOG_IF(FATAL, m_isGlobalProxyAttached)
+ << "Context not detached by calling clearForNavigation()";
v8::Local<v8::Object> global = m_globalProxy.newLocal(m_isolate);
m_globalProxy.clear();

Powered by Google App Engine
This is Rietveld 408576698