Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 901903002: [WIP]Issue FrameDestructionObserver::frameDestroyed() notification on detach. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Too strong; clear supplements map only Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698