Bug 1343498: Don't fail on unparseable host permissions r?kmag
MozReview-Commit-ID: BHIzjjz23N7
--- a/browser/modules/ExtensionsUI.jsm
+++ b/browser/modules/ExtensionsUI.jsm
@@ -242,17 +242,18 @@ this.ExtensionsUI = {
let allUrls = false, wildcards = [], sites = [];
for (let permission of perms.origins) {
if (permission == "<all_urls>") {
allUrls = true;
break;
}
let match = /^[htps*]+:\/\/([^/]+)\//.exec(permission);
if (!match) {
- throw new Error("Unparseable host permission");
+ Cu.reportError(`Unparseable host permission ${permission}`);
+ continue;
}
if (match[1] == "*") {
allUrls = true;
} else if (match[1].startsWith("*.")) {
wildcards.push(match[1].slice(2));
} else {
sites.push(match[1]);
}