summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug683140.js
blob: 23b99821473263b5a982adf1c1cc78fe8ffe713f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var g = newGlobal("same-compartment");
g.eval("this.f = function(a) {" +
       "assertEq(a instanceof Array, false);" +
       "a = Array.prototype.slice.call(a);" +
       "assertEq(a instanceof Array, true); }");
g.f([1, 2, 3]);

var g2 = newGlobal();
g2.a = g2.Array(10);
assertEq(g2.a instanceof Array, false);
g2.a = Array.prototype.slice(g2.a);
assertEq(g2.a instanceof Array, true);