js/src/jit-test/tests/debug/Debugger-ctor-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 // If the debuggee cannot be put into debug mode, throw.
     3 // Run this test only if this compartment can't be put into debug mode.
     4 var canEnable = true;
     5 if (typeof setDebugMode === 'function') {
     6     try {
     7         setDebugMode(true);
     8     } catch (exc) {
     9         canEnable = false;
    10     }
    11 }
    13 if (!canEnable) {
    14     var g = newGlobal();
    15     g.libdir = libdir;
    16     g.eval("load(libdir + 'asserts.js');");
    17     g.parent = this;
    18     g.eval("assertThrowsInstanceOf(function () { new Debugger(parent); }, Error);");
    19 }

mercurial