Bug 940617 - "Recently closed tabs" list should exclude tabs with about: URIs as the only history entry. r=ttaubert
☠☠ backed out by 594d63fbf864 ☠ ☠
authorPeiyong Lin <pylaurent1314@gmail.com>
Mon, 02 Dec 2013 13:04:13 -0500
changeset 174003 6efabfb144b1cc0864fb4ce877534107965b0728
parent 174002 677a76d18d505c372e83c6c63853ecfdf6987aa5
child 174004 ad0b0ca62e46f761bd67933995dd45f67870c9d5
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs940617
milestone28.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 940617 - "Recently closed tabs" list should exclude tabs with about: URIs as the only history entry. r=ttaubert
browser/components/sessionstore/src/SessionStore.jsm
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -3430,19 +3430,18 @@ let SessionStoreInternal = {
    * @returns boolean
    */
   _shouldSaveTabState: function ssi_shouldSaveTabState(aTabState) {
     // If the tab has only a transient about: history entry, no other
     // session history, and no userTypedValue, then we don't actually want to
     // store this tab's data.
     return aTabState.entries.length &&
            !(aTabState.entries.length == 1 &&
-                (aTabState.entries[0].url == "about:blank" ||
-                 aTabState.entries[0].url == "about:newtab") &&
-                 !aTabState.userTypedValue);
+             aTabState.entries[0].url.startsWith("about:") &&
+             !aTabState.userTypedValue);
   },
 
   /**
    * Determine if we can restore history into this tab.
    * This will be false when a tab has been removed (usually between
    * restoreTabs && restoreHistory) or if the tab is still marked
    * as loading.
    *