Closed Bug 289843 Opened 20 years ago Closed 20 years ago

webbrowserpersist should release reference to listener at some time

Categories

(Core Graveyard :: Embedding: APIs, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta3

People

(Reporter: Biesinger, Assigned: Biesinger)

Details

(Keywords: memory-leak)

Attachments

(1 file)

currently, webbrowserpersist never releases the reference to its listener (unless SetProgressListener is called). that sucks because the listener may well hold a reference to wbp in order to call cancelSave(). wbp should probably null it out in onStopRequest or somesuch.
biesi, want to just post a patch? I doubt Adam plans to look at this any time soon....
Assignee: adamlock → cbiesinger
Target Milestone: --- → mozilla1.8beta3
Attached patch patchSplinter Review
Attachment #181724 - Flags: review?(bzbarsky)
Status: NEW → ASSIGNED
Priority: -- → P2
Attachment #181724 - Flags: review?(bzbarsky) → review+
Attachment #181724 - Flags: superreview?(darin)
Comment on attachment 181724 [details] [diff] [review] patch The code is ok with mProgressListener being null after this point, right? i presume so, just want to be make sure ;)
Attachment #181724 - Flags: superreview?(darin) → superreview+
Comment on attachment 181724 [details] [diff] [review] patch yes; and webbrowserpersist nullchecks every use of mProgressListener (not all users might set a listener) This patch fixes a potential memory leak, should be low risk
Attachment #181724 - Flags: approval1.8b2?
Attachment #181724 - Flags: approval1.8b2? → approval1.8b2+
Checking in embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp; /cvsroot/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp,v <-- nsWebBrowserPersist.cpp new revision: 1.109; previous revision: 1.108 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: