Bug 1207491 - Part 3: Remove use of expression closure from browser/components/customizableui/content/. r=Gijs
authorTooru Fujisawa <arai_a@mac.com>
Wed, 23 Sep 2015 18:36:20 +0900
changeset 297874 b87fee73b0a0ae85fe76d206c5086c3650291222
parent 297873 743f5d1969fef59b466082b0c9da5a58b7975d37
child 297875 73d3b4ffc5e63d36cbb2b6a30d7375f1c74eec5e
push id5392
push userraliiev@mozilla.com
push dateMon, 14 Dec 2015 20:08:23 +0000
treeherdermozilla-beta@16ce8562a975 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1207491
milestone44.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 1207491 - Part 3: Remove use of expression closure from browser/components/customizableui/content/. r=Gijs
browser/components/customizableui/content/panelUI.js
browser/components/customizableui/content/toolbar.xml
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -12,17 +12,19 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/ShortcutUtils.jsm");
 
 /**
  * Maintains the state and dispatches events for the main menu panel.
  */
 
 const PanelUI = {
   /** Panel events that we listen for. **/
-  get kEvents() ["popupshowing", "popupshown", "popuphiding", "popuphidden"],
+  get kEvents() {
+    return ["popupshowing", "popupshown", "popuphiding", "popuphidden"];
+  },
   /**
    * Used for lazily getting and memoizing elements from the document. Lazy
    * getters are set in init, and memoizing happens after the first retrieval.
    */
   get kElements() {
     return {
       contents: "PanelUI-contents",
       mainView: "PanelUI-mainView",
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -283,17 +283,19 @@
       </destructor>
 
       <field name="_inactiveTimeout">null</field>
 
       <field name="_contextMenuListener"><![CDATA[({
         toolbar: this,
         contextMenu: null,
 
-        get active () !!this.contextMenu,
+        get active () {
+          return !!this.contextMenu;
+        },
 
         init: function (event) {
           let node = event.target;
           while (node != this.toolbar) {
             if (node.localName == "menupopup")
               return;
             node = node.parentNode;
           }