diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/Debugger-findScripts-10.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-10.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,13 @@ +// Specifying a non-debuggee global in a Debugger.prototype.findScripts query should +// cause the query to return no scripts. + +var g1 = newGlobal(); +g1.eval('function f(){}'); + +var g2 = newGlobal(); +g2.eval('function g(){}'); + +var dbg = new Debugger(g1); +assertEq(dbg.findScripts({global:g1}).length > 0, true); +assertEq(dbg.findScripts({global:g2}).length, 0); +assertEq(dbg.findScripts({global:this}).length, 0);