4 https://bugzilla.mozilla.org/show_bug.cgi?id=655297
7 <title>Test for Bug
655297</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=655297">Mozilla Bug
655297</a>
14 <div id=
"content" style=
"display: none">
17 <p>0</p> <p>1</p> <p>2</p> <p>3</p> <p>4</p>
18 <p>5</p> <p>6</p> <p>7</p> <p>8</p> <p>9</p>
20 <script type=
"application/javascript">
22 /** Test for Bug
655297 **/
24 var map = new WeakMap();
26 var paras = document.getElementsByTagName(
"p");
27 for (var i =
0; i < paras.length; i++)
28 map.set(paras[i],
"ok");
31 var paras = document.getElementsByTagName(
"p");
32 for (var i =
0; i < paras.length; i++) {
33 if (map.get(paras[i]) !=
"ok") {
41 SpecialPowers.forceGC();
42 ok(g(),
"Failed to keep XPCWrappedNative used as WeakMap key alive.");