ArraySlice needs to keep the source array alive.
[WebKit-https.git] / JSTests / stress / array-slice-must-keep-source-array-alive.js
1 //@ runDefault("--useConcurrentGC=false", "--useConcurrentJIT=false", "--thresholdForFTLOptimizeAfterWarmUp=1000")
2
3 var functions = [];
4
5 function boo() {
6     functions.push(new Function("a", "return a"));
7     return functions.splice(0);
8 }
9
10 function test() {
11     functions = boo().slice();
12 }
13
14 noDFG(boo);
15 noInline(boo);
16 noInline(test);
17
18 for (var i = 0; i < 10000; i++)
19     test();