Closed slosd closed 9 years ago
The onCommand handler of the toolbar button always references the first opened window, which causes this exception if that window has been closed:
onCommand
Exception { message: "", result: 2147746065, name: "NS_ERROR_NOT_AVAILABLE", filename: "chrome://guiconfig/content/browser.js", lineNumber: 153, columnNumber: 0, inner: null, data: null, stack: "showPreferencesDialog@chrome://guiconfig/content/browser.js:153:13 _addToolbarButton_customizableUI/<.onCommand@chrome://guiconfig/content/browser.js:106:8 CustomizableUIInternal.handleWidgetCommand@resource://app/modules/CustomizableUI.jsm:1355:10 ", location: XPCWrappedNative_NoHelper }
The correct window is the one referenced in the event object:
onCommand: function(event) { var win = event.target.ownerDocument.defaultView; }
The
onCommand
handler of the toolbar button always references the first opened window, which causes this exception if that window has been closed:The correct window is the one referenced in the event object: