Bug 909048 - Don't set "index" property on session history when not needed (r=ttaubert)
authorBill McCloskey <wmccloskey@mozilla.com>
Fri, 18 Oct 2013 10:08:54 -0700
changeset 166136 7038db0036610051b4809367ca3677801138a186
parent 166135 c7bb7ba8d9a02d7babf79e3a45042151252f8488
child 166137 3ecc91f4f6db0bd24b96e2123b468e879fb0e462
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs909048
milestone27.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 909048 - Don't set "index" property on session history when not needed (r=ttaubert)
browser/components/sessionstore/src/SessionStore.jsm
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -4254,17 +4254,19 @@ let TabState = {
       // Collect basic tab data, without session history and storage.
       let options = {omitSessionHistory: true,
                      omitSessionStorage: true,
                      omitDocShellCapabilities: true};
       let tabData = this._collectBaseTabData(tab, options);
 
       // Apply collected data.
       tabData.entries = history.entries;
-      tabData.index = history.index;
+      if ("index" in history) {
+        tabData.index = history.index;
+      }
 
       if (Object.keys(storage).length) {
         tabData.storage = storage;
       }
 
       if (disallow.length > 0) {
         tabData.disallow = disallow.join(",");
       }