summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-06-01 00:56:58 +0200
committerGitHub <noreply@github.com>2018-06-01 00:56:58 +0200
commitec3ddc20215404c4baaff26a5940a0858609effa (patch)
tree8722bf414feeff6ea3a71d799bef1cfee69fd8d8
parent5df686e5b3b21a12d65bcc98f5885fed753b293b (diff)
parent5441dc0e1ed74c38a11b0b67da058c144ed08331 (diff)
downloadUXP-ec3ddc20215404c4baaff26a5940a0858609effa.tar
UXP-ec3ddc20215404c4baaff26a5940a0858609effa.tar.gz
UXP-ec3ddc20215404c4baaff26a5940a0858609effa.tar.lz
UXP-ec3ddc20215404c4baaff26a5940a0858609effa.tar.xz
UXP-ec3ddc20215404c4baaff26a5940a0858609effa.zip
Merge pull request #421 from JustOff/PR_utilityOverlay_ShellService
[PALEMOON] Use ShellService.jsm to get the shell service in utilityOverlay.js
-rw-r--r--application/palemoon/base/content/utilityOverlay.js12
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() {