Bug 629122 Crashed tab causes displayport to stop setting r=wesj
authorBenjamin Stover <bstover@mozilla.com>
Tue, 01 Feb 2011 09:38:41 -0800
changeset 2727 994fa1d84081894f92dcee9f1a8e75c1f9af5de4
parent 2726 b9bc51d30b324ec1b2a17a2d0df235b3b9f97e11
child 2728 6987c7f6e2528c56750f4e7f6f570f83bff8909f
push id2290
push userbstover@mozilla.com
push dateTue, 01 Feb 2011 17:38:51 +0000
reviewerswesj
bugs629122
Bug 629122 Crashed tab causes displayport to stop setting r=wesj
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -2601,28 +2601,31 @@ Tab.prototype = {
   destroy: function destroy() {
     document.getElementById("tabs").removeTab(this._chromeTab);
     this._chromeTab = null;
     this._destroyBrowser();
   },
 
   resurrect: function resurrect() {
     let dead = this._browser;
+    let active = this.active;
 
     // Hold onto the session store data
     let session = { data: dead.__SS_data, extra: dead.__SS_extdata };
 
     // We need this data to correctly create and position the new browser
     // If this browser is already a zombie, fallback to the session data
     let currentURL = dead.__SS_restore ? session.data.entries[0].url : dead.currentURI.spec;
     let sibling = dead.nextSibling;
 
     // Destory and re-create the browser
     this._destroyBrowser();
     let browser = this._createBrowser(currentURL, sibling);
+    if (active)
+      this.active = true;
 
     // Reattach session store data and flag this browser so it is restored on select
     browser.__SS_data = session.data;
     browser.__SS_extdata = session.extra;
     browser.__SS_restore = true;
   },
 
   _createBrowser: function _createBrowser(aURI, aInsertBefore) {