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

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

Issue 552733003: Oilpan: make DOMWindowProperty a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pacify GC plugin wrt LocalDOMWindow::trace() Created 6 years, 3 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
Index: Source/core/frame/DOMWindowProperty.cpp
diff --git a/Source/core/frame/DOMWindowProperty.cpp b/Source/core/frame/DOMWindowProperty.cpp
index abb1abf010c35a3420ad7bd9e9f6bb29df048390..d64c29ae93e6c9337126c51b523faf92cfcf4b4f 100644
--- a/Source/core/frame/DOMWindowProperty.cpp
+++ b/Source/core/frame/DOMWindowProperty.cpp
@@ -34,7 +34,7 @@ namespace blink {
DOMWindowProperty::DOMWindowProperty(LocalFrame* frame)
: m_frame(frame)
- , m_associatedDOMWindow(0)
+ , m_associatedDOMWindow(nullptr)
{
// FIXME: For now it *is* acceptable for a DOMWindowProperty to be created with a null frame.
// See fast/dom/navigator-detached-no-crash.html for the recipe.
@@ -45,14 +45,16 @@ DOMWindowProperty::DOMWindowProperty(LocalFrame* frame)
}
}
+#if !ENABLE(OILPAN)
DOMWindowProperty::~DOMWindowProperty()
{
if (m_associatedDOMWindow)
m_associatedDOMWindow->unregisterProperty(this);
- m_associatedDOMWindow = 0;
- m_frame = 0;
+ m_associatedDOMWindow = nullptr;
+ m_frame = nullptr;
}
+#endif
void DOMWindowProperty::willDestroyGlobalObjectInFrame()
{
@@ -64,8 +66,8 @@ void DOMWindowProperty::willDestroyGlobalObjectInFrame()
// itself from any LocalDOMWindow it is associated with if that LocalDOMWindow is going away.
if (m_associatedDOMWindow)
m_associatedDOMWindow->unregisterProperty(this);
- m_associatedDOMWindow = 0;
- m_frame = 0;
+ m_associatedDOMWindow = nullptr;
+ m_frame = nullptr;
}
void DOMWindowProperty::willDetachGlobalObjectFromFrame()
@@ -75,4 +77,9 @@ void DOMWindowProperty::willDetachGlobalObjectFromFrame()
ASSERT(m_associatedDOMWindow);
}
+void DOMWindowProperty::trace(Visitor* visitor)
+{
+ visitor->trace(m_associatedDOMWindow);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698