Bug 1003095 - Make the xpcInspector a built-in module;r=past

This commit is contained in:
Eddy Bruel 2014-05-21 15:55:53 +02:00
Родитель 3b6680ebe7
Коммит 9b8ea57c44
3 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -30,6 +30,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", "resource://gre/modules/Fil
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console", "resource://gre/modules/devtools/Console.jsm");
let xpcInspector = Cc["@mozilla.org/jsinspector;1"].getService(Ci.nsIJSInspector);
let loader = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader;
let promise = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
@ -64,6 +66,7 @@ BuiltinProvider.prototype = {
"Services": Object.create(Services),
"Timer": Object.create(Timer),
"toolkit/loader": loader,
"xpcInspector": xpcInspector,
},
paths: {
// When you add a line to this mapping, don't forget to make a
@ -149,6 +152,7 @@ SrcdirProvider.prototype = {
"Services": Object.create(Services),
"Timer": Object.create(Timer),
"toolkit/loader": loader,
"xpcInspector": xpcInspector,
},
paths: {
"": "resource://gre/modules/commonjs/",

Просмотреть файл

@ -222,7 +222,7 @@ var DebuggerServer = {
return;
}
this.xpcInspector = Cc["@mozilla.org/jsinspector;1"].getService(Ci.nsIJSInspector);
this.xpcInspector = require("xpcInspector");
this.initTransport(aAllowConnectionCallback);
this._initialized = true;

Просмотреть файл

@ -342,6 +342,8 @@ if (typeof Components === "object") {
const chrome = { CC: Function.bind.call(CC, Components), Cc: Cc,
ChromeWorker: ChromeWorker, Cm: Cm, Ci: Ci, Cu: Cu,
Cr: Cr, components: Components };
const xpcInspector = Cc["@mozilla.org/jsinspector;1"].
getService(Ci.nsIJSInspector);
this.worker = new WorkerDebuggerLoader({
createSandbox: createSandbox,
@ -355,6 +357,7 @@ if (typeof Components === "object") {
"Timer": Object.create(Timer),
"chrome": chrome,
"source-map": SourceMap,
"xpcInspector": xpcInspector,
},
paths: {
"": "resource://gre/modules/commonjs/",