diff options
Diffstat (limited to 'js/src/jit-test/tests/warp/stub-folding-cross-compartment.js')
-rw-r--r-- | js/src/jit-test/tests/warp/stub-folding-cross-compartment.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js b/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js new file mode 100644 index 0000000000..735504cf89 --- /dev/null +++ b/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js @@ -0,0 +1,15 @@ +var src = ` +var p = {y: 1}; +var arr = []; +for (var i = 0; i < 10; i++) { + var o = Object.create(p); + o["x" + i] = 2; + arr.push(o); +} +arr +`; + +var wrapper = evaluate(src, {global: newGlobal({sameZoneAs: this})}); +for (var i = 0; i < 50; i++) { + assertEq(wrapper[i % 10].y, 1); +} |