Bug 1398762 Fix unparseable host permission warning
MozReview-Commit-ID: B2YALdhEKJs
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -846,17 +846,20 @@ this.ExtensionData = class {
// First classify our host permissions
let allUrls = false, wildcards = new Set(), sites = new Set();
for (let permission of perms.origins) {
if (permission == "<all_urls>") {
allUrls = true;
break;
}
- let match = /^[htps*]+:\/\/([^/]+)\//.exec(permission);
+ if (permission.startsWith("moz-extension:")) {
+ continue;
+ }
+ let match = /^https?:\/\/([^/]+)\//.exec(permission);
if (!match) {
Cu.reportError(`Unparseable host permission ${permission}`);
continue;
}
if (match[1] == "*") {
allUrls = true;
} else if (match[1].startsWith("*.")) {
wildcards.add(match[1].slice(2));