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

Unified Diff: Source/core/frame/LocalDOMWindow.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
« Source/core/frame/DOMWindow.cpp ('K') | « Source/core/frame/DOMWindow.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 54881b1d527f87c67ca1461935e292a2decccbb5..5d40b65ab0da70d0e504d8517493cfba77f62851 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -817,6 +817,11 @@ void LocalDOMWindow::close(ExecutionContext* context)
InspectorInstrumentation::willCloseWindow(context);
page->chrome().closeWindowSoon();
+ // So as to make window.closed return the expected result
+ // after window.close(), separately record the to-be-closed
+ // state of this window. Scripts may access window.closed
+ // before the deferred close operation has gone ahead.
+ m_windowIsClosing = true;
}
void LocalDOMWindow::print()
« Source/core/frame/DOMWindow.cpp ('K') | « Source/core/frame/DOMWindow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698