js/src/jit-test/tests/debug/Debugger-ctor-03.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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