| Index: third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp b/third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp
|
| index fef480ff8b701718e658ff44702fae26b1b6da03..07dc96440cc2dff41f658d8c0edd9930f8a52f54 100644
|
| --- a/third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp
|
| @@ -26,31 +26,17 @@
|
|
|
| #include "core/frame/DOMWindowProperty.h"
|
|
|
| -#include "core/frame/LocalDOMWindow.h"
|
| +#include "core/dom/Document.h"
|
| #include "core/frame/LocalFrame.h"
|
|
|
| namespace blink {
|
|
|
| -DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) : m_frame(frame) {
|
| - // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created
|
| - // with a null frame. See fast/dom/navigator-detached-no-crash.html for the
|
| - // recipe. We should fix that. <rdar://problem/11567132>
|
| - if (m_frame) {
|
| - // FIXME: Need to figure out what to do with DOMWindowProperties on
|
| - // remote DOM windows.
|
| - m_frame->domWindow()->registerProperty(this);
|
| - }
|
| -}
|
| -
|
| -void DOMWindowProperty::frameDestroyed() {
|
| - // If the property is getting this callback it must have been
|
| - // created with a LocalFrame and it should still have it.
|
| - ASSERT(m_frame);
|
| - m_frame = nullptr;
|
| -}
|
| +DOMWindowProperty::DOMWindowProperty(LocalFrame* frame)
|
| + : ContextLifecycleObserver(frame ? frame->document() : nullptr) {}
|
|
|
| -DEFINE_TRACE(DOMWindowProperty) {
|
| - visitor->trace(m_frame);
|
| +LocalFrame* DOMWindowProperty::frame() const {
|
| + return getExecutionContext() ? toDocument(getExecutionContext())->frame()
|
| + : nullptr;
|
| }
|
|
|
| } // namespace blink
|
|
|