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 a=jcristau
authorDão Gottwald <dao@mozilla.com>
Fri, 14 Jul 2017 09:50:41 +0200
changeset 414441 116c714b341eecf34d466907930ad2629f7d9b6a
parent 414440 5d60a973693b73e39d1780fe6e70d531c675635f
child 414442 3b36f2863e5c6d6896d9c35f2465531ee19c4a79
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, jcristau
bugs1367630
milestone55.0
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 a=jcristau
browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2640,17 +2640,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) {