basilisk -jsdebugger - Import Console.jsm before calling console.[something]

https://github.com/MoonchildProductions/moebius/pull/250
This commit is contained in:
janekptacijarabaci
2018-02-28 15:12:38 +01:00
committed by Roy Tam
parent 89e59d4f24
commit 8d210f18c8
+2
View File
@@ -104,12 +104,14 @@ DevToolsStartup.prototype = {
return Services.prefs.getBoolPref(pref);
});
} catch (ex) {
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
console.error(ex);
return false;
}
if (!remoteDebuggingEnabled) {
let errorMsg = "Could not run chrome debugger! You need the following " +
"prefs to be set to true: " + kDebuggerPrefs.join(", ");
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
console.error(new Error(errorMsg));
// Dump as well, as we're doing this from a commandline, make sure people
// don't miss it: