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

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

Issue 1017043002: Remove all event listeners during window's frame destruction step. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve LocalDOMWindow::dispose() comment a bit Created 5 years, 9 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/DOMWindowLifecycleObserver.h ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.h
diff --git a/Source/core/frame/LocalDOMWindow.h b/Source/core/frame/LocalDOMWindow.h
index 79a2e6d830e591a269a336e7a723dd3bfb615d70..a56785e9498611e5fd51068e297c18d46435b32d 100644
--- a/Source/core/frame/LocalDOMWindow.h
+++ b/Source/core/frame/LocalDOMWindow.h
@@ -63,6 +63,7 @@ enum PageshowEventPersistence {
// please ping dcheng@chromium.org first. You probably don't want to do that.
class LocalDOMWindow final : public DOMWindow, public WillBeHeapSupplementable<LocalDOMWindow>, public DOMWindowLifecycleNotifier {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow);
+ WILL_BE_USING_PRE_FINALIZER(LocalDOMWindow, dispose);
public:
static PassRefPtrWillBeRawPtr<Document> createDocument(const String& mimeType, const DocumentInit&, bool forceXHTML);
static PassRefPtrWillBeRawPtr<LocalDOMWindow> create(LocalFrame& frame)
@@ -70,6 +71,7 @@ public:
return adoptRefWillBeNoop(new LocalDOMWindow(frame));
}
virtual ~LocalDOMWindow();
+ void dispose();
PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType, const DocumentInit&, bool forceXHTML = false);
@@ -243,19 +245,8 @@ private:
void clearDocument();
void willDestroyDocumentInFrame();
- // FIXME: Oilpan: the need for this internal method will fall
- // away when EventTargets are no longer using refcounts and
- // window properties are also on the heap. Inline the minimal
- // do-not-broadcast handling then and remove the enum +
- // removeAllEventListenersInternal().
- enum BroadcastListenerRemoval {
- DoNotBroadcastListenerRemoval,
- DoBroadcastListenerRemoval
- };
-
void willDetachFrameHost();
void frameDestroyed();
- void removeAllEventListenersInternal(BroadcastListenerRemoval);
OwnPtrWillBeMember<WindowFrameObserver> m_frameObserver;
RefPtrWillBeMember<Document> m_document;
« no previous file with comments | « Source/core/frame/DOMWindowLifecycleObserver.h ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698