Closed
Bug 982072
Opened 11 years ago
Closed 11 years ago
RegisterStrongMemoryReporter leaks on failure
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: mccr8, Assigned: ehsan.akhgari)
References
Details
(Keywords: memory-leak, Whiteboard: [MemShrink])
Attachments
(1 file)
I just noticed this while reading code, and it might be cause of bug 981966 (another possibility is the doomsday scenario, bug 980401). How could we be leaking a memory reporter (OggReporter in this case) without any indication, if it is an ISupports class? Well, one way for that to happen is to do |RegisterStrongMemoryReporter(new WhateverReporter())| and have the call to |do_GetService| fail. The caller expects the register function to deal with it, so we leak, and we never called AddRef or Release on the reporter, so I think it is invisible to the XPCOM leak checker. I haven't checked if this is actually happening for the OggReporter, but we want to fix this problem in any case.
Reporter | ||
Comment 1•11 years ago
|
||
Okay, Nathan pointed out that I was reading the stack incorrectly, so we're not actually leaking a reporter in bug 981966, so I think this isn't actually happening right now. But it would still be good to fix, with at least an NS_ASSERTION or something on failure.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8389160 -
Flags: review?(nfroyd)
Updated•11 years ago
|
Attachment #8389160 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•