From 8bbb3558972dc901326b5956694c029001a3134d Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Fri, 16 Mar 2012 16:13:34 +0100 Subject: [PATCH] Bug 736456 - Cache the spec in captureAndStore, since currentURI may not be available later; r=ttaubert --- browser/components/thumbnails/PageThumbs.jsm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm index ca98a03d878..3512b89d623 100644 --- a/browser/components/thumbnails/PageThumbs.jsm +++ b/browser/components/thumbnails/PageThumbs.jsm @@ -109,6 +109,7 @@ let PageThumbs = { * @param aCallback The function to be called when finished (optional). */ captureAndStore: function PageThumbs_captureAndStore(aBrowser, aCallback) { + let url = aBrowser.currentURI.spec; this.capture(aBrowser.contentWindow, function (aInputStream) { let telemetryStoreTime = new Date(); @@ -123,7 +124,7 @@ let PageThumbs = { } // Get a writeable cache entry. - PageThumbsCache.getWriteEntry(aBrowser.currentURI.spec, function (aEntry) { + PageThumbsCache.getWriteEntry(url, function (aEntry) { if (!aEntry) { finish(false); return;