Chromium Code Reviews| Index: Source/core/svg/animation/SVGSMILElement.cpp |
| diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp |
| index 3a914e8d23c01755a6d61dc60287753ed5350176..f15005ddae124af748cbb134ab13b7d3a102f91f 100644 |
| --- a/Source/core/svg/animation/SVGSMILElement.cpp |
| +++ b/Source/core/svg/animation/SVGSMILElement.cpp |
| @@ -1247,6 +1247,9 @@ bool SVGSMILElement::progress(SMILTime elapsed, SVGSMILElement* resultElement, b |
| void SVGSMILElement::notifyDependentsIntervalChanged() |
| { |
| ASSERT(m_intervalBegin.isFinite()); |
| + // |loopbreaker| is used to avoid infinite recursions which may be caused from: |
|
haraken
2014/05/30 01:39:45
loopBreaker
|
| + // |notifyDependentsIntervalChanged| -> |createInstanceTimesFromSyncbase| -> |add{Begin,End}Time| -> |{begin,end}TimeChanged| -> |notifyDependentsIntervalChanged| |
| + // |loopbreaker| is defined as a Persistent<HeapHashSet<Member<SVGSMILElement> > >. This is safe because it is guaranteed to be empty after the root |notifyDependentsIntervalChanged| has exit. |
|
haraken
2014/05/30 01:39:45
this is safe => this won't cause leaks
has exit =>
|
| DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMember<SVGSMILElement> > >, loopBreaker, (adoptPtrWillBeNoop(new WillBeHeapHashSet<RawPtrWillBeMember<SVGSMILElement> >()))); |
| if (!loopBreaker->add(this).isNewEntry) |
| return; |