Backed out changeset: 6eb5c2543073 because of mozmill failures. a=Paenglab
authorRichard Marti <richard.marti@gmail.com>
Sat, 27 Dec 2014 21:50:30 +0100
changeset 21547 9e3301977f89908a296346d3edc602821126ae28
parent 21546 6eb5c25430731f4c6dca17cad6df8f5629f7a775
child 21548 d9842ddc938bb841ce24eb4c3d8fa1b069eb962b
push id1305
push usermbanner@mozilla.com
push dateMon, 23 Feb 2015 19:48:12 +0000
treeherdercomm-beta@3ae4f13858fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPaenglab
Backed out changeset: 6eb5c2543073 because of mozmill failures. a=Paenglab
calendar/base/content/preferences/general.js
calendar/base/content/preferences/general.xul
calendar/base/content/preferences/timezones.js
calendar/base/content/preferences/timezones.xul
calendar/base/jar.mn
calendar/lightning/content/messenger-overlay-preferences.xul
calendar/lightning/content/suite-overlay-preferences.xul
calendar/lightning/jar.mn
calendar/locales/en-US/chrome/calendar/preferences/general.dtd
calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
calendar/locales/en-US/chrome/calendar/preferences/timezones.dtd
calendar/locales/jar.mn
mailnews/base/util/iteratorUtils.jsm
--- a/calendar/base/content/preferences/general.js
+++ b/calendar/base/content/preferences/general.js
@@ -1,16 +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/.
  */
 
-Components.utils.import("resource://calendar/modules/calUtils.jsm");
-
 /**
  * Global Object to hold methods for the general pref pane
  */
 var gCalendarGeneralPane = {
     /**
      * Initialize the general pref pane. Sets up dialog controls to match the
      * values set in prefs.
      */
@@ -26,43 +24,16 @@ var gCalendarGeneralPane = {
                 .setAttribute("label", labelLong + ": " + dateFormattedLong);
         document.getElementById("dateformat-short-menuitem")
                 .setAttribute("label", labelShort + ": " + dateFormattedShort);
 
         // deselect and reselect to update visible item title
         updateSelectedLabel("dateformat");
         updateUnitLabelPlural("defaultlength", "defaultlengthunit", "minutes");
         this.updateDefaultTodoDates();
-
-        let tzMenuList = document.getElementById("calendar-timezone-menulist");
-        let tzMenuPopup = document.getElementById("calendar-timezone-menupopup");
-
-        let tzService = cal.getTimezoneService();
-        let tzids = {};
-        let displayNames = [];
-        // don't rely on what order the timezone-service gives you
-        for (let tzid in fixIterator(tzService.timezoneIds)) {
-            let tz = tzService.getTimezone(tzid);
-            if (tz && !tz.isFloating && !tz.isUTC) {
-                let displayName = tz.displayName;
-                displayNames.push(displayName);
-                tzids[displayName] = tz.tzid;
-            }
-        }
-        // the display names need to be sorted
-        displayNames.sort(String.localeCompare);
-        for (let displayName of displayNames) {
-            addMenuItem(tzMenuPopup, displayName, tzids[displayName]);
-        }
-
-        let prefValue = document.getElementById("calendar-timezone-local").value;
-        if (!prefValue) {
-            prefValue = calendarDefaultTimezone().tzid;
-        }
-        tzMenuList.value = prefValue;
     },
 
     updateDefaultTodoDates: function gCGP_updateDefaultTodoDates() {
         let defaultDue = document.getElementById("default_task_due").value;
         let defaultStart = document.getElementById("default_task_start").value;
         let offsetValues = ["offsetcurrent", "offsetnexthour"];
 
         document.getElementById("default_task_due_offset")
@@ -75,8 +46,9 @@ var gCalendarGeneralPane = {
     },
 
     updateItemtypeDeck: function() {
         let panelId = document.getElementById("defaults-itemtype-menulist").value;
         let panel = document.getElementById(panelId);
         document.getElementById("defaults-itemtype-deck").selectedPanel = panel;
     }
 };
+
--- a/calendar/base/content/preferences/general.xul
+++ b/calendar/base/content/preferences/general.xul
@@ -14,38 +14,31 @@
 
 <overlay id="CalendarGeneralPaneOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
     <vbox id="calPreferencesBoxGeneral">
         <script type="application/javascript"
                 src="chrome://calendar/content/preferences/general.js"/>
         <script type="application/javascript"
-                src="chrome://calendar/content/preferences/timezones.js"/>
-        <script type="application/javascript"
                 src="chrome://calendar/content/calendar-ui-utils.js"/>
-        <script type="application/javascript"
-                src="chrome://calendar/content/calUtils.js"/>
 
         <!-- Get the localized text for use in the .js -->
         <script type="application/javascript">
             var labelLong  = "&pref.dateformat.long;";
             var labelShort = "&pref.dateformat.short;";
         </script>
 
         <preferences>
             <preference id="calendar.date.format"
                         name="calendar.date.format"
                         type="int"/>
             <preference id="calendar.event.defaultlength"
                         name="calendar.event.defaultlength"
                         type="int"/>
-            <preference id="calendar-timezone-local"
-                        name="calendar.timezone.local"
-                        type="string"/>
             <preference id="calendar.task.defaultstart"
                         name="calendar.task.defaultstart"
                         type="string"/>
             <preference id="calendar.task.defaultstartoffset"
                         name="calendar.task.defaultstartoffset"
                         type="int"/>
             <preference id="calendar.task.defaultstartoffsetunits"
                         name="calendar.task.defaultstartoffsetunits"
@@ -79,29 +72,27 @@
                         <menuitem id="dateformat-short-menuitem"
                                   label="&pref.dateformat.short;"
                                   value="1"/>
                     </menupopup>
                 </menulist>
             </hbox>
         </groupbox>
 
+#ifndef XP_MACOSX
         <groupbox>
-            <caption label="&pref.timezones.caption;"/>
+            <caption label="&pref.accessibility.label;"/>
             <hbox align="center">
-                <label value="&pref.timezones.label;"
-                       accesskey="&pref.timezones.accesskey;"
-                       control="calendar-timezone-menulist"/>
-                <menulist id="calendar-timezone-menulist"
-                          flex="1"
-                          preference="calendar-timezone-local">
-                    <menupopup id="calendar-timezone-menupopup"/>
-                </menulist>
+                <checkbox id="systemColors" pack="end"
+                          label="&pref.systemcolors.label;"
+                          accesskey="&pref.systemcolors.accesskey;"
+                          preference="calendar.view.useSystemColors"/>
             </hbox>
         </groupbox>
+#endif
 
         <groupbox id="defaults-itemtype-groupbox">
             <caption id="defaults-itemtype-caption" label="&pref.defaults.label;"/>
             <menulist id="defaults-itemtype-menulist" oncommand="gCalendarGeneralPane.updateItemtypeDeck()">
                 <menupopup id="defaults-itemtype-menupopup">
                     <menuitem id="defaults-itemtype-event"
                               label="&pref.events.label;"
                               value="defaults-event-grid"/>
@@ -245,22 +236,10 @@
                                     </menupopup>
                                 </menulist>
                             </hbox>
                         </row>
                     </rows>
                 </grid>
             </deck>
         </groupbox>
-
-#ifndef XP_MACOSX
-        <groupbox>
-            <caption label="&pref.accessibility.label;"/>
-            <hbox align="center">
-                <checkbox id="systemColors" pack="end"
-                          label="&pref.systemcolors.label;"
-                          accesskey="&pref.systemcolors.accesskey;"
-                          preference="calendar.view.useSystemColors"/>
-            </hbox>
-        </groupbox>
-#endif
     </vbox>
 </overlay>
new file mode 100644
--- /dev/null
+++ b/calendar/base/content/preferences/timezones.js
@@ -0,0 +1,45 @@
+/* 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/. */
+
+Components.utils.import("resource://calendar/modules/calUtils.jsm");
+
+/**
+ * Global Object to hold methods for the timezones dialog.
+ */
+var gTimezonesPane = {
+    /**
+     * Initialize the timezones pref pane. Sets up dialog controls to match the
+     * values set in prefs.
+     */
+    init: function gTP_init() {
+        var tzMenuList = document.getElementById("calendar-timezone-menulist");
+        var tzMenuPopup = document.getElementById("calendar-timezone-menupopup");
+
+        var tzService = cal.getTimezoneService();
+        var enumerator = tzService.timezoneIds;
+        var tzids = {};
+        var displayNames = [];
+        // don't rely on what order the timezone-service gives you
+        while (enumerator.hasMore()) {
+            var tz = tzService.getTimezone(enumerator.getNext());
+            if (tz && !tz.isFloating && !tz.isUTC) {
+                var displayName = tz.displayName;
+                displayNames.push(displayName);
+                tzids[displayName] = tz.tzid;
+            }
+        }
+        // the display names need to be sorted
+        displayNames.sort(String.localeCompare);
+        for (var i = 0; i < displayNames.length; ++i) {
+            var displayName = displayNames[i];
+            addMenuItem(tzMenuPopup, displayName, tzids[displayName]);
+        }
+
+        var prefValue = document.getElementById("calendar-timezone-local").value;
+        if (!prefValue) {
+            prefValue = calendarDefaultTimezone().tzid;
+        }
+        tzMenuList.value = prefValue;
+    }
+};
new file mode 100644
--- /dev/null
+++ b/calendar/base/content/preferences/timezones.xul
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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/. -->
+
+<!DOCTYPE overlay SYSTEM "chrome://calendar/locale/preferences/timezones.dtd">
+
+<overlay id="TimezonesPaneOverlay"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+    <vbox id="calPreferencesBoxTimezones">
+        <script type="application/javascript"
+                src="chrome://calendar/content/preferences/timezones.js"/>
+        <script type="application/javascript"
+                src="chrome://calendar/content/calendar-ui-utils.js"/>
+        <script type="application/javascript"
+                src="chrome://calendar/content/calUtils.js"/>
+
+        <preferences>
+            <preference id="calendar-timezone-local"
+                        name="calendar.timezone.local"
+                        type="string"/>
+        </preferences>
+
+        <groupbox>
+            <caption label="&pref.calendar.timezones.list.caption;"/>
+
+            <menulist id="calendar-timezone-menulist"
+                      preference="calendar-timezone-local">
+                <menupopup id="calendar-timezone-menupopup"/>
+            </menulist>
+        </groupbox>
+
+    </vbox>
+</overlay>
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -86,16 +86,18 @@ calendar.jar:
     content/calendar/preferences/alarms.xul                (content/preferences/alarms.xul)
     content/calendar/preferences/alarms.js                 (content/preferences/alarms.js)
     content/calendar/preferences/categories.xul            (content/preferences/categories.xul)
     content/calendar/preferences/categories.js             (content/preferences/categories.js)
     content/calendar/preferences/editCategory.xul          (content/preferences/editCategory.xul)
     content/calendar/preferences/editCategory.js           (content/preferences/editCategory.js)
     content/calendar/preferences/general.js                (content/preferences/general.js)
 *   content/calendar/preferences/general.xul               (content/preferences/general.xul)
+    content/calendar/preferences/timezones.js              (content/preferences/timezones.js)
+    content/calendar/preferences/timezones.xul             (content/preferences/timezones.xul)
     content/calendar/preferences/views.js                  (content/preferences/views.js)
     content/calendar/preferences/views.xul                 (content/preferences/views.xul)
     content/calendar/widgets/minimonth.xml                 (content/widgets/minimonth.xml)
     content/calendar/widgets/calendar-alarm-widget.xml     (content/widgets/calendar-alarm-widget.xml)
     content/calendar/widgets/calendar-widgets.xml          (content/widgets/calendar-widgets.xml)
     content/calendar/widgets/calendar-list-tree.xml        (content/widgets/calendar-list-tree.xml)
     content/calendar/calendar-subscriptions-list.xml       (content/widgets/calendar-subscriptions-list.xml)
     content/calendar/widgets/calendar-widget-bindings.css  (content/widgets/calendar-widget-bindings.css)
--- a/calendar/lightning/content/messenger-overlay-preferences.xul
+++ b/calendar/lightning/content/messenger-overlay-preferences.xul
@@ -11,52 +11,57 @@
     %preferencesDTD;
 ]>
 
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css"?>
 
 <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
     <prefwindow id="MailPreferences">
-        <prefpane id="paneLightning"
+        <prefpane id="paneLightning" 
                   label="&lightning.preferencesLabel;"
-                  onpaneload="gCalendarGeneralPane.init(); gAlarmsPane.init();
+                  onpaneload="gCalendarGeneralPane.init(); gAlarmsPane.init(); 
                               gCategoriesPane.init(); gViewsPane.init();
-                              gLightningPane.init();">
+                              gTimezonesPane.init(); gLightningPane.init();">
             <preferences>
                 <preference id="calendar.preferences.lightning.selectedTabIndex"
                             name="calendar.preferences.lightning.selectedTabIndex"
                             type="int"/>
             </preferences>
-            <tabbox id="calPreferencesTabbox"
-                    flex="1"
+            <tabbox id="calPreferencesTabbox" 
+                    flex="1" 
                     onselect="gLightningPane.tabSelectionChanged();">
                 <tabs>
                     <tab id="calPreferencesTabGeneral"
                          label="&paneGeneral.title;"/>
                     <tab id="calPreferencesTabAlarms"
                          label="&paneAlarms.title;"/>
                     <tab id="calPreferencesTabCategories"
                          label="&paneCategories.title;"/>
                     <tab id="calPreferencesTabViews"
                          label="&paneViews.title;"/>
+                    <tab id="calPreferencesTabTimezones"
+                         label="&paneTimezones.title;"/>
                 </tabs>
                 <tabpanels flex="1">
                     <tabpanel orient="vertical">
                         <vbox id="calPreferencesBoxGeneral"/>
                     </tabpanel>
                     <tabpanel orient="vertical">
                         <vbox id="calPreferencesBoxAlarms"/>
                     </tabpanel>
                     <tabpanel orient="vertical">
                         <vbox id="calPreferencesBoxCategories"/>
                     </tabpanel>
                     <tabpanel orient="vertical">
                         <vbox id="calPreferencesBoxViews"/>
                     </tabpanel>
+                    <tabpanel orient="vertical">
+                        <vbox id="calPreferencesBoxTimezones"/>
+                    </tabpanel>
                 </tabpanels>
             </tabbox>
         </prefpane>
 
         <script type="application/javascript"
                 src="chrome://calendar/content/calUtils.js"/>
         <script type="application/javascript"
                 src="chrome://lightning/content/messenger-overlay-preferences.js"/>
--- a/calendar/lightning/content/suite-overlay-preferences.xul
+++ b/calendar/lightning/content/suite-overlay-preferences.xul
@@ -2,16 +2,17 @@
 
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css"?>
 
 <?xul-overlay href="chrome://calendar/content/preferences/general.xul"?>
+<?xul-overlay href="chrome://calendar/content/preferences/timezones.xul"?>
 <?xul-overlay href="chrome://calendar/content/preferences/alarms.xul"?>
 <?xul-overlay href="chrome://calendar/content/preferences/categories.xul"?>
 <?xul-overlay href="chrome://calendar/content/preferences/views.xul"?>
 
 <!DOCTYPE overlay [
     <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
     %lightningDTD;
     <!ENTITY % preferencesDTD SYSTEM "chrome://calendar/locale/preferences/preferences.dtd">
@@ -38,18 +39,19 @@
                           prefpane="paneLightningViews"/>
             </treechildren>
         </treeitem>
     </treechildren>
 
     <prefwindow id="prefDialog">
         <prefpane id="paneLightning"
                   label="&lightning.preferencesLabel;"
-                  onpaneload="gCalendarGeneralPane.init();">
+                  onpaneload="gCalendarGeneralPane.init(); gTimezonesPane.init();">
             <vbox id="calPreferencesBoxGeneral"/>
+            <vbox id="calPreferencesBoxTimezones"/>
         </prefpane>
         <prefpane id="paneLightningAlarms"
                   label="&paneAlarms.title;"
                   onpaneload="gAlarmsPane.init();">
             <vbox id="calPreferencesBoxAlarms"/>
         </prefpane>
         <prefpane id="paneLightningCategories"
                   label="&paneCategories.title;"
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -14,16 +14,17 @@ lightning.jar:
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/imip-bar-overlay.xul
 % overlay chrome://communicator/content/pref/preferences.xul chrome://lightning/content/suite-overlay-preferences.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay about:addons chrome://lightning/content/suite-overlay-addons.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://mozapps/content/extensions/extensions.xul chrome://lightning/content/suite-overlay-addons.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://lightning/content/messenger-overlay-preferences.xul
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/alarms.xul
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/categories.xul
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/general.xul
+% overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/timezones.xul
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/views.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/calendar-unifinder.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/calendar-unifinder-todo.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/calendar-task-view.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/today-pane.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/suite-overlay-sidebar.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://lightning/content/lightning-standalone.xul chrome://lightning/content/messenger-overlay-sidebar.xul
 % overlay chrome://calendar/content/calendarCreation.xul chrome://lightning/content/lightning-calendar-creation.xul
--- a/calendar/locales/en-US/chrome/calendar/preferences/general.dtd
+++ b/calendar/locales/en-US/chrome/calendar/preferences/general.dtd
@@ -8,20 +8,16 @@
   -->
 
 <!ENTITY pref.mainbox.label "General Settings" >
 <!ENTITY pref.dateformat.label "Date Text Format:" >
 <!ENTITY pref.dateformat.accesskey "D">
 <!ENTITY pref.dateformat.long "Long" >
 <!ENTITY pref.dateformat.short "Short"  >
 
-<!ENTITY pref.timezones.caption "Timezone">
-<!ENTITY pref.timezones.label "Select the closest city in your timezone:">
-<!ENTITY pref.timezones.accesskey "S">
-
 <!ENTITY pref.defaults.label "Default Values for New Items">
 <!ENTITY pref.events.label "Events">
 <!ENTITY pref.tasks.label "Tasks">
 
 <!ENTITY pref.default_event_length.label "Default Length:" >
 <!ENTITY pref.default_event_length.accesskey "E">
 
 <!ENTITY pref.default_task_none.label "None">
--- a/calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
+++ b/calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
@@ -1,8 +1,9 @@
 <!-- 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/. -->
 
 <!ENTITY  paneGeneral.title       "General">
 <!ENTITY  paneAlarms.title        "Reminders">
 <!ENTITY  paneCategories.title    "Categories">
 <!ENTITY  paneViews.title         "Views">
+<!ENTITY  paneTimezones.title     "Timezone">
new file mode 100644
--- /dev/null
+++ b/calendar/locales/en-US/chrome/calendar/preferences/timezones.dtd
@@ -0,0 +1,5 @@
+<!-- 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/. -->
+
+<!ENTITY pref.calendar.timezones.list.caption "Select the closest city in your timezone:">
--- a/calendar/locales/jar.mn
+++ b/calendar/locales/jar.mn
@@ -25,12 +25,13 @@ calendar-@AB_CD@.jar:
     locale/@AB_CD@/calendar/migration.properties           (%chrome/calendar/migration.properties)
     locale/@AB_CD@/calendar/provider-uninstall.dtd         (%chrome/calendar/provider-uninstall.dtd)
     locale/@AB_CD@/calendar/timezones.properties           (%chrome/calendar/timezones.properties)
     locale/@AB_CD@/calendar/wcap.properties                (%chrome/calendar/providers/wcap/wcap.properties)
     locale/@AB_CD@/calendar/preferences/alarms.dtd         (%chrome/calendar/preferences/alarms.dtd)
     locale/@AB_CD@/calendar/preferences/categories.dtd     (%chrome/calendar/preferences/categories.dtd)
     locale/@AB_CD@/calendar/preferences/general.dtd        (%chrome/calendar/preferences/general.dtd)
     locale/@AB_CD@/calendar/preferences/preferences.dtd    (%chrome/calendar/preferences/preferences.dtd)
+    locale/@AB_CD@/calendar/preferences/timezones.dtd      (%chrome/calendar/preferences/timezones.dtd)
     locale/@AB_CD@/calendar/preferences/views.dtd          (%chrome/calendar/preferences/views.dtd)
     locale/@AB_CD@/calendar/dialogs/calendar-event-dialog-reminder.dtd  (%chrome/calendar/dialogs/calendar-event-dialog-reminder.dtd)
     locale/@AB_CD@/calendar/calendar-event-dialog-attendees.properties  (%chrome/calendar/calendar-event-dialog-attendees.properties)
     locale/@AB_CD@/calendar/calendar-extract.properties  (%chrome/calendar/calendar-extract.properties)
--- a/mailnews/base/util/iteratorUtils.jsm
+++ b/mailnews/base/util/iteratorUtils.jsm
@@ -104,25 +104,16 @@ function fixIterator(aEnum, aIface) {
     let iter = function() {
       let count = aEnum.Count();
       for (let i = 0; i < count; i++)
         yield aEnum.QueryElementAt(i, face);
     }
     return { __iterator__: iter };
   }
 
-  // How about nsIStringEnumerator or nsIUTF8StringEnumerator?
-  if (aEnum instanceof Ci.nsIStringEnumerator || aEnum instanceof Ci.nsIUTF8StringEnumerator) {
-    let iter = function() {
-      while (aEnum.hasMore())
-        yield aEnum.getNext();
-    };
-    return { __iterator__: iter };
-  }
-
   // How about nsISimpleEnumerator? This one is nice and simple.
   if (aEnum instanceof Ci.nsISimpleEnumerator) {
     let iter = function () {
       while (aEnum.hasMoreElements())
         yield aEnum.getNext().QueryInterface(face);
     }
     return { __iterator__: iter };
   }