diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Script-source-02.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Script-source-02.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Script-source-02.js b/js/src/jit-test/tests/debug/Script-source-02.js new file mode 100644 index 000000000..77eaaae6d --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-source-02.js @@ -0,0 +1,16 @@ +/* + * Script.prototype.source should be the same object for both the top-level + * script and the script of functions accessed as debuggee values on the global + */ +let g = newGlobal(); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +let count = 0; +dbg.onDebuggerStatement = function (frame) { + ++count; + assertEq(frame.script.source, gw.makeDebuggeeValue(g.f).script.source); +} + +g.eval("function f() {}; debugger;"); +assertEq(count, 1); |