From accd61429eee73dd3564957cf3d6480c280d44e7 Mon Sep 17 00:00:00 2001 From: JustOff Date: Wed, 26 Dec 2018 13:48:49 +0200 Subject: [PALEMOON] Initialize the search service asynchronously when calling 'BrowserSearch.addEngine()' --- application/palemoon/base/content/browser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 8a635e91b..eb4916e37 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -3046,7 +3046,9 @@ const DOMLinkHandler = { /^(?:https?|ftp):/i.test(link.href) && !PrivateBrowsingUtils.isWindowPrivate(window)) { var engine = { title: link.title, href: link.href }; - BrowserSearch.addEngine(engine, link.ownerDocument); + Services.search.init(function () { + BrowserSearch.addEngine(engine, link.ownerDocument); + }); searchAdded = true; } } -- cgit v1.2.3