RequestPolicy/requestpolicy — Issue #174: occassional error removing history listener when closing window
Author: jsamuel
Created: 2011-12-22 04:07:28+00:00
State: open
Labels: extension

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.