summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-executeInGlobal-06.js
blob: 37fdf4db5cf1f9446f30488813b26fbba01ca442 (plain)
1
2
3
4
5
6
7
8
// Debugger.Object.prototype.executeInGlobal sets 'this' to the global.

var dbg = new Debugger;
var g1 = newGlobal({newCompartment: true});
var g1w = dbg.addDebuggee(g1);

assertEq(g1w.executeInGlobal('this').return, g1w.makeDebuggeeValue(g1));
assertEq(g1w.executeInGlobalWithBindings('this', { x:42 }).return, g1w.makeDebuggeeValue(g1));