Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / gc-4.html
blobd6a1e77fd6435ff36c62d18c11dd04975bd894b3
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html; charset=utf-8">
4 <script type='text/javascript' charset='utf-8'>
5 function print(message) {
6 var paragraph = document.createElement("p");
7 paragraph.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(paragraph);
11 function test() {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
16 for (x = 0; x < 1000; x++) {
17 var canvas = document.getElementById("canvas");
18 var context = canvas.getContext("2d");
19 context.save();
22 print("passed");
24 </script>
25 </head>
26 <body onload="test();">
27 <p>This test checks for a regression against <i>rdar://problem/4152454 crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT</i>. The original bug occurred because some objects did not properly mark themselves, and so the garbage collector prematurely destroyed them.</p>
28 <p>If the test passes, you will see the word "passed" below. Otherwise, it will crash.</p>
29 <hr>
30 <canvas id='canvas' width='172' height='172'></canvas>
31 <div id='console'/>
32 </body>
33 </html>