diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-10 11:39:27 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-10 11:39:27 +0100 |
commit | 974a481d12bf430891725bd3662876358e57e11a (patch) | |
tree | cad011151456251fef2f1b8d02ef4b4e45fad61a /dom/browser-element/BrowserElementChildPreload.js | |
parent | 6bd66b1728eeddb058066edda740aaeb2ceaec23 (diff) | |
parent | 736d25cbec4541186ed46c935c117ce4d1c7f3bb (diff) | |
download | UXP-974a481d12bf430891725bd3662876358e57e11a.tar UXP-974a481d12bf430891725bd3662876358e57e11a.tar.gz UXP-974a481d12bf430891725bd3662876358e57e11a.tar.lz UXP-974a481d12bf430891725bd3662876358e57e11a.tar.xz UXP-974a481d12bf430891725bd3662876358e57e11a.zip |
Merge branch 'master' into js-modules
# Conflicts:
# modules/libpref/init/all.js
Diffstat (limited to 'dom/browser-element/BrowserElementChildPreload.js')
-rw-r--r-- | dom/browser-element/BrowserElementChildPreload.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index 780dfa80e..5adff2cac 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -1010,11 +1010,7 @@ BrowserElementChild.prototype = { self._takeScreenshot(maxWidth, maxHeight, mimeType, domRequestID); }; - let maxDelayMS = 2000; - try { - maxDelayMS = Services.prefs.getIntPref('dom.browserElement.maxScreenshotDelayMS'); - } - catch(e) {} + let maxDelayMS = Services.prefs.getIntPref('dom.browserElement.maxScreenshotDelayMS', 2000); // Try to wait for the event loop to go idle before we take the screenshot, // but once we've waited maxDelayMS milliseconds, go ahead and take it @@ -1720,10 +1716,7 @@ BrowserElementChild.prototype = { // certerror? If yes, maybe we should add a property to the // event to to indicate whether there is a custom page. That would // let the embedder have more control over the desired behavior. - let errorPage = null; - try { - errorPage = Services.prefs.getCharPref(CERTIFICATE_ERROR_PAGE_PREF); - } catch (e) {} + let errorPage = Services.prefs.getCharPref(CERTIFICATE_ERROR_PAGE_PREF, ""); if (errorPage == 'certerror') { sendAsyncMsg('error', { type: 'certerror' }); |