Closed Bug 1279120 Opened 8 years ago Closed 8 years ago

ContentSearchUI.js leaks a blob URL when you change default search engine

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 50
Tracking Status
firefox50 --- verified

People

(Reporter: bkelly, Assigned: bkelly)

Details

(Whiteboard: [MemShrink])

Attachments

(1 file)

ContentSearchUI.js uses createObjectURL(), but never calls revokeObjectURL(). This is most noticeable when you have an about:newtab running the search box and then change your default search engine. It drops the reference to the old default search icon, but fails to revoke the URL. So the blob URL leaks until the about:newtab is closed.
Drew, this patch just calls revokeObjectURL() on the icon URLs when we no longer need them. There is no harm in calling it if the URL was not created with createObjectURL(). It fixes the blob URL leak in my local testing.
Attachment #8761445 - Flags: review?(adw)
Comment on attachment 8761445 [details] [diff] [review] Call revokeObjectURL() on search engine icon blob URLs. r=adw Review of attachment 8761445 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! Sorry this took so long.
Attachment #8761445 - Flags: review?(adw) → review+
Pushed by bkelly@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d6274311d4 Call revokeObjectURL() on search engine icon blob URLs. r=adw
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Verified as RESOLVED on Firefox Aurora 50.0a2(2016-09-09) using Linux Mint 18
Verified as RESOLVED on Firefox Aurora 50.0a2(2016-09-09) using Linux Mint 18
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: