js/src/jit-test/tests/debug/Frame-live-03.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // |jit-test| debug
     2 // frame properties throw if !frame.live
     4 load(libdir + "asserts.js");
     6 var g = newGlobal();
     7 var f;
     8 Debugger(g).onDebuggerStatement = function (frame) {
     9     assertEq(frame.live, true);
    10     assertEq(frame.type, "call");
    11     assertEq(frame.this instanceof Object, true);
    12     assertEq(frame.older instanceof Debugger.Frame, true);
    13     assertEq(frame.callee instanceof Debugger.Object, true);
    14     assertEq(frame.generator, false);
    15     assertEq(frame.constructing, false);
    16     assertEq(frame.arguments.length, 0);
    17     f = frame;
    18 };
    20 g.eval("(function () { debugger; }).call({});");
    21 assertEq(f.live, false);
    22 assertThrowsInstanceOf(function () { f.type; }, Error);
    23 assertThrowsInstanceOf(function () { f.this; }, Error);
    24 assertThrowsInstanceOf(function () { f.older; }, Error);
    25 assertThrowsInstanceOf(function () { f.callee; }, Error);
    26 assertThrowsInstanceOf(function () { f.generator; }, Error);
    27 assertThrowsInstanceOf(function () { f.constructing; }, Error);
    28 assertThrowsInstanceOf(function () { f.arguments; }, Error);

mercurial