blob: f1a6fdcd79245734d462a4c34792e3863c2fd21d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<html>
<head>
<script>
var blob = new Blob([]);
var url = null;
var count = 0;
if (!window.gc)
{
window.gc = function()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++)
var s = new String("abc");
}
}
function load()
{
if (window.testRunner)
{
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setCloseRemainingWindowsWhenComplete(true);
testRunner.waitUntilDone();
}
win = window.open();
if (win.URL)
{
url = win.URL;
win.location = "nothing";
setTimeout(crash, 0);
return;
}
document.body.innerHTML = "PASS";
if (window.testRunner)
testRunner.notifyDone();
}
function crash()
{
gc();
url.createObjectURL(blob);
if (count++ < 5)
{
setTimeout(crash, 0);
return;
}
document.body.innerHTML = "PASS";
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="load()">
RUNNING...
</body>
</html>
|