summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-enabled-02.js
blob: 97a5eb3edb71db1002304f518f8f1820b491e6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Tests that hooks work if set while the Debugger is disabled.

var g = newGlobal();
var dbg = new Debugger(g);
var log = "";

g.eval("" + function f() { return 42; });

dbg.enabled = false;
dbg.onEnterFrame = function (frame) {
  log += "1";
};
dbg.enabled = true;

g.f();

assertEq(log, "1");