OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../resources/gc.js"></script> | |
4 <script> | |
5 if (window.layoutTestController) { | |
6 layoutTestController.dumpAsText(); | |
7 layoutTestController.waitUntilDone(); | |
8 } | |
9 | |
10 function load() | |
11 { | |
12 style = document.createElement('style'); | |
13 style.textContent = '@font-face { font-family: "A"; }'; | |
14 document.head.appendChild(style); | |
15 rulestyle = document.styleSheets[0].cssRules[0].style; | |
16 document.head.removeChild(style); | |
17 style = null; | |
18 setTimeout(crash, 0); | |
19 } | |
20 | |
21 function crash() | |
22 { | |
23 gc(); | |
24 obj = rulestyle.parentRule; | |
25 // If the gc() actually successfully reaps everything it can, then obj | |
26 // will end up null (post-fix). gc() is not guaranteed to reap the font-face | |
27 // rule, however, particularly in the browser context. | |
28 if (obj) | |
29 obj = obj.foo; | |
30 document.body.innerText = 'PASS'; | |
31 if (window.layoutTestController) | |
32 layoutTestController.notifyDone() | |
33 } | |
34 </script> | |
35 </head> | |
36 <body onload="load()"></body> | |
37 </html> | |
OLD | NEW |