Debugger-ctor-03.js (506B)
1 // If the debuggee cannot be put into debug mode, throw. 2 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 } 12 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 }