Bug 1609760 - Stop assigning properties to the global `this` in ExtensionToolbarButtons.jsm. r=pmorris DONTBUILD
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 24 Apr 2020 13:52:24 +0300
changeset 38926 bf4e3f27671f31a5e26aaebfc5e3f8b15492e27f
parent 38925 a15a99bbf363b7478eb5cdad526e391b586189f0
child 38927 e4f4231ef04baf8869d3df9e3601c368bf951a65
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewerspmorris
bugs1609760
Bug 1609760 - Stop assigning properties to the global `this` in ExtensionToolbarButtons.jsm. r=pmorris DONTBUILD
mail/components/extensions/ExtensionToolbarButtons.jsm
--- a/mail/components/extensions/ExtensionToolbarButtons.jsm
+++ b/mail/components/extensions/ExtensionToolbarButtons.jsm
@@ -37,17 +37,17 @@ var { DefaultWeakMap, ExtensionError } =
 
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 XPCOMUtils.defineLazyGlobalGetters(this, ["InspectorUtils"]);
 
 var DEFAULT_ICON = "chrome://messenger/content/extension.svg";
 
-this.ToolbarButtonAPI = class extends ExtensionAPI {
+var ToolbarButtonAPI = class extends ExtensionAPI {
   constructor(extension, global) {
     super(extension);
     this.global = global;
     this.tabContext = new this.global.TabContext(target =>
       this.getContextData(null)
     );
   }