Bug 1103119: Search drop down fails to display properly if a search engine has no icon. r=felipe

This commit is contained in:
Dave Townsend 2014-11-21 13:04:24 -08:00
parent 99592ea91e
commit e094a24942

View File

@ -1011,9 +1011,10 @@
// Show the current default engine in the top header of the panel.
let currentEngine = Services.search.currentEngine;
let uri = currentEngine.iconURI;
if (uri)
if (uri) {
uri = uri.spec;
this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
}
document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-name")
.setAttribute("value", currentEngine.name + " Search");