diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 936cf374b3aa..cde5c7afeded 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -358,10 +358,17 @@ const CustomizableWidgets = [ _showTabs(paginationInfo) { this._showTabsPromise = this._showTabsPromise.then(() => { return this.__showTabs(paginationInfo); + }, e => { + Cu.reportError(e); }); }, // Return a new promise to update the tab list. __showTabs(paginationInfo) { + if (!this._tabsList) { + // Closed between the previous `this._showTabsPromise` + // resolving and now. + return undefined; + } let doc = this._tabsList.ownerDocument; return SyncedTabs.getTabClients().then(clients => { // The view may have been hidden while the promise was resolving.