Chromium Code Reviews| Index: Source/core/frame/DOMWindowProperty.cpp |
| diff --git a/Source/core/frame/DOMWindowProperty.cpp b/Source/core/frame/DOMWindowProperty.cpp |
| index 20b458d6718938b85f05eb6c9823ef8d36b2469b..cf552ca71cbbf5fd111ec45fa1b3ca926647c0fc 100644 |
| --- a/Source/core/frame/DOMWindowProperty.cpp |
| +++ b/Source/core/frame/DOMWindowProperty.cpp |
| @@ -27,12 +27,13 @@ |
| #include "config.h" |
| #include "core/frame/DOMWindowProperty.h" |
| -#include "core/frame/LocalDOMWindow.h" |
| +#include "core/frame/DOMWindow.h" |
| +#include "core/frame/Frame.h" |
| #include "core/frame/LocalFrame.h" |
| namespace blink { |
| -DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) |
| +DOMWindowProperty::DOMWindowProperty(Frame* frame) |
| : m_frame(frame) |
| #if !ENABLE(OILPAN) |
| , m_associatedDOMWindow(nullptr) |
| @@ -45,9 +46,9 @@ DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) |
| // FIXME: Need to figure out what to do with DOMWindowProperties on |
| // remote DOM windows. |
| #if ENABLE(OILPAN) |
| - m_frame->localDOMWindow()->registerProperty(this); |
| + m_frame->domWindow()->registerProperty(this); |
| #else |
| - m_associatedDOMWindow = m_frame->localDOMWindow(); |
| + m_associatedDOMWindow = m_frame->domWindow(); |
| m_associatedDOMWindow->registerProperty(this); |
| #endif |
| } |
| @@ -89,6 +90,13 @@ void DOMWindowProperty::willDetachGlobalObjectFromFrame() |
| #endif |
| } |
| +LocalFrame* DOMWindowProperty::localFrame() const |
| +{ |
| + if (m_frame && m_frame->isLocalFrame()) |
|
dcheng
2015/02/02 19:27:52
I think it's better to unconditionally toLocalFram
|
| + return toLocalFrame(m_frame); |
| + return nullptr; |
| +} |
| + |
| void DOMWindowProperty::trace(Visitor* visitor) |
| { |
| visitor->trace(m_frame); |