Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 }