Bug 1401809 - Use Atom::from(nsIAtom) to increment reference count in case of dynamic atom for will-change. r?xidorn draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Thu, 21 Sep 2017 15:50:37 +0900
changeset 668148 813f81a5a7cd2c2212d3214cef169a58dbc261e8
parent 668005 f8dd3f21e434be32fe5901849f1723b0e64cf668
child 732603 5c464ca6ed51556e4203cda29e7e101272f75ecf
push id80942
push userhikezoe@mozilla.com
push dateThu, 21 Sep 2017 06:51:29 +0000
reviewersxidorn
bugs1401809
milestone57.0a1
Bug 1401809 - Use Atom::from(nsIAtom) to increment reference count in case of dynamic atom for will-change. r?xidorn If we don't increment the reference count for the Atom in servo side, it's possible to try to release the Atom in servo side even if we have already released in gecko side. When it happens, nsIAtom::mKind is no longer reliable. MozReview-Commit-ID: GrxbcYxowRB
dom/animation/test/crashtests/1401809.html
dom/animation/test/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/dom/animation/test/crashtests/1401809.html
@@ -0,0 +1,14 @@
+<html>
+  <head>
+    <style></style>
+    <script>
+      o1 = document.createElement('t');
+      document.documentElement.appendChild(o1);
+      document.styleSheets[0].insertRule('* { will-change:an }', 0);
+      k = new KeyframeEffect(o1, [{'willChange':'s'}], {'':''});
+      k = null;
+      SpecialPowers.forceGC();
+      SpecialPowers.forceCC();
+    </script>
+  </head>
+</html>
--- a/dom/animation/test/crashtests/crashtests.list
+++ b/dom/animation/test/crashtests/crashtests.list
@@ -28,8 +28,9 @@ pref(dom.animations-api.core.enabled,tru
 pref(dom.animations-api.core.enabled,true) load 1334583-1.html
 pref(dom.animations-api.core.enabled,true) load 1335998-1.html
 pref(dom.animations-api.core.enabled,true) load 1343589-1.html
 pref(dom.animations-api.core.enabled,true) load 1359658-1.html
 pref(dom.animations-api.core.enabled,true) load 1373712-1.html
 pref(dom.animations-api.core.enabled,true) load 1379606-1.html
 pref(dom.animations-api.core.enabled,true) load 1393605-1.html
 load 1400022-1.html
+pref(dom.animations-api.core.enabled,true) load 1401809.html