bug 637582 - blank or white page showing randomly when rendering or loading page r=mbrubeck a=blocking-fennec
authorBrad Lassey <blassey@mozilla.com>
Mon, 07 Mar 2011 14:41:50 -0500
changeset 2875 08533b697c63c323dd5d2b7eb64f0d56641955e1
parent 2874 b94f83f03ff36862e32a98d445dd737979c3e9a4
child 2876 102b9ea97880580ce740bcafcae0910f37c67e5a
push id2419
push userblassey@mozilla.com
push dateMon, 07 Mar 2011 19:42:38 +0000
reviewersmbrubeck, blocking-fennec
bugs637582
bug 637582 - blank or white page showing randomly when rendering or loading page r=mbrubeck a=blocking-fennec
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -2314,16 +2314,21 @@ var MemoryObserver = {
       if (tab == Browser.selectedTab)
         continue;
       tab.resurrect();
     }
 
     window.QueryInterface(Ci.nsIInterfaceRequestor)
           .getInterface(Ci.nsIDOMWindowUtils).garbageCollect();
     Cu.forceGC();
+    // Bug 637582 - The low memory condition throws out some stuff that we still
+    // need, re-selecting the active tab gets us back to where we need to be.
+    let sTab = Browser.selectedTab;
+    Browser._selectedTab = null;
+    Browser.selectedTab = sTab;
   }
 };
 
 function getNotificationBox(aBrowser) {
   return Browser.getNotificationBox(aBrowser);
 }
 
 function importDialog(aParent, aSrc, aArguments) {