summaryrefslogtreecommitdiffstats
path: root/dom/browser-element/BrowserElementChildPreload.js
diff options
context:
space:
mode:
authorAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-08 20:42:10 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-13 11:37:45 -0400
commit1d0af8b59102331cba100529e1697f91faf0c86b (patch)
tree3fa887fe66e4939ff8a3fc0d48cff84e8e4b14c4 /dom/browser-element/BrowserElementChildPreload.js
parentc7796280a9b5600fb15a4c170ca3d3f4d4d9e535 (diff)
downloadUXP-1d0af8b59102331cba100529e1697f91faf0c86b.tar
UXP-1d0af8b59102331cba100529e1697f91faf0c86b.tar.gz
UXP-1d0af8b59102331cba100529e1697f91faf0c86b.tar.lz
UXP-1d0af8b59102331cba100529e1697f91faf0c86b.tar.xz
UXP-1d0af8b59102331cba100529e1697f91faf0c86b.zip
Issue #991 Part 5: DOM and layout
Diffstat (limited to 'dom/browser-element/BrowserElementChildPreload.js')
-rw-r--r--dom/browser-element/BrowserElementChildPreload.js11
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' });