Bug 1530086 - Fix the method signature used by searchbar scripts for addEngine(). r=florian
authorMike de Boer <mdeboer@mozilla.com>
Fri, 01 Mar 2019 15:51:50 +0000
changeset 519840 72820387d7082b7fd88d53be1e896f73ac596e00
parent 519839 43079c556af961ab8f7f34380360d2cbbef330a3
child 519841 6933acee1ad9aba811d05eb9d820d9397f45bd2a
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1530086
milestone67.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 1530086 - Fix the method signature used by searchbar scripts for addEngine(). r=florian Differential Revision: https://phabricator.services.mozilla.com/D21706
browser/components/search/content/search-one-offs.js
browser/components/search/content/searchbar.js
--- a/browser/components/search/content/search-one-offs.js
+++ b/browser/components/search/content/search-one-offs.js
@@ -1179,17 +1179,17 @@ class SearchOneOffs {
       // close itself automatically.
       this.popup.hidePopup();
       return;
     }
 
     if (target.classList.contains("addengine-item")) {
       // On success, hide the panel and tell event listeners to reshow it to
       // show the new engine.
-      Services.search.addEngine(target.getAttribute("uri"), target.getAttribute("image"))
+      Services.search.addEngine(target.getAttribute("uri"), target.getAttribute("image"), false)
         .then(engine => {
           this._rebuild();
         })
         .catch(errorCode => {
           if (errorCode != Ci.nsISearchService.ERROR_DUPLICATE_ENGINE) {
             // Download error is shown by the search service
             return;
           }
--- a/browser/components/search/content/searchbar.js
+++ b/browser/components/search/content/searchbar.js
@@ -350,17 +350,17 @@ class MozSearchbar extends MozXULElement
 
   _setupEventListeners() {
     this.addEventListener("command", (event) => {
       const target = event.originalTarget;
       if (target.engine) {
         this.currentEngine = target.engine;
       } else if (target.classList.contains("addengine-item")) {
         // Select the installed engine if the installation succeeds.
-        Services.search.addEngine(target.getAttribute("uri"), null,
+        Services.search.addEngine(target.getAttribute("uri"),
           target.getAttribute("src"), false).then(engine => this.currentEngine = engine);
       } else {
         return;
       }
 
       this.focus();
       this.select();
     });