Bug 1548141 - Ensure SearchService has started. r=mikedeboer
authorDale Harvey <dale@arandomurl.com>
Wed, 01 May 2019 08:32:12 +0000
changeset 530877 f8d2d04438931fccd53ba405b1ed5c394f296e15
parent 530876 ad490f39a317715e59875f6a630b60f345dd0bf6
child 530878 e34d54ab62b4e52aebcbed7456d67d0c5d9f0f9c
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1548141
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1548141 - Ensure SearchService has started. r=mikedeboer Differential Revision: https://phabricator.services.mozilla.com/D29430
browser/components/urlbar/UrlbarUtils.jsm
--- a/browser/components/urlbar/UrlbarUtils.jsm
+++ b/browser/components/urlbar/UrlbarUtils.jsm
@@ -162,16 +162,17 @@ var UrlbarUtils = {
     let postData = null;
     // Split on the first whitespace.
     let [keyword, param = ""] = url.trim().split(/\s(.+)/, 2);
 
     if (!keyword) {
       return { url, postData, mayInheritPrincipal };
     }
 
+    await Services.search.init();
     let engine = Services.search.getEngineByAlias(keyword);
     if (engine) {
       let submission = engine.getSubmission(param, null, "keyword");
       return { url: submission.uri.spec,
                postData: submission.postData,
                mayInheritPrincipal };
     }