| 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 "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 22 matching lines...) Expand all Loading... |
| 33 #include <memory> | 33 #include <memory> |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 DOMWindow::DOMWindow() : m_windowIsClosing(false) {} | 37 DOMWindow::DOMWindow() : m_windowIsClosing(false) {} |
| 38 | 38 |
| 39 DOMWindow::~DOMWindow() {} | 39 DOMWindow::~DOMWindow() {} |
| 40 | 40 |
| 41 v8::Local<v8::Object> DOMWindow::wrap(v8::Isolate*, | 41 v8::Local<v8::Object> DOMWindow::wrap(v8::Isolate*, |
| 42 v8::Local<v8::Object> creationContext) { | 42 v8::Local<v8::Object> creationContext) { |
| 43 // DOMWindow must never be wrapped with wrap method. The wrappers must be | 43 LOG(FATAL) << "DOMWindow must never be wrapped with wrap method. The " |
| 44 // created at WindowProxy::createContext() and setupWindowPrototypeChain(). | 44 "wrappers must be created at WindowProxy::createContext() and " |
| 45 RELEASE_NOTREACHED(); | 45 "setupWindowPrototypeChain()."; |
| 46 return v8::Local<v8::Object>(); | 46 return v8::Local<v8::Object>(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 v8::Local<v8::Object> DOMWindow::associateWithWrapper( | 49 v8::Local<v8::Object> DOMWindow::associateWithWrapper( |
| 50 v8::Isolate*, | 50 v8::Isolate*, |
| 51 const WrapperTypeInfo*, | 51 const WrapperTypeInfo*, |
| 52 v8::Local<v8::Object> wrapper) { | 52 v8::Local<v8::Object> wrapper) { |
| 53 RELEASE_NOTREACHED(); // same as wrap method | 53 LOG(FATAL) << "DOMWindow must never be wrapped with wrap method. The " |
| 54 "wrappers must be created at WindowProxy::createContext() and " |
| 55 "setupWindowPrototypeChain()."; |
| 54 return v8::Local<v8::Object>(); | 56 return v8::Local<v8::Object>(); |
| 55 } | 57 } |
| 56 | 58 |
| 57 const AtomicString& DOMWindow::interfaceName() const { | 59 const AtomicString& DOMWindow::interfaceName() const { |
| 58 return EventTargetNames::DOMWindow; | 60 return EventTargetNames::DOMWindow; |
| 59 } | 61 } |
| 60 | 62 |
| 61 const DOMWindow* DOMWindow::toDOMWindow() const { | 63 const DOMWindow* DOMWindow::toDOMWindow() const { |
| 62 return this; | 64 return this; |
| 63 } | 65 } |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 430 |
| 429 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); | 431 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); |
| 430 } | 432 } |
| 431 | 433 |
| 432 DEFINE_TRACE(DOMWindow) { | 434 DEFINE_TRACE(DOMWindow) { |
| 433 visitor->trace(m_location); | 435 visitor->trace(m_location); |
| 434 EventTargetWithInlineData::trace(visitor); | 436 EventTargetWithInlineData::trace(visitor); |
| 435 } | 437 } |
| 436 | 438 |
| 437 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |