Backed out changeset 1d5b01d01df6 (bug 1238286) for m(oth) failures in test_focus_autocomplete.xul

MozReview-Commit-ID: HVzqjvciYqB
This commit is contained in:
Wes Kocher 2016-04-11 09:46:26 -07:00
parent 8a4f6ebbf0
commit e7e4a7abbf
2 changed files with 8 additions and 2 deletions

View File

@ -3395,6 +3395,9 @@ const DOMLinkHandler = {
const BrowserSearch = {
addEngine: function(browser, engine, uri) {
if (!this.searchBar)
return;
// Check to see whether we've already added an engine with this title
if (browser.engines) {
if (browser.engines.some(e => e.title == engine.title))
@ -3432,7 +3435,11 @@ const BrowserSearch = {
*/
updateOpenSearchBadge: function() {
var searchBar = this.searchBar;
if (!searchBar)
// The search bar binding might not be applied even though the element is
// in the document (e.g. when the navigation toolbar is hidden), so check
// for .textbox specifically.
if (!searchBar || !searchBar.textbox)
return;
var engines = gBrowser.selectedBrowser.engines;

View File

@ -81,7 +81,6 @@
if (Components.isSuccessCode(aStatus)) {
// Refresh the display (updating icon, etc)
this.updateDisplay();
BrowserSearch.updateOpenSearchBadge();
} else {
Components.utils.reportError("Cannot initialize search service, bailing out: " + aStatus);
}