Bug 1384389 - Test browser_all_files_referenced.js should extract URIs for all registered resource packages from libxul binary, r=Gijs.

This commit is contained in:
Florian Quèze 2018-01-04 12:38:22 +01:00
parent 9e56f4062f
commit a085d64856

View File

@ -365,7 +365,7 @@ function parseCodeFile(fileUri) {
let baseUri;
for (let line of data.split("\n")) {
let urls =
line.match(/["'`]chrome:\/\/[a-zA-Z0-9 -]+\/(content|skin|locale)\/[^"'` ]*["'`]/g);
line.match(/["'`]chrome:\/\/[a-zA-Z0-9-]+\/(content|skin|locale)\/[^"'` ]*["'`]/g);
if (!urls) {
urls = line.match(/["']resource:\/\/[^"']+["']/g);
if (urls && isDevtools &&
@ -521,9 +521,8 @@ function findChromeUrlsFromArray(array, prefix) {
}
// Only keep strings that look like real chrome or resource urls.
if (/chrome:\/\/[a-zA-Z09 -]+\/(content|skin|locale)\//.test(string) ||
/resource:\/\/gre.*\.[a-z]+/.test(string) ||
string.startsWith("resource://content-accessible/"))
if (/chrome:\/\/[a-zA-Z09-]+\/(content|skin|locale)\//.test(string) ||
/resource:\/\/[a-zA-Z09-]*\/.*\.[a-z]+/.test(string))
gReferencesFromCode.set(string, null);
}
}