Closed Bug 257211 Opened 20 years ago Closed 20 years ago

nsFormFillController::StartSearch leaks nsPasswordManager singleton

Categories

(Toolkit :: Form Manager, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: fixed-aviary1.0, memory-leak, Whiteboard: [patch])

Attachments

(1 file)

nsFormFillController::StartSearch leaks the nsPasswordManager singleton.  This
is ugly to fix because NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects a
function returning a raw AddRef'd pointer.  So I'll just fix it the ugly way, at
the call site.  And there's no need to bother with NS_IF_RELEASE when we would
have crashed the line before given a null pointer.

Steps to reproduce:
 * start Firefox
 * click in the search box
 * type Mozilla
 * hit enter
 * exit Firefox
Severity: normal → minor
Status: NEW → ASSIGNED
Keywords: mlk
Attachment #157234 - Flags: superreview?(bryner)
Attachment #157234 - Flags: review?(bryner)
Comment on attachment 157234 [details] [diff] [review]
patch

Can you instead change nsPasswordMangager::GetInstance to return
already_AddRefed<nsPasswordManager> and then use an nsCOMPtr in this code?
Attachment #157234 - Flags: superreview?(bryner)
Attachment #157234 - Flags: superreview+
Attachment #157234 - Flags: review?(bryner)
Attachment #157234 - Flags: review+
Fix checked in to trunk, 2004-09-01 17:40 -0700.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 157234 [details] [diff] [review]
patch

a=asa for branch checkin.
Attachment #157234 - Flags: approval-aviary? → approval-aviary+
Fix checked in to AVIARY_1_0_20040515_BRANCH, 2004-09-14 13:46 -0700.
Keywords: fixed-aviary1.0
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: