summaryrefslogtreecommitdiffstats
path: root/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-08-05 11:35:53 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-08-05 11:35:53 +0200
commit6bd66b1728eeddb058066edda740aaeb2ceaec23 (patch)
tree985faf01c526763515731569fa01a99f4dbef36e /toolkit/components/thumbnails/BackgroundPageThumbs.jsm
parente0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc (diff)
parent559824514dc95e02fbe81f1786e6ac13ee8e9d55 (diff)
downloadUXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar
UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.gz
UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.lz
UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.xz
UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.zip
Merge branch 'master' into js-modules
Diffstat (limited to 'toolkit/components/thumbnails/BackgroundPageThumbs.jsm')
-rw-r--r--toolkit/components/thumbnails/BackgroundPageThumbs.jsm15
1 files changed, 8 insertions, 7 deletions
diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
index bd52e77e9..7b86fa07c 100644
--- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
+++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
@@ -368,9 +368,12 @@ Capture.prototype = {
tel("CAPTURE_QUEUE_TIME_MS", this.startDate - this.creationDate);
// timeout timer
- let timeout = typeof(this.options.timeout) == "number" ?
- this.options.timeout :
- DEFAULT_CAPTURE_TIMEOUT;
+ let timeout;
+ if (this.options && typeof(this.options.timeout) == "number") {
+ timeout = this.options.timeout;
+ } else {
+ timeout = DEFAULT_CAPTURE_TIMEOUT;
+ }
this._timeoutTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this._timeoutTimer.initWithCallback(this, timeout,
Ci.nsITimer.TYPE_ONE_SHOT);
@@ -468,11 +471,9 @@ Capture.prototype = {
};
if (!data) {
- // If this background attempt failed, cause a dummy file to be saved, so
+ // If this background attempt failed, cause a placeholder file to be saved, so
// that gets loaded instead of attempting again (and again).
- // XXX: Perhaps we can create a placeholder image to use instead of "null"
- // here, so it has something to show to the user?
- PageThumbs._store(this.url, this.url, null, true)
+ PageThumbs._store(this.url, this.url, atob(BLANKTHUMB), true)
.then(done, done);
return;
}