author | Ben Kelly <ben@wanderview.com> |
Mon, 27 Jun 2016 08:10:50 -0700 | |
changeset 302756 | f0d6274311d480ea61630fa5998511e66f82a774 |
parent 302755 | 0cbfbfe2a193c56e656b38cd054a09ea5f4d3076 |
child 302757 | 7a6d37ee074f25418bd9ea12309e3a6460022ed3 |
push id | 30376 |
push user | cbook@mozilla.com |
push date | Tue, 28 Jun 2016 14:09:36 +0000 |
treeherder | mozilla-central@e45890951ce7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | adw |
bugs | 1279120 |
milestone | 50.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
|
--- a/browser/base/content/contentSearchUI.js +++ b/browser/base/content/contentSearchUI.js @@ -77,16 +77,19 @@ ContentSearchUIController.prototype = { // if it's set when the suggestions table is actually opened. _pendingOneOffRefresh: undefined, get defaultEngine() { return this._defaultEngine; }, set defaultEngine(engine) { + if (this._defaultEngine && this._defaultEngine.icon) { + URL.revokeObjectURL(this._defaultEngine.icon); + } let icon; if (engine.iconBuffer) { icon = this._getFaviconURIFromBuffer(engine.iconBuffer); } else { icon = this._getImageURIForCurrentResolution( "chrome://mozapps/skin/places/defaultFavicon.png"); } @@ -863,16 +866,20 @@ ContentSearchUIController.prototype = { if (engine.iconBuffer) { uri = this._getFaviconURIFromBuffer(engine.iconBuffer); } else { uri = this._getImageURIForCurrentResolution( "chrome://browser/skin/search-engine-placeholder.png"); } img.setAttribute("src", uri); + img.addEventListener("load", function imgLoad() { + img.removeEventListener("load", imgLoad); + URL.revokeObjectURL(uri); + }); button.appendChild(img); button.style.width = buttonWidth + "px"; button.setAttribute("title", engine.name); button.engineName = engine.name; button.addEventListener("click", this); button.addEventListener("mousemove", this);