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

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

Issue 2388693002: Make DOMWindowProperty a thin wrapper of ContextLifecycleObserver
Patch Set: temp Created 4 years 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index f605ba9ceb92849aae9a6155c5973d2ca7f8e03e..b0e6a7957d850fcef18d0c048b3fc7938cc17c4f 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -473,24 +473,12 @@ MediaQueryList* LocalDOMWindow::matchMedia(const String& media) {
: nullptr;
}
-void LocalDOMWindow::frameDestroyed() {
- for (const auto& domWindowProperty : m_properties)
- domWindowProperty->frameDestroyed();
-
+void LocalDOMWindow::contextDestroyed() {
resetLocation();
- m_properties.clear();
removeAllEventListeners();
m_frame = nullptr;
}
-void LocalDOMWindow::registerProperty(DOMWindowProperty* property) {
- m_properties.add(property);
-}
-
-void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) {
- m_properties.remove(property);
-}
-
void LocalDOMWindow::registerEventListenerObserver(
EventListenerObserver* eventListenerObserver) {
m_eventListenerObservers.add(eventListenerObserver);
@@ -501,7 +489,7 @@ void LocalDOMWindow::reset() {
// Since |Document| class has multiple |LifecycleNotifier| as base class,
// we need to have |static_cast<ExecutionContext>| here.
static_cast<ExecutionContext*>(document())->notifyContextDestroyed();
- frameDestroyed();
+ contextDestroyed();
m_screen = nullptr;
m_history = nullptr;
@@ -1544,7 +1532,6 @@ DOMWindow* LocalDOMWindow::open(const String& urlString,
DEFINE_TRACE(LocalDOMWindow) {
visitor->trace(m_frame);
visitor->trace(m_document);
- visitor->trace(m_properties);
visitor->trace(m_screen);
visitor->trace(m_history);
visitor->trace(m_locationbar);
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698