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

Unified Diff: Source/core/frame/DOMWindow.h

Issue 1053073002: Improve window.closed fidelity. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 8 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: Source/core/frame/DOMWindow.h
diff --git a/Source/core/frame/DOMWindow.h b/Source/core/frame/DOMWindow.h
index ed347e7f4eff11b94ce837a3f23534109f634f3f..399cec0a49383c2a42a63d2e9c9e0546c48a4dd2 100644
--- a/Source/core/frame/DOMWindow.h
+++ b/Source/core/frame/DOMWindow.h
@@ -214,6 +214,16 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
+protected:
+ DOMWindow();
+
+ // Set to true when close() has been called. Needed for
+ // |window.closed| determinism; having it return 'true'
+ // only after the render widget's deferred window close
+ // operation has been performed, exposes (confusing)
+ // implementation details to scripts.
+ bool m_windowIsClosing;
+
private:
mutable RefPtrWillBeMember<Location> m_location;
};

Powered by Google App Engine
This is Rietveld 408576698