Let the debugger server started by GCLI debug chrome code (bug 1170495). r=ochameau,jwalker

This commit is contained in:
Panos Astithas 2015-06-02 14:01:37 +03:00
parent 7dedc9cdc3
commit 03787104ca
2 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ XPCOMUtils.defineLazyGetter(this, "debuggerServer", () => {
let debuggerServer = serverLoader.DebuggerServer;
debuggerServer.init();
debuggerServer.addBrowserActors();
debuggerServer.allowChromeProcess = !l10n.hiddenByChromePref();
return debuggerServer;
});

View File

@ -22,7 +22,7 @@ var Cu = require('chrome').Cu;
var prefSvc = Cc['@mozilla.org/preferences-service;1']
.getService(Ci.nsIPrefService);
var prefBranch = prefSvc.getBranch(null).QueryInterface(Ci.nsIPrefBranch2);
var prefBranch = prefSvc.getBranch(null).QueryInterface(Ci.nsIPrefBranch);
var Services = Cu.import('resource://gre/modules/Services.jsm', {}).Services;
var stringBundle = Services.strings.createBundle(
@ -75,5 +75,5 @@ exports.lookupFormat = function(name, swaps) {
* </pre>
*/
exports.hiddenByChromePref = function() {
return !prefBranch.prefHasUserValue('devtools.chrome.enabled');
return !prefBranch.getBoolPref('devtools.chrome.enabled');
};