diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-05-31 17:09:01 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-05-31 17:09:01 +0300 |
commit | 5441dc0e1ed74c38a11b0b67da058c144ed08331 (patch) | |
tree | a5ee1bf15789215ac6b9e7685553a7a01578afaa /application | |
parent | a516927e1a277f4eb34e34538204b299d33afb3e (diff) | |
download | UXP-5441dc0e1ed74c38a11b0b67da058c144ed08331.tar UXP-5441dc0e1ed74c38a11b0b67da058c144ed08331.tar.gz UXP-5441dc0e1ed74c38a11b0b67da058c144ed08331.tar.lz UXP-5441dc0e1ed74c38a11b0b67da058c144ed08331.tar.xz UXP-5441dc0e1ed74c38a11b0b67da058c144ed08331.zip |
[PALEMOON] Use ShellService.jsm to get the shell service in utilityOverlay.js
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/utilityOverlay.js | 12 |
1 files changed, 5 insertions, 7 deletions
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() { |