Tests for bug 744731, which luke accidentally fixed in rev b863ef9946b8. no_r=just-passing-tests.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 13 Dec 2012 19:18:07 -0600
changeset 116022 2cf3cca4171e7ad18ffb52b9ba71a6942e539146
parent 116021 7878092679cfc5bb217894bbced986a529f63aa9
child 116023 65da8135423fd0ab65e9b31dff0d418587855c9e
push id24034
push useremorley@mozilla.com
push dateFri, 14 Dec 2012 15:28:57 +0000
treeherdermozilla-central@50d8f411d305 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs744731
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Tests for bug 744731, which luke accidentally fixed in rev b863ef9946b8. no_r=just-passing-tests.
js/src/jit-test/tests/debug/Debugger-findScripts-16.js
js/src/jit-test/tests/debug/Debugger-findScripts-17.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Debugger-findScripts-16.js
@@ -0,0 +1,12 @@
+// Bug 744731 - findScripts() finds active debugger evalInGlobal scripts.
+
+var g = newGlobal('new-compartment');
+var dbg = new Debugger;
+var gw = dbg.addDebuggee(g);
+var hits = 0;
+dbg.onDebuggerStatement = function (frame) {
+    hits++;
+    assertEq(dbg.findScripts().indexOf(dbg.getNewestFrame().script) !== -1, true);
+};
+gw.evalInGlobal("debugger;");
+assertEq(hits, 1);
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Debugger-findScripts-17.js
@@ -0,0 +1,15 @@
+// Bug 744731 - findScripts() finds active debugger frame.eval scripts.
+
+var g = newGlobal('new-compartment');
+var dbg = new Debugger;
+var gw = dbg.addDebuggee(g);
+var hits = 0;
+dbg.onDebuggerStatement = function (frame) {
+    dbg.onDebuggerStatement = function (frame) {
+        hits++;
+        assertEq(dbg.findScripts().indexOf(dbg.getNewestFrame().script) !== -1, true);
+    };
+    frame.eval("debugger;");
+};
+g.eval("debugger;");
+assertEq(hits, 1);