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 3233015dde
commit 7a8a491a6b

View File

@ -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;