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

Unified Diff: Source/WebCore/svg/SVGDocumentExtensions.cpp

Issue 10536212: Merge 120559 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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 | « LayoutTests/svg/text/textpath-reference-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGDocumentExtensions.cpp
===================================================================
--- Source/WebCore/svg/SVGDocumentExtensions.cpp (revision 120761)
+++ Source/WebCore/svg/SVGDocumentExtensions.cpp (working copy)
@@ -410,12 +410,17 @@
for (HashSet<SVGElement*>::iterator setIt = referencingElements->begin(); setIt != setEnd; ++setIt)
toBeNotified.append(*setIt);
- m_elementDependencies.remove(it);
-
// Force rebuilding the referencingElement so it knows about this change.
Vector<SVGElement*>::iterator vectorEnd = toBeNotified.end();
- for (Vector<SVGElement*>::iterator vectorIt = toBeNotified.begin(); vectorIt != vectorEnd; ++vectorIt)
- (*vectorIt)->svgAttributeChanged(XLinkNames::hrefAttr);
+ for (Vector<SVGElement*>::iterator vectorIt = toBeNotified.begin(); vectorIt != vectorEnd; ++vectorIt) {
+ // Before rebuilding referencingElement ensure it was not removed from under us.
+ if (HashSet<SVGElement*>* referencingElements = setOfElementsReferencingTarget(referencedElement)) {
+ if (referencingElements->contains(*vectorIt))
+ (*vectorIt)->svgAttributeChanged(XLinkNames::hrefAttr);
+ }
+ }
+
+ m_elementDependencies.remove(referencedElement);
}
#if ENABLE(SVG_FONTS)
« no previous file with comments | « LayoutTests/svg/text/textpath-reference-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698