diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 57b412ef4839..57c54ca7f2f9 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1494,6 +1494,9 @@ let wasActive = document.activeElement == aBrowser; + // Unmap the old outerWindowID. + this._outerWindowIDBrowserMap.delete(aBrowser.outerWindowID); + // Unhook our progress listener. let tab = this.getTabForBrowser(aBrowser); let index = tab._tPos; @@ -1525,6 +1528,9 @@ tab.removeAttribute("crashed"); } else { aBrowser.messageManager.sendAsyncMessage("Browser:AppTab", { isAppTab: tab.pinned }) + + // Register the new outerWindowID. + this._outerWindowIDBrowserMap.set(aBrowser.outerWindowID, aBrowser); } if (wasActive)