From 11d02f64440ca97f889facdcb64291220b96e46c Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Tue, 3 Mar 2015 16:28:16 +0100 Subject: [PATCH] Backed out changeset 97707eff3199 (bug 1059308) --- toolkit/devtools/server/actors/webbrowser.js | 22 ++++---------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/toolkit/devtools/server/actors/webbrowser.js b/toolkit/devtools/server/actors/webbrowser.js index 550cea33697f..a1c6462adb8e 100644 --- a/toolkit/devtools/server/actors/webbrowser.js +++ b/toolkit/devtools/server/actors/webbrowser.js @@ -1017,24 +1017,10 @@ TabActor.prototype = { } if (webProgress.DOMWindow == this._originalWindow) { - // If the original top level document we connected to is removed, - // we try to switch to any other top level document - let rootDocShells = this.docShells - .filter(d => { - return d != this.docShell && - this._isRootDocShell(d); - }); - if (rootDocShells.length > 0) { - let newRoot = rootDocShells[0]; - this._originalWindow = newRoot.DOMWindow; - this._changeTopLevelDocument(this._originalWindow); - } else { - // If for some reason (typically during Firefox shutdown), the original - // document is destroyed, and there is no other top level docshell, - // we detach the tab actor to unregister all listeners and prevent any - // exception - this.exit(); - } + // If for some reason (typically during Firefox shutdown), the original + // document is destroyed, we detach the tab actor to unregister all listeners + // and prevent any exception. + this.exit(); return; }