| Index: Source/core/frame/LocalDOMWindow.cpp
|
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
|
| index 3908ad26b798a821da5d3ca7cab9a641f5efd118..78d3b125bb764cb912b44dd1b76e41d895d8009b 100644
|
| --- a/Source/core/frame/LocalDOMWindow.cpp
|
| +++ b/Source/core/frame/LocalDOMWindow.cpp
|
| @@ -144,6 +144,12 @@ void LocalDOMWindow::WindowFrameObserver::willDetachFrameHost()
|
| m_window->willDetachFrameHost();
|
| }
|
|
|
| +void LocalDOMWindow::WindowFrameObserver::frameDestroyed()
|
| +{
|
| + m_window->frameDestroyed();
|
| + FrameDestructionObserver::frameDestroyed();
|
| +}
|
| +
|
| class PostMessageTimer final : public NoBaseWillBeGarbageCollectedFinalized<PostMessageTimer>, public SuspendableTimer {
|
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PostMessageTimer);
|
| public:
|
| @@ -595,6 +601,12 @@ void LocalDOMWindow::willDetachFrameHost()
|
| LocalDOMWindow::notifyContextDestroyed();
|
| }
|
|
|
| +void LocalDOMWindow::frameDestroyed()
|
| +{
|
| + willDestroyDocumentInFrame();
|
| + m_properties.clear();
|
| +}
|
| +
|
| void LocalDOMWindow::willDestroyDocumentInFrame()
|
| {
|
| for (const auto& domWindowProperty : m_properties)
|
| @@ -619,8 +631,7 @@ void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property)
|
|
|
| void LocalDOMWindow::reset()
|
| {
|
| - willDestroyDocumentInFrame();
|
| - m_properties.clear();
|
| + frameDestroyed();
|
|
|
| m_screen = nullptr;
|
| m_history = nullptr;
|
|
|