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

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

Issue 908043002: Revert of Issue FrameDestructionObserver::frameDestroyed() notification on detach. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 ff583a6130909c5aaa981f80392cf7c201744f30..1647bbce07589501da31460c93a7b04279974b9c 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -144,12 +144,6 @@
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:
@@ -600,37 +594,32 @@
LocalDOMWindow::notifyContextDestroyed();
}
-void LocalDOMWindow::frameDestroyed()
+void LocalDOMWindow::willDestroyDocumentInFrame()
+{
+ for (const auto& domWindowProperty : m_properties)
+ domWindowProperty->willDestroyGlobalObjectInFrame();
+}
+
+void LocalDOMWindow::willDetachDocumentFromFrame()
+{
+ for (const auto& domWindowProperty : m_properties)
+ domWindowProperty->willDetachGlobalObjectFromFrame();
+}
+
+void LocalDOMWindow::registerProperty(DOMWindowProperty* property)
+{
+ m_properties.add(property);
+}
+
+void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property)
+{
+ m_properties.remove(property);
+}
+
+void LocalDOMWindow::reset()
{
willDestroyDocumentInFrame();
m_properties.clear();
-}
-
-void LocalDOMWindow::willDestroyDocumentInFrame()
-{
- for (const auto& domWindowProperty : m_properties)
- domWindowProperty->willDestroyGlobalObjectInFrame();
-}
-
-void LocalDOMWindow::willDetachDocumentFromFrame()
-{
- for (const auto& domWindowProperty : m_properties)
- domWindowProperty->willDetachGlobalObjectFromFrame();
-}
-
-void LocalDOMWindow::registerProperty(DOMWindowProperty* property)
-{
- m_properties.add(property);
-}
-
-void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property)
-{
- m_properties.remove(property);
-}
-
-void LocalDOMWindow::reset()
-{
- 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