Bug 1343056 - Take userTypedValue into account when saving tabs to disk. r?mikedeboer
This patch adds userTypedValue data validation when saving tabs to disk
MozReview-Commit-ID: EltANtbDfqe
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -4211,19 +4211,20 @@ var SessionStoreInternal = {
*
* @param aTabState
* The current tab state
* @returns boolean
*/
_shouldSaveTab: function ssi_shouldSaveTab(aTabState) {
// If the tab has one of the following transient about: history entry,
// then we don't actually want to write this tab's data to disk.
- return aTabState.entries.length &&
- !(aTabState.entries[0].url == "about:printpreview" ||
- aTabState.entries[0].url == "about:privatebrowsing");
+ return aTabState.userTypedValue ||
+ (aTabState.entries.length &&
+ !(aTabState.entries[0].url == "about:printpreview" ||
+ aTabState.entries[0].url == "about:privatebrowsing"));
},
/**
* This is going to take a state as provided at startup (via
* nsISessionStartup.state) and split it into 2 parts. The first part
* (defaultState) will be a state that should still be restored at startup,
* while the second part (state) is a state that should be saved for later.
* defaultState will be comprised of windows with only pinned tabs, extracted