RequestPolicy/requestpolicy — Issue #175: occassional error removing history listener when closing window
Author: jsamuel
Created: 2011-12-22 18:57:45+00:00
State: open
Labels: extension

imported trac ticket
created: 2011-02-04 13:26:34
reporter: justin

The following error sometimes occurs when closing a window. I've only been able to repeat this one when closing the last window (with the error console still open) on Fx 4, though it may not be limited to Fx 4 and may happen in other situations:

{{{
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISHistory.removeSHistoryListener]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://requestpolicy/content/overlay.js :: :: line 1076" data: no]
}}}

The offending call to removeSHistoryListener is in this function:

{{{
_removeHistoryObserver : function() {
var sHistory = gBrowser.webNavigation.sessionHistory;
sHistory.removeSHistoryListener(this.historyListener);
},
}}}

Thanks to Archaeopteryx for reporting seeing this error.