From 0d1ef6d630737ac836728c41d7228bebcdb6f1a4 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 21 Sep 1999 08:39:20 +0000 Subject: [PATCH] fix for #14438 if you have user_pref("browser.startup.page", 2); in your prefs.js file, [meaning open browser with last page visted] and you click on the browser button in the task bar from messgener, it will fail to open. --- xpfe/global/resources/content/tasksOverlay.js | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/xpfe/global/resources/content/tasksOverlay.js b/xpfe/global/resources/content/tasksOverlay.js index 04d3aebb48c8..979ba33209b4 100644 --- a/xpfe/global/resources/content/tasksOverlay.js +++ b/xpfe/global/resources/content/tasksOverlay.js @@ -99,17 +99,15 @@ function toOpenWindowByType( inType, uri ) } break; case 2: - var history = Components.classes['component://netscape/browser/global-history']; - if (history) { - history = history.getService(); - } - if (history) { - history = history.QueryInterface(Components.interfaces.nsIGlobalHistory); - } - if (history) { - startpage = history.GetLastPageVisted(); - } - break; + try { + var history = Components.classes["component://netscape/browser/global-history"].getService(); + history = history.QueryInterface(Components.interfaces.nsIGlobalHistory); + startpage = history.GetLastPageVisted(); + } + catch (ex) { + dump(ex +"\n"); + } + break; default: startpage = "about:blank"; }