Bug 1295324 r=kmag a=al,ritu
authorAndrew Swan <aswan@mozilla.com>
Fri, 07 Oct 2016 11:20:12 -0700
changeset 428762 e6bc67cc7d76b0f040220663aac7a208cebedba5
parent 428761 9f5ef22fc76fcfe7cdd48ab0e6cf8733e4279f30
child 428763 7e1133eb4dbe8a4aebc2d5f648fb877494b01b83
push id33416
push userpaul@paul.cx
push dateMon, 24 Oct 2016 16:26:20 +0000
reviewerskmag, al, ritu
bugs1295324
milestone50.0
Bug 1295324 r=kmag a=al,ritu MozReview-Commit-ID: GN4Bc8RZQBn
toolkit/components/extensions/ExtensionContent.jsm
--- a/toolkit/components/extensions/ExtensionContent.jsm
+++ b/toolkit/components/extensions/ExtensionContent.jsm
@@ -183,16 +183,23 @@ Script.prototype = {
       urls.push(url);
     }
 
     return urls;
   },
 
   matches(window) {
     let uri = window.document.documentURIObject;
+
+    // If mozAddonManager is present on this page, don't allow
+    // content scripts.
+    if (window.navigator.mozAddonManager !== undefined) {
+      return false;
+    }
+
     if (!(this.matches_.matches(uri) || this.matches_host_.matchesIgnoringPath(uri))) {
       return false;
     }
 
     if (this.exclude_matches_.matches(uri)) {
       return false;
     }