Closed Bug 1293666 Opened 9 years ago Closed 9 years ago

Add initializer_list ctor to AutoTArray

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

I assume this is just an oversight of bug 1228641, but I don't see any reason to not have it. (I thought I might have a use for it, but I think not after all.)
I only found a few places that could use this, so that isn't the strongest argument for it, but oh well.
Attachment #8779350 - Flags: review?(nfroyd)
Hmm, I guess that's actually bogus. I expect you have to call Init() or something like the other ctors.
This passes an ASan try run which hopefully would have caught the prior error? https://treeherder.mozilla.org/#/jobs?repo=try&revision=bdef787152b8
Comment on attachment 8779350 [details] Bug 1293666 - Add initializer_list ctor to AutoTArray. https://reviewboard.mozilla.org/r/70338/#review68018 Sure, why not? ::: docshell/base/nsDocShell.cpp:4455 (Diff revision 2) > return NS_OK; > } > > int32_t index = 0; > sessionHistory->GetIndex(&index); > - AutoTArray<uint64_t, 16> ids; > + AutoTArray<uint64_t, 16> ids({mHistoryID}); lol @ a 16 element auto array being used here.
Attachment #8779350 - Flags: review?(nfroyd) → review+
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c42c82251d6 Add initializer_list ctor to AutoTArray. r=froydnj
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: