Bug 1173857 - Don't collect .userTypedValue for tabs that haven't fully restored yet r=billm
authorTim Taubert <ttaubert@mozilla.com>
Thu, 11 Jun 2015 19:07:12 +0200
changeset 279938 b148ba60f686d8981604e02c85d292720d6e5eda
parent 279937 d2e5970ba57502b693b8d8acb17286c41d3be3ec
child 279939 bcec28b467183305febab7de6ddbec7905d1b5aa
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1173857
milestone41.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 1173857 - Don't collect .userTypedValue for tabs that haven't fully restored yet r=billm
browser/components/sessionstore/TabState.jsm
browser/components/sessionstore/test/browser_pending_tabs.js
--- a/browser/components/sessionstore/TabState.jsm
+++ b/browser/components/sessionstore/TabState.jsm
@@ -228,14 +228,14 @@ let TabStateInternal = {
       }
 
       if (key === "history") {
         tabData.entries = value.entries;
 
         if (value.hasOwnProperty("index")) {
           tabData.index = value.index;
         }
-      } else if (value) {
+      } else {
         tabData[key] = value;
       }
     }
   }
 };
--- a/browser/components/sessionstore/test/browser_pending_tabs.js
+++ b/browser/components/sessionstore/test/browser_pending_tabs.js
@@ -22,11 +22,14 @@ add_task(function* () {
 
   // Flush to ensure the parent has all data.
   yield TabStateFlusher.flush(browser);
 
   // Check that the shistory index is the one we restored.
   let tabState = TabState.collect(tab);
   is(tabState.index, TAB_STATE.index, "correct shistory index");
 
+  // Check we don't collect userTypedValue when we shouldn't.
+  ok(!tabState.userTypedValue, "tab didn't have a userTypedValue");
+
   // Cleanup.
   gBrowser.removeTab(tab);
 });