Put try/catch around removeObserver that sometimes (inexplicably) fails. b=288770 r=mconnor

This commit is contained in:
dbaron%dbaron.org 2005-04-05 04:41:41 +00:00
Родитель 9d31f357b3
Коммит e5fb3daccc
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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)