Bug 539787 - [regression] center() throws sometimes when switching tabs [r=mfinkle]
authorBenjamin Stover <bstover@mozilla.com>
Thu, 14 Jan 2010 14:31:25 -0800
changeset 65973 8af897f65a509cb7ea342feb87bd1d8868f201c8
parent 65972 5d9ffb07ee91bd860391fe20676310a3b81230ee
child 65974 ce63ba0ca513b3afd5ba649ae987ce949aaf2616
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs539787
Bug 539787 - [regression] center() throws sometimes when switching tabs [r=mfinkle]
mobile/chrome/content/TileManager.js.in
--- a/mobile/chrome/content/TileManager.js.in
+++ b/mobile/chrome/content/TileManager.js.in
@@ -308,17 +308,18 @@ TileManager.prototype = {
       // This is the first paint since the last critical move.
       let tc = this._tileCache;
       BEGIN_FOREACH_IN_RECT(lastCr, tc, tile)
         tc.releaseTile(tile);
       END_FOREACH_IN_RECT
 
       lastCr.setRect(0, 0, 0, 0);
 
-      this.recenterEvictionQueue(cr.center().map(Math.round));
+      if (!cr.isEmpty())
+        this.recenterEvictionQueue(cr.center().map(Math.round));
       this.recenterCrawler();
     }
 
     if (!cr.isEmpty())
       this._renderAppendHoldRect(cr);
   },
 
   criticalMove: function criticalMove(destCriticalRect, doCriticalPaint) {