From 5441dc0e1ed74c38a11b0b67da058c144ed08331 Mon Sep 17 00:00:00 2001 From: JustOff Date: Thu, 31 May 2018 17:09:01 +0300 Subject: [PALEMOON] Use ShellService.jsm to get the shell service in utilityOverlay.js --- application/palemoon/base/content/utilityOverlay.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'application') diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index 633cb8853..c4cd87f60 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -9,6 +9,9 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Components.utils.import("resource:///modules/RecentWindow.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "ShellService", + "resource:///modules/ShellService.jsm"); + XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () { const PREF = "browser.newtab.url"; @@ -448,15 +451,10 @@ function gatherTextUnder ( root ) return text; } +// This function exists for legacy reasons. function getShellService() { - var shell = null; - try { - shell = Components.classes["@mozilla.org/browser/shell-service;1"] - .getService(Components.interfaces.nsIShellService); - } catch (e) { - } - return shell; + return ShellService; } function isBidiEnabled() { -- cgit v1.2.3