summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--toolkit/components/thumbnails/BackgroundPageThumbs.jsm9
1 files changed, 6 insertions, 3 deletions
diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
index e743c4dd9..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 = this.options && 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);