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

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: 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
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..945729d06065160b41a171c14896ef76dddfd739 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 didAttachGlobalObject() { m_isGlobalObjectAttached = true; }
+ void didDetachGlobalObject() { m_isGlobalObjectAttached = false; }
+#endif
+
private:
v8::Isolate* const m_isolate;
const Member<Frame> m_frame;
+#if DCHECK_IS_ON()
+ bool m_isGlobalObjectAttached = false;
+#endif
protected:
// TODO(dcheng): Move this to LocalWindowProxy once RemoteWindowProxy uses
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698