Bug 1487854 - Use getVisibleEngines in browser.search.get r=robwu, aswan
authorArshad Kazmi <arshadkazmi42@gmail.com>
Sun, 16 Sep 2018 02:07:22 +0300
changeset 436615 05fcdb6d47cf
parent 436607 5d14d1e9f74d
child 436616 3893b3ec36b7
push id34651
push usernerli@mozilla.com
push dateSun, 16 Sep 2018 09:50:45 +0000
treeherdermozilla-central@7ed950e60f3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobwu, aswan
bugs1487854
milestone64.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 1487854 - Use getVisibleEngines in browser.search.get r=robwu, aswan Reviewers: robwu, aswan Reviewed By: robwu, aswan Bug #: 1487854 Differential Revision: https://phabricator.services.mozilla.com/D5749
browser/components/extensions/parent/ext-search.js
--- a/browser/components/extensions/parent/ext-search.js
+++ b/browser/components/extensions/parent/ext-search.js
@@ -29,18 +29,17 @@ async function getDataURI(resourceURI) {
 }
 
 this.search = class extends ExtensionAPI {
   getAPI(context) {
     return {
       search: {
         async get() {
           await searchInitialized;
-          let engines = Services.search.getEngines();
-          let visibleEngines = engines.filter(engine => !engine.hidden);
+          let visibleEngines = Services.search.getVisibleEngines();
           return Promise.all(visibleEngines.map(async engine => {
             let favIconUrl;
             if (engine.iconURI) {
               if (engine.iconURI.schemeIs("resource") ||
                   engine.iconURI.schemeIs("chrome")) {
                 // Convert internal URLs to data URLs
                 favIconUrl = await getDataURI(engine.iconURI.spec);
               } else {