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

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

Issue 8038032: Merge 94905 - Source/WebCore: Crash due to bad data in SVGDocumentExtensions m_pendingResources (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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/WebCore/svg/SVGStyledElement.h ('k') | Source/WebCore/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGStyledElement.cpp
===================================================================
--- Source/WebCore/svg/SVGStyledElement.cpp (revision 95993)
+++ Source/WebCore/svg/SVGStyledElement.cpp (working copy)
@@ -389,7 +389,7 @@
for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients->begin(); it != end; ++it) {
ASSERT((*it)->hasPendingResources());
(*it)->buildPendingResource();
- (*it)->setHasPendingResources(false);
+ (*it)->clearHasPendingResourcesIfPossible();
}
}
@@ -455,11 +455,17 @@
return hasRareSVGData() && rareSVGData()->hasPendingResources();
}
-void SVGStyledElement::setHasPendingResources(bool value)
+void SVGStyledElement::setHasPendingResources()
{
- ensureRareSVGData()->setHasPendingResources(value);
+ ensureRareSVGData()->setHasPendingResources(true);
}
+void SVGStyledElement::clearHasPendingResourcesIfPossible()
+{
+ if (!document()->accessSVGExtensions()->isElementInPendingResources(this))
+ ensureRareSVGData()->setHasPendingResources(false);
+}
+
AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const
{
// To be overriden by SVGStyledLocatableElement/SVGStyledTransformableElement (or as special case SVGTextElement)
Property changes on: Source\WebCore\svg\SVGStyledElement.cpp
___________________________________________________________________
Added: svn:executable
+ *
« no previous file with comments | « Source/WebCore/svg/SVGStyledElement.h ('k') | Source/WebCore/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698