Closed
Bug 399096
Opened 17 years ago
Closed 17 years ago
nsDOMCacheUpdateService leaks
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
(Keywords: memory-leak)
Attachments
(2 files)
3.76 KB,
patch
|
Details | Diff | Splinter Review | |
4.81 KB,
patch
|
dcamp
:
review+
Biesinger
:
superreview+
|
Details | Diff | Splinter Review |
nsDOMCacheUpdateService::GetInstance returns an addrefed pointer. I see lots of places in the code, however, that assume it doesn't. We therefore leak the single nsDOMCacheUpdateService when I run the tests in dom/tests/mochitest/ajax/offline. Ideally we could get away without all the addrefs/releases as was clearly the original intent of the code, but I don't know the ownership model well enough to make that work. When I changed those places to just use the global pointer directly, I found that in at least two cases (Init and ScheduleOnDocumentStop) the pointer was null, suggesting that nothing else was keeping it alive. Maybe someone needs to create the service via do_GetService in order for there to be a long-term owning reference to it? I didn't investigate that much, so please make suggestions for better options if you see them.
Flags: blocking1.9?
Attachment #284050 -
Flags: superreview?(cbiesinger)
Attachment #284050 -
Flags: review?(dcamp)
Assignee | ||
Comment 1•17 years ago
|
||
Comment on attachment 284050 [details] [diff] [review] Possible patch This is failing weirdly, probably due to that no-long-living-owning-pointer problem I mentioned in comment 0. This isn't ready yet...
Attachment #284050 -
Flags: superreview?(cbiesinger)
Attachment #284050 -
Flags: review?(dcamp)
Assignee | ||
Comment 2•17 years ago
|
||
This passes Mochitests now, and now we're in the same spot we were in before in that the owning reference in the service manager will keep the service alive, so notifications will get fired even after method scopes go away.
Attachment #284107 -
Flags: superreview?(cbiesinger)
Attachment #284107 -
Flags: review?(dcamp)
Updated•17 years ago
|
Attachment #284107 -
Flags: review?(dcamp) → review+
Updated•17 years ago
|
Attachment #284107 -
Flags: superreview?(cbiesinger) → superreview+
Assignee | ||
Comment 3•17 years ago
|
||
Comment on attachment 284107 [details] [diff] [review] Better patch Fixes one of the few refcounted-object leaks that shows up in Mochitests, which will reduce the noise keeping other leaks from being diagnosed...
Attachment #284107 -
Flags: approval1.9?
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Comment 4•17 years ago
|
||
Comment on attachment 284107 [details] [diff] [review] Better patch Blocker now. No need for approval (for check-in once the tree reopens). :)
Attachment #284107 -
Flags: approval1.9?
Keywords: checkin-needed
Priority: -- → P2
Assignee | ||
Comment 5•17 years ago
|
||
I'm just waiting for the checkin queue to reach a point of sanity before committing. My time's available irregularly enough that I don't think it's worth my time to put this on that list or to be the holdup when someone decides I'm next up but I don't have the time at that moment to commit it.
Keywords: checkin-needed
Putting this back on reeds queue. I'd rather just have this landed than wait for the right time. The earlier we can get stuff check off the fixed-list the better. Jeff, of course, if you do have time to land, please do so and mark as fixed
Keywords: checkin-needed
Assignee | ||
Comment 7•17 years ago
|
||
Fixt. Onward!
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Depends on: 397724
Flags: in-testsuite?
Keywords: checkin-needed
Resolution: --- → FIXED
Updated•11 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•