Bug 736456 - Cache the spec in captureAndStore, since currentURI may not be available later; r=ttaubert

This commit is contained in:
Marco Bonardo 2012-03-16 16:13:34 +01:00
parent 6dc6c177cc
commit 8bbb355897

View File

@ -109,6 +109,7 @@ let PageThumbs = {
* @param aCallback The function to be called when finished (optional). * @param aCallback The function to be called when finished (optional).
*/ */
captureAndStore: function PageThumbs_captureAndStore(aBrowser, aCallback) { captureAndStore: function PageThumbs_captureAndStore(aBrowser, aCallback) {
let url = aBrowser.currentURI.spec;
this.capture(aBrowser.contentWindow, function (aInputStream) { this.capture(aBrowser.contentWindow, function (aInputStream) {
let telemetryStoreTime = new Date(); let telemetryStoreTime = new Date();
@ -123,7 +124,7 @@ let PageThumbs = {
} }
// Get a writeable cache entry. // Get a writeable cache entry.
PageThumbsCache.getWriteEntry(aBrowser.currentURI.spec, function (aEntry) { PageThumbsCache.getWriteEntry(url, function (aEntry) {
if (!aEntry) { if (!aEntry) {
finish(false); finish(false);
return; return;