Closed Bug 1342900 Opened 9 years ago Closed 9 years ago

Remove usage of nsTArray<nsAutoPtr<>> in Classifier

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

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.
Blocks: 1296820
Priority: -- → P2
Assignee: nobody → hchang
Status: NEW → ASSIGNED
Assignee: hchang → cfu
Mentor: hchang
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+
Keywords: checkin-needed
needs final review/ship it so we can use autolander. thanks
Flags: needinfo?(cfu)
Keywords: checkin-needed
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
Attachment #8864753 - Flags: review?(hchang)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Chung-Sheng, Congratulations to your good first bug!! ;)
Flags: needinfo?(cfu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: