Bug 1265447 - Silence startup JavaScript strict warning in resource://gre/modules/addons/XPIProvider.jsm. r=rhelmer
authorJonathan Watt <jwatt@jwatt.org>
Wed, 13 Apr 2016 14:13:25 +0100
changeset 293881 2da0c84c972a7b103d5507ea29956d704389bdd4
parent 293880 7df73cfe3c2f558242b806c6ae021dd363efebc5
child 293882 0c83c41da3fdc4f0a75e077c03ed3cf60e6ff370
push id30194
push usercbook@mozilla.com
push dateWed, 20 Apr 2016 09:50:56 +0000
treeherdermozilla-central@f05a1242fb29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1265447
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265447 - Silence startup JavaScript strict warning in resource://gre/modules/addons/XPIProvider.jsm. r=rhelmer
toolkit/mozapps/extensions/internal/XPIProvider.jsm
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -7364,18 +7364,18 @@ Object.assign(PrivateWrapper.prototype, 
   /**
    * Defines a global context to be used in the console
    * of the add-on debugging window.
    *
    * @param  global
    *         The object to set as global context. Must be a window object.
    */
   setDebugGlobal(global) {
-    let activeAddon;
-    if (activeAddon = XPIProvider.activeAddons.get(this.id)) {
+    let activeAddon = XPIProvider.activeAddons.get(this.id);
+    if (activeAddon) {
       activeAddon.debugGlobal = global;
     }
   }
 });
 
 function chooseValue(aAddon, aObj, aProp) {
   let repositoryAddon = aAddon._repositoryAddon;
   let objValue = aObj[aProp];