summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaid Abou-Hallawa <sabouhallawa@apple.com>2016-03-08 16:13:36 +0100
committerJavier Fernandez <jfernandez@igalia.com>2016-03-19 22:44:54 +0000
commit21a11f7197da091eae93e987e73fbf5537dfaf3a (patch)
tree6bc613af1ec39e68e5976d3cab004f1b25a4eb42
parent8366c5d48fc7ef56ea2269cb133f2a75269a712e (diff)
downloadqtwebkit-21a11f7197da091eae93e987e73fbf5537dfaf3a.tar.gz
Fixed crashes on SVG path animation use cases.
Based on upstream fix by said@apple.com at http://trac.webkit.org/changeset/196670 A destructor was added to SVGListPropertyTearOff that notifies its wrapper (the SVGAnimatedListPropertyTearoff) about its deletion. This allows the wrapper to nullify any references to the wrapped content. We needed to do the same thing for SVGPathSegListPropertyTearOff. Both SVGPathSegListPropertyTearOff and SVGListPropertyTearOff inherit from SVGListProperty and both hold pointers to SVGAnimatedListPropertyTearOff which needs to be notified. Change-Id: I1873825c7bdc07bf06cd5c300156ebe084f2607e Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r--Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h b/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h
index ee704d681..4c1a30c4b 100644
--- a/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h
+++ b/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h
@@ -111,6 +111,12 @@ public:
return Base::appendItemValues(newItem, ec);
}
+ virtual ~SVGPathSegListPropertyTearOff()
+ {
+ if (m_animatedProperty)
+ m_animatedProperty->propertyWillBeDeleted(*this);
+ }
+
private:
SVGPathSegListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty, SVGPropertyRole role, SVGPathSegRole pathSegRole, SVGPathSegList& values, ListWrapperCache& wrappers)
: SVGListProperty<SVGPathSegList>(role, values, &wrappers)