Closed
Bug 1342900
Opened 9 years ago
Closed 9 years ago
Remove usage of nsTArray<nsAutoPtr<>> in Classifier
Categories
(Toolkit :: Safe Browsing, defect, P2)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: gcp, Assigned: cfu, Mentored)
References
Details
Attachments
(1 file)
https://dxr.mozilla.org/mozilla-central/rev/16effd5b21ab03629feca04b5b83911bb757394c/toolkit/components/url-classifier/Classifier.cpp#65
It's very surprising nsTArray<nsAutoPtr<>> compiles, let alone works at all (if it really does, actually). This usage is expressly forbidden by auto_ptr because it's extremely prone to errors: containers generally assume that internal values can be copied, but copying an auto_ptr transfers ownership, so it does not have real copy semantics.
UniquePtr should be used as it does not suffer from this problem.
Updated•9 years ago
|
Assignee: nobody → hchang
Status: NEW → ASSIGNED
Updated•9 years ago
|
Assignee: hchang → cfu
Mentor: hchang
| Comment hidden (mozreview-request) |
Comment 2•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8864753 [details]
Bug 1342900 - Remove usage of nsTArray<nsAutoPtr<>> in Classifier.
https://reviewboard.mozilla.org/r/136418/#review139554
Looks good to me! Thanks.
Attachment #8864753 -
Flags: review?(dlee) → review+
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 4•9 years ago
|
||
needs final review/ship it so we can use autolander. thanks
Flags: needinfo?(cfu)
Keywords: checkin-needed
| Assignee | ||
Updated•9 years ago
|
Attachment #8864753 -
Flags: review?(hchang)
Pushed by jhao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/170fee4541a3
Remove usage of nsTArray<nsAutoPtr<>> in Classifier. r=dimi
Updated•9 years ago
|
Attachment #8864753 -
Flags: review?(hchang)
Comment 6•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 7•9 years ago
|
||
Chung-Sheng,
Congratulations to your good first bug!! ;)
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(cfu)
You need to log in
before you can comment on or make changes to this bug.
Description
•