Bug 1295324 r=kmag a=al,ritu
authorAndrew Swan <aswan@mozilla.com>
Fri, 07 Oct 2016 11:20:12 -0700
changeset 358251 181a64b1364bfe92006cb772258a8b43d7d83e7d
parent 358250 c08442f25ba3d601ac50c0b2294e483d6cbf531f
child 358252 7a32205a14838d3f5e1ceb9fd5cdd6d0368fc451
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, al, ritu
bugs1295324
milestone51.0a2
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
@@ -122,16 +122,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;
     }