Closed
Bug 1535357
Opened 6 years ago
Closed 6 years ago
Make nsHttpConnectionInfo::Clone() return already_AddRefed<>
Categories
(Core :: Networking: HTTP, enhancement)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla67
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file)
I looked at Valentin's patch in bug 1512472, and went through and checked every other place we create a nsHttpConnectionInfo. The Clone method also assigns to a raw pointer. The code as it is looks okay to me, but it could be made more robust by assigning into a RefPtr and returning an already_AddRefed or RefPtr. This will require a minor change to the caller in nsHttpConnectionInfo::CloneAsDirectRoute(), but I think the rest of the callers should work as-is.
Assignee | ||
Comment 1•6 years ago
|
||
This will make it harder for callers of this method to accidentally
leak the connection info.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be4af23f4c1a
Make nsHttpConnectionInfo::Clone() return already_AddRefed<>. r=valentin
Comment 3•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in
before you can comment on or make changes to this bug.
Description
•