summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/svg/SVGDocumentExtensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGDocumentExtensions.cpp')
-rw-r--r--Source/WebCore/svg/SVGDocumentExtensions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebCore/svg/SVGDocumentExtensions.cpp b/Source/WebCore/svg/SVGDocumentExtensions.cpp
index 3fd9761..7f7ba67 100644
--- a/Source/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/Source/WebCore/svg/SVGDocumentExtensions.cpp
@@ -93,8 +93,12 @@ void SVGDocumentExtensions::startAnimations()
// FIXME: Eventually every "Time Container" will need a way to latch on to some global timer
// starting animations for a document will do this "latching"
#if ENABLE(SVG_ANIMATION)
- HashSet<SVGSVGElement*>::iterator end = m_timeContainers.end();
- for (HashSet<SVGSVGElement*>::iterator itr = m_timeContainers.begin(); itr != end; ++itr)
+ // FIXME: We hold a ref pointers to prevent a shadow tree from getting removed out from underneath us.
+ // In the future we should refactor the use-element to avoid this. See https://webkit.org/b/53704
+ Vector<RefPtr<SVGSVGElement> > timeContainers;
+ timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end());
+ Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end();
+ for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin(); itr != end; ++itr)
(*itr)->timeContainer()->begin();
#endif
}