OLD | NEW |
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 | 8 |
9 #include "bindings/core/v8/WindowProxyManager.h" | 9 #include "bindings/core/v8/WindowProxyManager.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "core/probe/CoreProbes.h" | 27 #include "core/probe/CoreProbes.h" |
28 #include "platform/weborigin/KURL.h" | 28 #include "platform/weborigin/KURL.h" |
29 #include "platform/weborigin/SecurityOrigin.h" | 29 #include "platform/weborigin/SecurityOrigin.h" |
30 #include "platform/weborigin/Suborigin.h" | 30 #include "platform/weborigin/Suborigin.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 DOMWindow::DOMWindow(Frame& frame) | 34 DOMWindow::DOMWindow(Frame& frame) |
35 : frame_(frame), | 35 : frame_(frame), |
36 window_proxy_manager_(frame.GetWindowProxyManager()), | 36 window_proxy_manager_(frame.GetWindowProxyManager()), |
| 37 location_(this, nullptr), |
37 window_is_closing_(false) {} | 38 window_is_closing_(false) {} |
38 | 39 |
39 DOMWindow::~DOMWindow() { | 40 DOMWindow::~DOMWindow() { |
40 // The frame must be disconnected before finalization. | 41 // The frame must be disconnected before finalization. |
41 DCHECK(!frame_); | 42 DCHECK(!frame_); |
42 | 43 |
43 // Because the wrapper object of a DOMWindow is the global proxy, which may | 44 // Because the wrapper object of a DOMWindow is the global proxy, which may |
44 // live much longer than the DOMWindow, we need to dissociate all wrappers | 45 // live much longer than the DOMWindow, we need to dissociate all wrappers |
45 // for this instance. | 46 // for this instance. |
46 DOMWrapperWorld::DissociateDOMWindowWrappersInAllWorlds(this); | 47 DOMWrapperWorld::DissociateDOMWindowWrappersInAllWorlds(this); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 459 } |
459 | 460 |
460 DEFINE_TRACE(DOMWindow) { | 461 DEFINE_TRACE(DOMWindow) { |
461 visitor->Trace(frame_); | 462 visitor->Trace(frame_); |
462 visitor->Trace(window_proxy_manager_); | 463 visitor->Trace(window_proxy_manager_); |
463 visitor->Trace(input_capabilities_); | 464 visitor->Trace(input_capabilities_); |
464 visitor->Trace(location_); | 465 visitor->Trace(location_); |
465 EventTargetWithInlineData::Trace(visitor); | 466 EventTargetWithInlineData::Trace(visitor); |
466 } | 467 } |
467 | 468 |
| 469 DEFINE_TRACE_WRAPPERS(DOMWindow) { |
| 470 visitor->TraceWrappers(location_); |
| 471 EventTargetWithInlineData::TraceWrappers(visitor); |
| 472 } |
| 473 |
468 } // namespace blink | 474 } // namespace blink |
OLD | NEW |