From e5fb3daccc4e8f516bb6253e9f3bfc4988ced25d Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Tue, 5 Apr 2005 04:41:41 +0000 Subject: [PATCH] Put try/catch around removeObserver that sometimes (inexplicably) fails. b=288770 r=mconnor --- toolkit/content/widgets/browser.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index d177b539da6c..2d00477a0b91 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -575,7 +575,11 @@ if (!this.hasAttribute("disablehistory")) { var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); - os.removeObserver(this, "browser:purge-session-history", false); + try { + os.removeObserver(this, "browser:purge-session-history", false); + } catch (ex) { + // It's not clear why this sometimes throws an exception. + } } if (this.mDragDropHandler)