Bug 1217559 - Fix chrome overrides after new devtools files layout. r=jryans

This commit is contained in:
Alexandre Poirot 2015-10-28 09:56:17 -07:00
Родитель d98ea6a4ba
Коммит 8163078f99
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -211,8 +211,7 @@ SrcdirProvider.prototype = {
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");
@ -220,12 +219,12 @@ SrcdirProvider.prototype = {
}
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);
}
}