Bug 1293002 - Replace in-tree consumer of non-standard Iterator() with Object.{values,entries} in mobile/. r=liuche
authorTuhina <tuhinatwyla@gmail.com>
Wed, 10 Aug 2016 02:01:20 +0530
changeset 400783 e336054c4c852458dc7a4b28e333212343f2bb61
parent 400782 eb1e3117f53c7c2a03d342a22db0e3f2f63c2fe7
child 400784 59055929012280084afd040bfdf4216083a7636a
push id26284
push usermwein@mozilla.com
push dateMon, 15 Aug 2016 20:48:20 +0000
reviewersliuche
bugs1293002
milestone51.0a1
Bug 1293002 - Replace in-tree consumer of non-standard Iterator() with Object.{values,entries} in mobile/. r=liuche
mobile/android/components/SessionStore.js
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -180,17 +180,17 @@ SessionStore.prototype = {
           this.flushPendingState();
         }
 
         break;
       case "browser:purge-session-history": // catch sanitization 
         this._clearDisk();
 
         // Clear all data about closed tabs
-        for (let [ssid, win] in Iterator(this._windows))
+        for (let [ssid, win] of Object.entries(this._windows))
           win.closedTabs = [];
 
         this._lastClosedTabIndex = -1;
 
         if (this._loadState == STATE_RUNNING) {
           // Save the purged state immediately
           this.saveState();
         } else if (this._loadState == STATE_QUITTING) {
@@ -295,17 +295,17 @@ SessionStore.prototype = {
         this._sendClosedTabsToJava(Services.wm.getMostRecentWindow("navigator:browser"));
         break;
       case "ClosedTabs:StopNotifications":
         this._notifyClosedTabs = false;
         log("ClosedTabs:StopNotifications");
         break;
       case "last-pb-context-exited":
         // Clear private closed tab data when we leave private browsing.
-        for (let [, window] in Iterator(this._windows)) {
+        for (let window of Object.values(this._windows)) {
           window.closedTabs = window.closedTabs.filter(tab => !tab.isPrivate);
         }
         this._lastClosedTabIndex = -1;
         break;
       case "Session:RestoreRecentTabs": {
         let data = JSON.parse(aData);
         this._restoreTabs(data);
         break;