Bug 902421 - Add correct paths to the SrcdirProvider. r=dcamp
authorJ. Ryan Stinnett <jryans@gmail.com>
Fri, 20 Sep 2013 16:22:48 -0500
changeset 148263 4ef38d3cfbe26c9b9b49c1c0d1dee236c9eafe5b
parent 148262 0cd9c60fd6749232a4e970c2e2cf3de979f1f307
child 148264 1770589caa8ba8a0a4849762645a77abee3d4b55
push id25332
push usercbook@mozilla.com
push dateMon, 23 Sep 2013 11:07:56 +0000
treeherdermozilla-central@00bf153a66e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs902421
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 902421 - Add correct paths to the SrcdirProvider. r=dcamp
toolkit/devtools/Loader.jsm
--- a/toolkit/devtools/Loader.jsm
+++ b/toolkit/devtools/Loader.jsm
@@ -45,28 +45,29 @@ let loaderGlobals = {
 var BuiltinProvider = {
   load: function() {
     this.loader = new loader.Loader({
       modules: {
         "toolkit/loader": loader,
         "source-map": SourceMap,
       },
       paths: {
+        // When you add a line to this mapping, don't forget to make a
+        // corresponding addition to the SrcdirProvider mapping below as well.
         "": "resource://gre/modules/commonjs/",
         "main": "resource:///modules/devtools/main.js",
         "devtools": "resource:///modules/devtools",
         "devtools/server": "resource://gre/modules/devtools/server",
         "devtools/toolkit/webconsole": "resource://gre/modules/devtools/toolkit/webconsole",
         "devtools/app-actor-front": "resource://gre/modules/devtools/app-actor-front.js",
         "devtools/styleinspector/css-logic": "resource://gre/modules/devtools/styleinspector/css-logic",
         "devtools/css-color": "resource://gre/modules/devtools/css-color",
         "devtools/client": "resource://gre/modules/devtools/client",
 
-        "escodegen/escodegen": "resource://gre/modules/devtools/escodegen/escodegen",
-        "escodegen/package.json": "resource://gre/modules/devtools/escodegen/package.json",
+        "escodegen": "resource://gre/modules/devtools/escodegen",
         "estraverse": "resource://gre/modules/devtools/escodegen/estraverse",
 
         // Allow access to xpcshell test items from the loader.
         "xpcshell-test": "resource://test"
       },
       globals: loaderGlobals
     });
 
@@ -88,38 +89,44 @@ var SrcdirProvider = {
     return Services.io.newFileURI(file).spec;
   },
 
   load: function() {
     let srcdir = Services.prefs.getComplexValue("devtools.loader.srcdir",
                                                 Ci.nsISupportsString);
     srcdir = OS.Path.normalize(srcdir.data.trim());
     let devtoolsDir = OS.Path.join(srcdir, "browser", "devtools");
+    let toolkitDir = OS.Path.join(srcdir, "toolkit", "devtools");
+    let mainURI = this.fileURI(OS.Path.join(devtoolsDir, "main.js"));
     let devtoolsURI = this.fileURI(devtoolsDir);
-    let toolkitURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools"));
-    let serverURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "server"));
-    let webconsoleURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "webconsole"));
-    let appActorURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "apps", "app-actor-front.js"));
-    let cssLogicURI = this.fileURI(OS.Path.join(toolkitURI, "styleinspector", "css-logic"));
-    let clientURI = this.fileURI(OS.Path.join(srcdir, "toolkit", "devtools", "client"));
-    let mainURI = this.fileURI(OS.Path.join(srcdir, "browser", "devtools", "main.js"));
+    let serverURI = this.fileURI(OS.Path.join(toolkitDir, "server"));
+    let webconsoleURI = this.fileURI(OS.Path.join(toolkitDir, "webconsole"));
+    let appActorURI = this.fileURI(OS.Path.join(toolkitDir, "apps", "app-actor-front.js"));
+    let cssLogicURI = this.fileURI(OS.Path.join(toolkitDir, "styleinspector", "css-logic"));
+    let cssColorURI = this.fileURI(OS.Path.join(toolkitDir, "css-color"));
+    let clientURI = this.fileURI(OS.Path.join(toolkitDir, "client"));
+    let escodegenURI = this.fileURI(OS.Path.join(toolkitDir, "escodegen"));
+    let estraverseURI = this.fileURI(OS.Path.join(toolkitDir, "escodegen", "estraverse"));
     this.loader = new loader.Loader({
       modules: {
         "toolkit/loader": loader,
         "source-map": SourceMap,
       },
       paths: {
         "": "resource://gre/modules/commonjs/",
+        "main": mainURI,
+        "devtools": devtoolsURI,
         "devtools/server": serverURI,
         "devtools/toolkit/webconsole": webconsoleURI,
         "devtools/app-actor-front": appActorURI,
+        "devtools/styleinspector/css-logic": cssLogicURI,
+        "devtools/css-color": cssColorURI,
         "devtools/client": clientURI,
-        "devtools": devtoolsURI,
-        "devtools/styleinspector/css-logic": cssLogicURI,
-        "main": mainURI
+        "escodegen": escodegenURI,
+        "estraverse": estraverseURI
       },
       globals: loaderGlobals
     });
 
     return this._writeManifest(devtoolsDir).then(null, Cu.reportError);
   },
 
   unload: function(reason) {