PageRenderTime 25ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/debug/Frame-arguments-02.js

http://github.com/zpao/v8monkey
JavaScript | 19 lines | 16 code | 2 blank | 1 comment | 0 complexity | 02502efc1f730ff136906af0d30c50b0 MD5 | raw file
 1// Object arguments.
 2
 3var g = newGlobal('new-compartment');
 4var dbg = new Debugger(g);
 5var hits = 0;
 6dbg.onDebuggerStatement = function (frame) {
 7    var args = frame.arguments;
 8    assertEq(args, frame.arguments);
 9    assertEq(args instanceof Array, true);
10    assertEq(args.length, 2);
11    assertEq(args[0] instanceof Debugger.Object, true);
12    assertEq(args[0].class, args[1]);
13    hits++;
14};
15
16g.eval("function f(obj, cls) { debugger; }");
17g.eval("f({}, 'Object');");
18g.eval("f(Date, 'Function');");
19assertEq(hits, 2);