Chromium Code Reviews| Index: Source/core/svg/properties/SVGAnimatedProperty.cpp |
| diff --git a/Source/core/svg/properties/SVGAnimatedProperty.cpp b/Source/core/svg/properties/SVGAnimatedProperty.cpp |
| index 2258ad93f57ec028c6defd8dd123d7983db95770..20a796c5182a1a28f0fe0ede9e51476870a1a81a 100644 |
| --- a/Source/core/svg/properties/SVGAnimatedProperty.cpp |
| +++ b/Source/core/svg/properties/SVGAnimatedProperty.cpp |
| @@ -56,8 +56,14 @@ void SVGAnimatedProperty::detachAnimatedPropertiesForElement(SVGElement* element |
| } |
| } |
| - for (Vector<SVGAnimatedPropertyDescription>::const_iterator it = keysToRemove.begin(); it != keysToRemove.end(); ++it) |
| + // Workaround for http://crbug.com/333156 : |
|
pdr.
2014/01/14 04:33:25
Please remove the workaround comment, as I think w
kouhei (in TOK)
2014/01/14 04:51:27
Done.
|
| + // There are unknown cases where detachAnimatedPropertiesForElement is called recursively from ~SVGAnimatedProperty. |
| + // This vector makes this function safe by deferring the recursive call until we finish touching the HashMap. |
| + Vector<RefPtr<SVGAnimatedProperty> > deferredPropertyDestruct; |
|
pdr.
2014/01/14 04:33:25
I would also change this comment slightly to just
kouhei (in TOK)
2014/01/14 04:51:27
Done.
|
| + for (Vector<SVGAnimatedPropertyDescription>::const_iterator it = keysToRemove.begin(); it != keysToRemove.end(); ++it) { |
| + deferredPropertyDestruct.append(cache->get(*it)); |
|
pdr.
2014/01/14 04:33:25
I'm okay with a temporary workaround but I think w
kouhei (in TOK)
2014/01/14 04:45:07
No. The problem is that SVGAnimatedProperty is som
kouhei (in TOK)
2014/01/14 04:51:27
Done.
|
| cache->remove(*it); |
| + } |
| } |
| void SVGAnimatedProperty::commitChange() |