From e11907e1b0e5cfeccffb7013cf42c27671a3b561 Mon Sep 17 00:00:00 2001 From: Szabolcs Hubai Date: Tue, 20 Mar 2012 02:51:58 +0100 Subject: [PATCH] Bug 726560 - v4: commenting, let it undefined in gecko 1.x --- extension/chrome/content/browser.js | 6 ++++-- extension/modules/tabGroupTitle.jsm | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/extension/chrome/content/browser.js b/extension/chrome/content/browser.js index d28adcc..9a0b516 100644 --- a/extension/chrome/content/browser.js +++ b/extension/chrome/content/browser.js @@ -52,9 +52,11 @@ get tabTitle() { }, get tabGroupTitle() { - if (typeof(nightlyApp.getTabGroupTitle) === "function") + try + { return nightlyApp.getTabGroupTitle(window); - return ""; + } + catch (e) { } }, init: function() diff --git a/extension/modules/tabGroupTitle.jsm b/extension/modules/tabGroupTitle.jsm index dd770e1..c0fbb30 100644 --- a/extension/modules/tabGroupTitle.jsm +++ b/extension/modules/tabGroupTitle.jsm @@ -9,7 +9,7 @@ let sstore = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionS /** - * Simply retrieves the active tabgroup's title from sessionStore + * Simply retrieves the active tabgroup's title from SessionStore */ function getActiveGroupName(win) { let data = "", groupTitle = ""; @@ -34,7 +34,7 @@ function getActiveGroupName(win) { * * In Gecko 1.x title is set to "Undefined" as in other Apps * Before FF10 title is managed by TabView - * After that we manages the title: SessionStore to load and save, borrowed code to generate + * After that we manages the title: using SessionStore and other borrowed code to generate */ function getTabGroupTitle(win) { let nightlyApp = win.nightlyApp; @@ -42,7 +42,7 @@ function getTabGroupTitle(win) { // TabView isn't implemented if (!("TabView" in win)) - return ""; + return; // If we are before Bug 682996, // use TabView's own implementation except it is null