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.cpp

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
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 67cd0a2ec76b2e01bbe7cbe5f225357dcf226079..be23dce70fd6b9af82203428a4b079d112b357da 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -23,6 +23,11 @@
namespace blink {
+DOMWindow::DOMWindow()
+ : m_windowIsClosing(false)
+{
+}
+
DOMWindow::~DOMWindow()
{
}
@@ -36,7 +41,7 @@ Location* DOMWindow::location() const
bool DOMWindow::closed() const
{
- return !frame() || !frame()->host();
+ return m_windowIsClosing || !frame() || !frame()->host();
haraken 2015/04/05 15:06:36 Do we still need the '!frame() || !frame()->host()
sof 2015/04/05 15:09:42 Yes, windows.close() is just the programmatic way
}
unsigned DOMWindow::length() const
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698