diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Frame-environment-01.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Frame-environment-01.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Frame-environment-01.js b/js/src/jit-test/tests/debug/Frame-environment-01.js new file mode 100644 index 0000000000..1168732e29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-01.js @@ -0,0 +1,13 @@ +// frame.environment is a Debugger.Environment object + +var g = newGlobal({newCompartment: true}) +var dbg = Debugger(g); +g.h = function () { + assertEq(dbg.getNewestFrame().environment instanceof Debugger.Environment, true); +}; + +g.eval("h()"); +g.evaluate("h()"); +g.eval("eval('h()')"); +g.eval("function f() { h(); }"); +g.f(); |