Closed
Bug 1210912
Opened 9 years ago
Closed 9 years ago
fix widget leak in LookupRegisteredPluginWindow
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
1.49 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
nsRefPtrHashtable::Get follows XPCOM outparam rules, so it addrefs its argument prior to returning it. LookupRegisteredPluginWindow, however, doesn't know anything about the additional reference, and neither does anything else that calls it (which is, fortunately, not that much code). So every widget returned by this function will leak. To fix this, we use nsRefPtrHashtable::GetWeak, which doesn't addref its argument, but merely returns the raw pointer, leaving the hashtable responsible for the owning reference.
Assignee | ||
Comment 1•9 years ago
|
||
I *think* this is a real leak, though I find it a little difficult to imagine that our tests haven't caught this...
Attachment #8669093 -
Flags: review?(roc)
Attachment #8669093 -
Flags: review?(roc) → review+
Comment 3•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e54d330a1de6
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•