Closed
Bug 1396676
Opened 7 years ago
Closed 7 years ago
Don't leak CookieServiceChild in every child process
Categories
(Core :: Networking: Cookies, enhancement)
Core
Networking: Cookies
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
Details
(Whiteboard: [necko-active])
Attachments
(1 file)
Because CookieServiceChild::GetSingleton does an addref but returns a raw pointer, it's easy to use it in ways that will cause a shutdown leak (as the patches in bug 1331680 did). It should return an already_AddRefed instead.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8904366 [details]
Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods.
https://reviewboard.mozilla.org/r/176170/#review181380
::: netwerk/cookie/nsCookieService.h:219
(Diff revision 1)
> NS_DECL_NSICOOKIEMANAGER2
> NS_DECL_NSIMEMORYREPORTER
>
> nsCookieService();
> - static nsICookieService* GetXPCOMSingleton();
> - nsresult Init();
> + static already_AddRefed<nsICookieService> GetXPCOMSingleton();
> + nsresult Init();
nit: just remove the extra whitespace; it's not worth formatting these lines to match.
Attachment #8904366 -
Flags: review?(josh) → review+
Updated•7 years ago
|
Whiteboard: [necko-active]
Assignee | ||
Comment 3•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4252412b1ac3b90d0845e7c8af5f8231d4e8bce
Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods. r=jdm
Comment 4•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•