| Index: Source/core/frame/DOMWindow.cpp
|
| diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
|
| index 10606a074f8f36bb6f5dd7b735ef1a6dfd0ad80a..838b3a5da005b4c83fa83496a2e0db377410dbf4 100644
|
| --- a/Source/core/frame/DOMWindow.cpp
|
| +++ b/Source/core/frame/DOMWindow.cpp
|
| @@ -6,13 +6,26 @@
|
| #include "core/frame/DOMWindow.h"
|
|
|
| #include "core/dom/SecurityContext.h"
|
| +#include "core/frame/DOMWindowProperty.h"
|
| #include "core/frame/Frame.h"
|
| #include "core/frame/FrameClient.h"
|
| +#include "core/frame/Location.h"
|
| #include "platform/weborigin/KURL.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
|
|
| namespace blink {
|
|
|
| +DOMWindow::~DOMWindow()
|
| +{
|
| +}
|
| +
|
| +Location* DOMWindow::location() const
|
| +{
|
| + if (!m_location)
|
| + m_location = Location::create(frame());
|
| + return m_location.get();
|
| +}
|
| +
|
| bool DOMWindow::closed() const
|
| {
|
| return !frame() || !frame()->host();
|
| @@ -92,4 +105,33 @@ bool DOMWindow::isInsecureScriptAccess(DOMWindow& callingWindow, const String& u
|
| return true;
|
| }
|
|
|
| +void DOMWindow::reset()
|
| +{
|
| + willDestroyDocumentInFrame();
|
| + m_properties.clear();
|
| + m_location = nullptr;
|
| +}
|
| +
|
| +void DOMWindow::registerProperty(DOMWindowProperty* property)
|
| +{
|
| + m_properties.add(property);
|
| +}
|
| +
|
| +void DOMWindow::unregisterProperty(DOMWindowProperty* property)
|
| +{
|
| + m_properties.remove(property);
|
| +}
|
| +
|
| +void DOMWindow::willDestroyDocumentInFrame()
|
| +{
|
| + for (const auto& domWindowProperty : m_properties)
|
| + domWindowProperty->willDestroyGlobalObjectInFrame();
|
| +}
|
| +
|
| +void DOMWindow::willDetachDocumentFromFrame()
|
| +{
|
| + for (const auto& domWindowProperty : m_properties)
|
| + domWindowProperty->willDetachGlobalObjectFromFrame();
|
| +}
|
| +
|
| } // namespace blink
|
|
|