From f3fe7383f8124939952544b71862c5ef414aa42b Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Fri, 8 Jul 2011 14:50:33 +0200 Subject: [PATCH] Bug 664670 - imageDataCb passed to Storage.getTabData in TabItem__reconnect runs when the tab is already gone; r=dao --- browser/base/content/tabview/tabitems.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/base/content/tabview/tabitems.js b/browser/base/content/tabview/tabitems.js index dde3bef015f7..cd519424ebc4 100644 --- a/browser/base/content/tabview/tabitems.js +++ b/browser/base/content/tabview/tabitems.js @@ -265,8 +265,11 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), { let tabData = null; let self = this; let imageDataCb = function(imageData) { + // we could have been unlinked while waiting for the thumbnail to load + if (!self.tab) + return; + Utils.assertThrow(tabData, "tabData"); - tabData.imageData = imageData; let currentUrl = self.tab.linkedBrowser.currentURI.spec;