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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update OilpanExpectations 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..f9c8118fb684e4c396f84f14edef590540ff810b 100644
--- a/Source/core/frame/DOMWindowProperty.cpp
+++ b/Source/core/frame/DOMWindowProperty.cpp
@@ -34,25 +34,27 @@ 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.
// We should fix that. <rdar://problem/11567132>
- if (m_frame) {
+ if (this->frame()) {
haraken 2014/09/08 07:25:57 What is this change for?
sof 2014/09/08 21:17:45 Reverted back (a leftover from an experiment to se
m_associatedDOMWindow = m_frame->domWindow();
m_associatedDOMWindow->registerProperty(this);
}
}
+#if !ENABLE(OILPAN)
DOMWindowProperty::~DOMWindowProperty()
haraken 2014/09/08 07:25:57 Is it guaranteed that willDestroyGlobalObjectInFra
sof 2014/09/08 21:17:45 LocalDOMWindow::reset() calls willDestroyGlobalObj
{
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,10 @@ void DOMWindowProperty::willDetachGlobalObjectFromFrame()
ASSERT(m_associatedDOMWindow);
}
+void DOMWindowProperty::trace(Visitor* visitor)
+{
+ visitor->trace(m_frame);
+ visitor->trace(m_associatedDOMWindow);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698