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

Unified Diff: Source/core/animation/TimedItem.cpp

Issue 225073004: Oilpan: Completely move core/animations/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/animation/TimedItem.cpp
diff --git a/Source/core/animation/TimedItem.cpp b/Source/core/animation/TimedItem.cpp
index 5002823559d1ab13f628ebf3c8d7fc4d85fdeb55..00c24f37e3561544f959095a6e546fcaecb5ba8d 100644
--- a/Source/core/animation/TimedItem.cpp
+++ b/Source/core/animation/TimedItem.cpp
@@ -51,9 +51,9 @@ Timing::FillMode resolvedFillMode(Timing::FillMode fillMode, bool isAnimation)
} // namespace
TimedItem::TimedItem(const Timing& timing, PassOwnPtr<EventDelegate> eventDelegate)
- : m_parent(0)
+ : m_parent(nullptr)
, m_startTime(0)
- , m_player(0)
+ , m_player(nullptr)
, m_timing(timing)
, m_eventDelegate(eventDelegate)
, m_calculated()
@@ -188,9 +188,21 @@ const TimedItem::CalculatedTiming& TimedItem::ensureCalculated() const
return m_calculated;
}
-PassRefPtr<TimedItemTiming> TimedItem::timing()
+PassRefPtrWillBeRawPtr<TimedItemTiming> TimedItem::timing()
{
return TimedItemTiming::create(this);
}
+void TimedItem::trace(Visitor* visitor)
+{
+ visitor->trace(m_parent);
+ visitor->registerWeakMembers<TimedItem, &TimedItem::processWeakMembers>(this);
+}
+
+void TimedItem::processWeakMembers(Visitor* visitor)
+{
+ if (!visitor->isAlive(m_player) && m_player)
Mads Ager (chromium) 2014/04/29 10:29:41 I would turn the condition the other way around an
+ detach();
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698