Skip to content

Instantly share code, notes, and snippets.

@mixedpuppy
Created October 17, 2019 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mixedpuppy/ef4f5e1e4067390d67e61cdebeae4505 to your computer and use it in GitHub Desktop.
Save mixedpuppy/ef4f5e1e4067390d67e61cdebeae4505 to your computer and use it in GitHub Desktop.
diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -2328,17 +2328,18 @@ var AddonManagerInternal = {
topBrowser,
aInstallingPrincipal.URI,
aInstall
);
return;
} else if (
aInstallingPrincipal.isNullPrincipal ||
!aBrowser.contentPrincipal ||
- !aInstallingPrincipal.subsumes(aBrowser.contentPrincipal) ||
+ (!aBrowser.contentPrincipal.isNullPrincipal &&
+ !aInstallingPrincipal.subsumes(aBrowser.contentPrincipal)) ||
!this.isInstallAllowedByPolicy(
aInstallingPrincipal,
aInstall,
false /* explicit */
)
) {
aInstall.cancel();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment