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

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 2616513002: Make sure pages that are closing but not yet closed are still suspended. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FrameTree.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/DOMWindow.h" 5 #include "core/frame/DOMWindow.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
10 #include "core/dom/SecurityContext.h" 10 #include "core/dom/SecurityContext.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 390 }
391 return; 391 return;
392 } 392 }
393 393
394 if (!frame()->shouldClose()) 394 if (!frame()->shouldClose())
395 return; 395 return;
396 396
397 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(context, "close", 397 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(context, "close",
398 true); 398 true);
399 399
400 page->chromeClient().closeWindowSoon(); 400 page->closeSoon();
401 401
402 // So as to make window.closed return the expected result 402 // So as to make window.closed return the expected result
403 // after window.close(), separately record the to-be-closed 403 // after window.close(), separately record the to-be-closed
404 // state of this window. Scripts may access window.closed 404 // state of this window. Scripts may access window.closed
405 // before the deferred close operation has gone ahead. 405 // before the deferred close operation has gone ahead.
406 m_windowIsClosing = true; 406 m_windowIsClosing = true;
407 } 407 }
408 408
409 void DOMWindow::focus(ExecutionContext* context) { 409 void DOMWindow::focus(ExecutionContext* context) {
410 if (!frame()) 410 if (!frame())
(...skipping 20 matching lines...) Expand all
431 431
432 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); 432 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */);
433 } 433 }
434 434
435 DEFINE_TRACE(DOMWindow) { 435 DEFINE_TRACE(DOMWindow) {
436 visitor->trace(m_location); 436 visitor->trace(m_location);
437 EventTargetWithInlineData::trace(visitor); 437 EventTargetWithInlineData::trace(visitor);
438 } 438 }
439 439
440 } // namespace blink 440 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FrameTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698