Closed Bug 1232374 Opened 9 years ago Closed 9 years ago

remove nsAutoArrayPtr usages from toolkit/

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: froydnj, Assigned: haik)

References

Details

Attachments

(1 file)

There are just a handful of these:

https://dxr.mozilla.org/mozilla-central/search?q=nsAutoArrayPtr+path%3Atoolkit&redirect=true&case=false

They should be converted to use UniquePtr<T[]> instead; the idiomatic way of declaring and defining a UniquePtr is:

auto var = MakeUnique<T[]>(length);

Since nsAutoArrayPtr implicitly converts to T* and UniquePtr does not, you'll have to add |.get()| calls for all uses of the raw pointer.  Accesses such as |var[i]| do not need any special treatment.
Haik, this would be a good simple first bug to get used to the whole patch workflow. Nathan came up with this for you.
Assignee: nobody → haftandilian
This is my try link,
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1179a98c6208
A bug was found in the version submitted to try. Executing the
profile manager locally crashed on exit. Fixed that bug in this
patch. Did not re-run try.
Comment on attachment 8699125 [details] [diff] [review]
remove nsAutoArrayPtr usages from toolkit/

Removed from NULL checks that no longer needed due to infallible allocation.
Attachment #8699125 - Flags: review?(nfroyd)
Attachment #8699125 - Flags: review?(nfroyd) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a20e57b2fd30
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: