Bug 1439142 - Fix eslint errors for no-define-cc-etc and no-compare-against-boolean-literals in common. r=philipp
authorMakeMyDay <makemyday@gmx-topmail.de>
Sat, 17 Feb 2018 20:27:48 +0100
changeset 31137 4644f1f698d895f4f0fdc3db53e891f5479f9868
parent 31136 6bb845d0c8fcabdb4d3ba872c38f113f4caeaf56
child 31138 51c1c477a92610012d7dfadc66a4065f9e994150
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersphilipp
bugs1439142
Bug 1439142 - Fix eslint errors for no-define-cc-etc and no-compare-against-boolean-literals in common. r=philipp
common/bindings/preferences.xml
common/src/extensionSupport.jsm
--- a/common/bindings/preferences.xml
+++ b/common/bindings/preferences.xml
@@ -804,17 +804,17 @@
           // Panel loaded, synthesize a load event.
           try {
             var event = document.createEvent("Events");
             event.initEvent(aEventName, true, true);
             var cancel = !aTarget.dispatchEvent(event);
             if (aTarget.hasAttribute("on" + aEventName)) {
               var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
               var rv = fn.call(aTarget, event);
-              if (rv == false)
+              if (!rv)
                 cancel = true;
             }
             return !cancel;
           } catch (e) {
             Components.utils.reportError(e);
           }
           return false;
         ]]>
--- a/common/src/extensionSupport.jsm
+++ b/common/src/extensionSupport.jsm
@@ -1,18 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = [ "extensionDefaults" ];
 
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 // ChromeUtils.import("resource://gre/modules/Deprecated.jsm") - needed for warning.
 ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 ChromeUtils.import("resource:///modules/IOUtils.js");
 
 /**