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

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

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.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
index 393faea76c3a4d5293f46bec88833fe44eb5373a..21c25c5a2cde99824e0a56f02b08018373e69091 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
@@ -168,9 +168,17 @@ class WindowProxy : public GarbageCollectedFinalized<WindowProxy> {
Frame* frame() const { return m_frame.get(); }
ScriptState* getScriptState() const { return m_scriptState.get(); }
+#if DCHECK_IS_ON()
+ void didAttachGlobalProxy() { m_isGlobalProxyAttached = true; }
+ void didDetachGlobalProxy() { m_isGlobalProxyAttached = false; }
+#endif
+
private:
v8::Isolate* const m_isolate;
const Member<Frame> m_frame;
+#if DCHECK_IS_ON()
+ bool m_isGlobalProxyAttached = false;
+#endif
protected:
// TODO(dcheng): Move this to LocalWindowProxy once RemoteWindowProxy uses

Powered by Google App Engine
This is Rietveld 408576698