Bug 794436 - tabPreviews.capture() needs to check for pending tab restore; r=dao
authorTim Taubert <ttaubert@mozilla.com>
Wed, 26 Sep 2012 15:08:09 +0200
changeset 108198 e889440ba18db5ab35f8b08d6c92ccc758ac6e5d
parent 108197 4419d3a40bde1c0df75d2ec0b87311f22580bf0b
child 108199 b56fa836e894675118171680ab693f69f6fc7180
push id23544
push userttaubert@mozilla.com
push dateThu, 27 Sep 2012 07:12:21 +0000
treeherdermozilla-central@b038e9e2023f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs794436
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 794436 - tabPreviews.capture() needs to check for pending tab restore; r=dao
browser/base/content/browser-tabPreviews.js
--- a/browser/base/content/browser-tabPreviews.js
+++ b/browser/base/content/browser-tabPreviews.js
@@ -81,17 +81,19 @@ var tabPreviews = {
             !this._pendingUpdate) {
           // Generate a thumbnail for the tab that was selected.
           // The timeout keeps the UI snappy and prevents us from generating thumbnails
           // for tabs that will be closed. During that timeout, don't generate other
           // thumbnails in case multiple TabSelect events occur fast in succession.
           this._pendingUpdate = true;
           setTimeout(function (self, aTab) {
             self._pendingUpdate = false;
-            if (aTab.parentNode && !aTab.hasAttribute("busy"))
+            if (aTab.parentNode &&
+                !aTab.hasAttribute("busy") &&
+                !aTab.hasAttribute("pending"))
               self.capture(aTab, true);
           }, 2000, this, this._selectedTab);
         }
         this._selectedTab = event.target;
         break;
       case "SSTabRestored":
         this.capture(event.target, true);
         break;