Bug 1244898: Suppress the exception from BeginElement. r=bz
authorKyle Huey <khuey@kylehuey.com>
Fri, 05 Feb 2016 10:12:25 -0800
changeset 329272 6f82c58767359d066c2568621c594ab53f94a88d
parent 329271 3e1431df7bb3af5aab736a71297ce019a74859ae
child 329273 a1ab5849594427f8b176ccd398bb1b07fa719593
push id10497
push userdmitchell@mozilla.com
push dateFri, 05 Feb 2016 22:09:03 +0000
reviewersbz
bugs1244898
milestone47.0a1
Bug 1244898: Suppress the exception from BeginElement. r=bz
dom/svg/SVGAnimationElement.cpp
dom/svg/crashtests/1244898-1.xhtml
dom/svg/crashtests/crashtests.list
--- a/dom/svg/SVGAnimationElement.cpp
+++ b/dom/svg/SVGAnimationElement.cpp
@@ -367,17 +367,17 @@ SVGAnimationElement::ActivateByHyperlink
       AnimationNeedsResample();
       // As with SVGSVGElement::SetCurrentTime, we need to trigger
       // a synchronous sample now.
       FlushAnimations();
     }
     // else, silently fail. We mustn't be part of an SVG document fragment that
     // is attached to the document tree so there's nothing we can do here
   } else {
-    ErrorResult rv;
+    IgnoredErrorResult rv;
     BeginElement(rv);
   }
 }
 
 //----------------------------------------------------------------------
 // Implementation helpers
 
 nsSMILTimeContainer*
new file mode 100644
--- /dev/null
+++ b/dom/svg/crashtests/1244898-1.xhtml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+
+<script>
+
+window.addEventListener("load", function() {
+  location.hash = "#a";
+  document.documentElement.removeAttribute("class");
+}, false);
+
+</script>
+
+<animate xmlns="http://www.w3.org/2000/svg" id="a"/>
+
+</html>
--- a/dom/svg/crashtests/crashtests.list
+++ b/dom/svg/crashtests/crashtests.list
@@ -69,9 +69,10 @@ load 864509.svg
 load 880544-1.svg
 load 880544-2.svg
 load 880544-3.svg
 load 880544-4.svg
 load 880544-5.svg
 load 898915-1.svg
 load 1035248-1.svg
 load 1035248-2.svg
+load 1244898-1.xhtml
 load zero-size-image.svg