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

Unified Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 305783004: Prepare SVGSMILElement for oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: strong refs Created 6 years, 7 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/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
index 54f5c5a45a9113cbbe931808d0aca72a20846060..3a914e8d23c01755a6d61dc60287753ed5350176 100644
--- a/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/Source/core/svg/animation/SVGSMILElement.cpp
@@ -205,7 +205,6 @@ SVGSMILElement::~SVGSMILElement()
smilRepeatEventSender().cancelEvent(this);
smilRepeatNEventSender().cancelEvent(this);
#if !ENABLE(OILPAN)
- // FIXME: Oilpan: Clear |m_syncBaseDependents| using weak processing.
clearConditions();
if (m_timeContainer && m_targetElement && hasValidAttributeName())
@@ -602,12 +601,14 @@ void SVGSMILElement::connectSyncBaseConditions()
Condition* condition = m_conditions[n].get();
if (condition->type() == Condition::Syncbase) {
ASSERT(!condition->baseID().isEmpty());
- condition->setSyncBase(treeScope().getElementById(AtomicString(condition->baseID())));
- if (!condition->syncBase() || !isSVGSMILElement(*condition->syncBase())) {
+ Element* element = treeScope().getElementById(AtomicString(condition->baseID()));
+ if (!element || !isSVGSMILElement(*element)) {
condition->setSyncBase(0);
continue;
}
- toSVGSMILElement(condition->syncBase())->addSyncBaseDependent(this);
+ SVGSMILElement* svgSMILElement = toSVGSMILElement(element);
+ condition->setSyncBase(svgSMILElement);
+ svgSMILElement->addSyncBaseDependent(this);
}
}
}
@@ -621,7 +622,7 @@ void SVGSMILElement::disconnectSyncBaseConditions()
Condition* condition = m_conditions[n].get();
if (condition->type() == Condition::Syncbase) {
if (condition->syncBase())
- toSVGSMILElement(condition->syncBase())->removeSyncBaseDependent(this);
+ condition->syncBase()->removeSyncBaseDependent(this);
condition->setSyncBase(0);
}
}
@@ -1246,8 +1247,8 @@ bool SVGSMILElement::progress(SMILTime elapsed, SVGSMILElement* resultElement, b
void SVGSMILElement::notifyDependentsIntervalChanged()
{
ASSERT(m_intervalBegin.isFinite());
- DEFINE_STATIC_LOCAL(HashSet<SVGSMILElement*>, loopBreaker, ());
- if (!loopBreaker.add(this).isNewEntry)
+ DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMember<SVGSMILElement> > >, loopBreaker, (adoptPtrWillBeNoop(new WillBeHeapHashSet<RawPtrWillBeMember<SVGSMILElement> >())));
haraken 2014/05/29 08:11:52 Discussed offline. I wonder if this Persistent<Mem
+ if (!loopBreaker->add(this).isNewEntry)
return;
TimeDependentSet::iterator end = m_syncBaseDependents.end();
@@ -1256,7 +1257,7 @@ void SVGSMILElement::notifyDependentsIntervalChanged()
dependent->createInstanceTimesFromSyncbase(this);
}
- loopBreaker.remove(this);
+ loopBreaker->remove(this);
}
void SVGSMILElement::createInstanceTimesFromSyncbase(SVGSMILElement* syncBase)
« no previous file with comments | « Source/core/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698