Bug 1069416 - Part 5: Remove JS_HAS_SYMBOLS from CustomizableUI.jsm. r=Unfocused
authorTooru Fujisawa <arai_a@mac.com>
Wed, 28 Jan 2015 13:06:37 +0900
changeset 239554 670fb41e2cc46ee2f98fcd372da54308b152319f
parent 239553 5af5deffe0cfaafdd92e4a29e6165f43303743d2
child 239555 1c34cc2fa5d9d09feedb676976e7a59708c47170
push id500
push userjoshua.m.grant@gmail.com
push dateThu, 29 Jan 2015 01:48:36 +0000
reviewersUnfocused
bugs1069416
milestone38.0a1
Bug 1069416 - Part 5: Remove JS_HAS_SYMBOLS from CustomizableUI.jsm. r=Unfocused
browser/components/customizableui/CustomizableUI.jsm
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -46,23 +46,16 @@ const kPrefWebIDEInNavbar            = "
  * of providing onViewShowing and onViewHiding event handlers.
  */
 const kSubviewEvents = [
   "ViewShowing",
   "ViewHiding"
 ];
 
 /**
- * The method name to use for ES6 iteration. If Symbols are enabled in
- * this build, use Symbol.iterator; otherwise "@@iterator".
- */
-const JS_HAS_SYMBOLS = typeof Symbol === "function";
-const kIteratorSymbol = JS_HAS_SYMBOLS ? Symbol.iterator : "@@iterator";
-
-/**
  * The current version. We can use this to auto-add new default widgets as necessary.
  * (would be const but isn't because of testing purposes)
  */
 let kVersion = 4;
 
 /**
  * gPalette is a map of every widget that CustomizableUI.jsm knows about, keyed
  * on their IDs.
@@ -2705,17 +2698,17 @@ this.CustomizableUI = {
 
 
   /**
    * An iteratable property of windows managed by CustomizableUI.
    * Note that this can *only* be used as an iterator. ie:
    *     for (let window of CustomizableUI.windows) { ... }
    */
   windows: {
-    *[kIteratorSymbol]() {
+    *[Symbol.iterator]() {
       for (let [window,] of gBuildWindows)
         yield window;
     }
   },
 
   /**
    * Add a listener object that will get fired for various events regarding
    * customization.