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

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:206b7b463d3a
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 }

mercurial