summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-26 23:14:11 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-26 23:14:11 +0200
commit3555533f7f48582e9d1790489e406946e4f99da3 (patch)
treeeba0a23ea1510b7eb3f8c57edf7dfe19b769f11d /toolkit
parent9fc1381e11a0a6adcd3be93b1d0524fd5336282b (diff)
downloadUXP-3555533f7f48582e9d1790489e406946e4f99da3.tar
UXP-3555533f7f48582e9d1790489e406946e4f99da3.tar.gz
UXP-3555533f7f48582e9d1790489e406946e4f99da3.tar.lz
UXP-3555533f7f48582e9d1790489e406946e4f99da3.tar.xz
UXP-3555533f7f48582e9d1790489e406946e4f99da3.zip
Convert trinary to more explicit statement.
Diffstat (limited to 'toolkit')
-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);