From 9fc1381e11a0a6adcd3be93b1d0524fd5336282b Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 26 Jul 2018 21:45:34 +0200 Subject: Fix #include and potentially undefined Capture.options object. --- toolkit/components/thumbnails/BackgroundPageThumbs.jsm | 2 +- toolkit/components/thumbnails/PageThumbs.jsm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm index b2aa646f7..e743c4dd9 100644 --- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm +++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm @@ -368,7 +368,7 @@ Capture.prototype = { tel("CAPTURE_QUEUE_TIME_MS", this.startDate - this.creationDate); // timeout timer - let timeout = typeof(this.options.timeout) == "number" ? + let timeout = this.options && typeof(this.options.timeout) == "number" ? this.options.timeout : DEFAULT_CAPTURE_TIMEOUT; this._timeoutTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); diff --git a/toolkit/components/thumbnails/PageThumbs.jsm b/toolkit/components/thumbnails/PageThumbs.jsm index 4b343c605..5c7754b31 100644 --- a/toolkit/components/thumbnails/PageThumbs.jsm +++ b/toolkit/components/thumbnails/PageThumbs.jsm @@ -29,7 +29,7 @@ const MAX_THUMBNAIL_AGE_SECS = 172800; // 2 days == 60*60*24*2 == 172800 secs. const THUMBNAIL_DIRECTORY = "thumbnails"; // contains base64 version of a placeholder thumbnail -#include "blankthumb.inc" +#include blankthumb.inc Cu.import("resource://gre/modules/XPCOMUtils.jsm", this); Cu.import("resource://gre/modules/PromiseWorker.jsm", this); -- cgit v1.2.3