diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/Script-source-02.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/Script-source-02.js Wed Dec 31 06:09:35 2014 +0100 @@ -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);