Bug 620169 [@ SVGAnimatedLengthList::SetBaseValueString] uses domWrapper forgetting it might be null. r=dholbert, a=roc.
authortimeless@mozdev.org
Mon, 20 Dec 2010 11:13:17 +0000
changeset 59508 37290bda896db60060cc90dfd394110927364ed7
parent 59507 0ca1b65bb907b67d8af7c897e442044232d1464c
child 59509 dd9e50b46d311f1a9bf80112ef273501a43ee0d3
push id17641
push userjwatt@jwatt.org
push dateMon, 20 Dec 2010 11:15:35 +0000
treeherdermozilla-central@37290bda896d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, roc
bugs620169
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 620169 [@ SVGAnimatedLengthList::SetBaseValueString] uses domWrapper forgetting it might be null. r=dholbert, a=roc.
content/svg/content/src/SVGAnimatedLengthList.cpp
content/svg/content/src/SVGAnimatedNumberList.cpp
--- a/content/svg/content/src/SVGAnimatedLengthList.cpp
+++ b/content/svg/content/src/SVGAnimatedLengthList.cpp
@@ -65,17 +65,17 @@ SVGAnimatedLengthList::SetBaseValueStrin
     domWrapper->InternalBaseValListWillChangeTo(newBaseValue);
   }
 
   // We don't need to call DidChange* here - we're only called by
   // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr,
   // which takes care of notifying.
 
   rv = mBaseVal.CopyFrom(newBaseValue);
-  if (NS_FAILED(rv)) {
+  if (NS_FAILED(rv) && domWrapper) {
     // Attempting to increase mBaseVal's length failed - reduce domWrapper
     // back to the same length:
     domWrapper->InternalBaseValListWillChangeTo(mBaseVal);
   }
   return rv;
 }
 
 void
--- a/content/svg/content/src/SVGAnimatedNumberList.cpp
+++ b/content/svg/content/src/SVGAnimatedNumberList.cpp
@@ -65,17 +65,17 @@ SVGAnimatedNumberList::SetBaseValueStrin
     domWrapper->InternalBaseValListWillChangeTo(newBaseValue);
   }
 
   // We don't need to call DidChange* here - we're only called by
   // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr,
   // which takes care of notifying.
 
   rv = mBaseVal.CopyFrom(newBaseValue);
-  if (NS_FAILED(rv)) {
+  if (NS_FAILED(rv) && domWrapper) {
     // Attempting to increase mBaseVal's length failed - reduce domWrapper
     // back to the same length:
     domWrapper->InternalBaseValListWillChangeTo(mBaseVal);
   }
   return rv;
 }
 
 void