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

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

Issue 2700293002: DevTools: do not use RAII for sync native breakpoints, reuse AsyncTask where possible. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 10 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
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 <memory> 7 #include <memory>
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 ConsoleMessage::create( 380 ConsoleMessage::create(
381 JSMessageSource, WarningMessageLevel, 381 JSMessageSource, WarningMessageLevel,
382 "Scripts may close only the windows that were opened by it.")); 382 "Scripts may close only the windows that were opened by it."));
383 } 383 }
384 return; 384 return;
385 } 385 }
386 386
387 if (!frame()->shouldClose()) 387 if (!frame()->shouldClose())
388 return; 388 return;
389 389
390 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 390 InspectorInstrumentation::breakIfNeeded(context, "DOMWindow.close");
391 context, "DOMWindow.close", true);
392 391
393 page->closeSoon(); 392 page->closeSoon();
394 393
395 // So as to make window.closed return the expected result 394 // So as to make window.closed return the expected result
396 // after window.close(), separately record the to-be-closed 395 // after window.close(), separately record the to-be-closed
397 // state of this window. Scripts may access window.closed 396 // state of this window. Scripts may access window.closed
398 // before the deferred close operation has gone ahead. 397 // before the deferred close operation has gone ahead.
399 m_windowIsClosing = true; 398 m_windowIsClosing = true;
400 } 399 }
401 400
(...skipping 30 matching lines...) Expand all
432 } 431 }
433 432
434 DEFINE_TRACE(DOMWindow) { 433 DEFINE_TRACE(DOMWindow) {
435 visitor->trace(m_frame); 434 visitor->trace(m_frame);
436 visitor->trace(m_inputCapabilities); 435 visitor->trace(m_inputCapabilities);
437 visitor->trace(m_location); 436 visitor->trace(m_location);
438 EventTargetWithInlineData::trace(visitor); 437 EventTargetWithInlineData::trace(visitor);
439 } 438 }
440 439
441 } // namespace blink 440 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698