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

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

Issue 1148383012: Oilpan: prefer eager finalization over prefinalizers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: expand&improve comments Created 5 years, 6 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/dom/MutationObserver.cpp ('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 88d1c7d514f69c024e5002ea78893d146382f828..54128d2cc0caa7ef140c363b7909efc279b4a1bf 100644
--- a/Source/core/frame/LocalDOMWindow.h
+++ b/Source/core/frame/LocalDOMWindow.h
@@ -66,7 +66,6 @@ enum PageshowEventPersistence {
// please ping dcheng@chromium.org first. You probably don't want to do that.
class CORE_EXPORT 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)
@@ -74,7 +73,11 @@ public:
return adoptRefWillBeNoop(new LocalDOMWindow(frame));
}
virtual ~LocalDOMWindow();
- void dispose();
+
+ // LocalDOMWindow is eagerly finalized to allow the destructor
+ // to remove any event listeners still attached.
+ EAGERLY_FINALIZE();
+ DECLARE_VIRTUAL_TRACE();
PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType, const DocumentInit&, bool forceXHTML = false);
@@ -83,7 +86,6 @@ public:
virtual LocalDOMWindow* toDOMWindow() override;
// DOMWindow overrides:
- DECLARE_VIRTUAL_TRACE();
bool isLocalDOMWindow() const override { return true; }
virtual LocalFrame* frame() const override;
Screen* screen() const override;
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698