From c9d2e9bcfb77657b3be7d368e57f43747c23ddc4 Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Sun, 24 Mar 2019 20:22:03 -0400 Subject: Remove obsolete getPref helpers. --- dom/browser-element/BrowserElementParent.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'dom/browser-element') diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index 67d05f0ab..8e4475bfa 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -23,15 +23,6 @@ function debug(msg) { //dump("BrowserElementParent - " + msg + "\n"); } -function getIntPref(prefName, def) { - try { - return Services.prefs.getIntPref(prefName); - } - catch(err) { - return def; - } -} - function handleWindowEvent(e) { if (this._browserElementParents) { let beps = ThreadSafeChromeUtils.nondeterministicGetWeakMapKeys(this._browserElementParents); @@ -856,8 +847,8 @@ BrowserElementParent.prototype = { */ zoom: defineNoReturnMethod(function(zoom) { zoom *= 100; - zoom = Math.min(getIntPref("zoom.maxPercent", 300), zoom); - zoom = Math.max(getIntPref("zoom.minPercent", 50), zoom); + zoom = Math.min(Services.prefs.getIntPref("zoom.maxPercent", 300), zoom); + zoom = Math.max(Services.prefs.getIntPref("zoom.minPercent", 50), zoom); this._sendAsyncMsg('zoom', {zoom: zoom / 100.0}); }), -- cgit v1.2.3