Bug 1367630 - part 4: Don't claim that the stored title is a content title when it's really the page's URL. r=mikedeboer
authorDão Gottwald <dao@mozilla.com>
Fri, 14 Jul 2017 09:50:41 +0200
changeset 418136 e8e5ca57b442fd63555e5e17ddcf96a339a0a6d1
parent 418135 d8b3bb26abe0cd1cc13b960e3556ca53be56677d
child 418137 e38374a75acd43cd3cad154678698fa475bb1d27
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1367630
milestone56.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 1367630 - part 4: Don't claim that the stored title is a content title when it's really the page's URL. r=mikedeboer MozReview-Commit-ID: 6VKZFmEv8WN
browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2639,17 +2639,18 @@ var SessionStoreInternal = {
         throw new Error("tabData not found for given tab");
       }
     }
 
     let activePageData = tabData.entries[tabData.index - 1] || null;
 
     // If the page has a title, set it.
     if (activePageData) {
-      if (activePageData.title) {
+      if (activePageData.title &&
+          activePageData.title != activePageData.url) {
         win.gBrowser.setInitialTabTitle(tab, activePageData.title, { isContentTitle: true });
       } else if (activePageData.url != "about:blank") {
         win.gBrowser.setInitialTabTitle(tab, activePageData.url);
       }
     }
 
     // Restore the tab icon.
     if ("image" in tabData) {