Bug 1217559 - Fix chrome overrides after new devtools files layout. r=jryans
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 28 Oct 2015 09:56:17 -0700
changeset 305118 961e078286dc3977319c2717ed4d0f6b94ed6f3d
parent 305117 d41522b5aed48941893f47d57c54e9cab6e5b5d1
child 305119 692d0ed9f9eb102efb136fff4dd9df4fdb16a2ea
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1217559
milestone44.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 1217559 - Fix chrome overrides after new devtools files layout. r=jryans
devtools/shared/Loader.jsm
--- a/devtools/shared/Loader.jsm
+++ b/devtools/shared/Loader.jsm
@@ -206,31 +206,30 @@ SrcdirProvider.prototype = {
   _writeManifest: function(srcDir) {
     let clientDir = OS.Path.join(srcDir, "devtools", "client");
     return this._readFile(OS.Path.join(clientDir, "jar.mn")).then((data) => {
       // The file data is contained within inputStream.
       // You can read it into a string with
       let entries = [];
       let lines = data.split(/\n/);
       let preprocessed = /^\s*\*/;
-      let contentEntry =
-        new RegExp("^\\s+content/(\\w+)/(\\S+)\\s+\\((\\S+)\\)");
+      let contentEntry = /^\s+content\/(\S+)\s+\((\S+)\)/;
       for (let line of lines) {
         if (preprocessed.test(line)) {
           dump("Unable to override preprocessed file: " + line + "\n");
           continue;
         }
         let match = contentEntry.exec(line);
         if (match) {
-          let pathComponents = match[3].split("/");
+          let pathComponents = match[2].split("/");
           pathComponents.unshift(clientDir);
           let path = OS.Path.join.apply(OS.Path, pathComponents);
           let uri = this.fileURI(path);
-          let entry = "override chrome://" + match[1] +
-                      "/content/" + match[2] + "\t" + uri;
+          let chromeURI = "chrome://devtools/content/" + match[1];
+          let entry = "override " + chromeURI + "\t" + uri;
           entries.push(entry);
         }
       }
       return this._writeFile(OS.Path.join(clientDir, "chrome.manifest"),
                              entries.join("\n"));
     }).then(() => {
       let clientDirFile = new FileUtils.File(clientDir);
       Components.manager.addBootstrappedManifestLocation(clientDirFile);