function-caller-strict-cross-global.js (452B)
1 // |reftest| skip-if(!xulRuntime.shell) -- needs newGlobal() 2 // Any copyright is dedicated to the Public Domain. 3 // http://creativecommons.org/licenses/publicdomain/ 4 5 var g1 = newGlobal(); 6 g1.evaluate("function f() { return f.caller; }"); 7 8 var g2 = newGlobal(); 9 g2.f = g1.f; 10 11 assertEq(g2.evaluate("function g() { 'use strict'; return f(); } g()"), null); 12 13 if (typeof reportCompare === "function") 14 reportCompare(true, true); 15 16 print("Tests complete");