4 https://bugzilla.mozilla.org/show_bug.cgi?id=1041646
8 <title>Test for Bug
1041646</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
13 /** Test for Bug
1041646 **/
14 // We need to reject the promise with a DOMException, so make sure we have
15 // something that produces one.
16 function throwException() {
17 document.createTextNode(
"").appendChild(document);
22 ok(e instanceof DOMException,
"This test won't test what it should be testing");
25 SimpleTest.waitForExplicitFinish();
27 // We want a new DOMException each time here.
28 for (var i =
0; i <
100; ++i) {
29 new Promise(throwException);
32 // Now make sure we wait for all those promises above to reject themselves
33 Promise.resolve(
1).then(function() {
34 SpecialPowers.gc(); // This should not assert or crash
41 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1041646">Mozilla Bug
1041646</a>
43 <div id=
"content" style=
"display: none">