Closed Bug 1220714 Opened 9 years ago Closed 9 years ago

use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in layout/

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

No description provided.
Comment on attachment 8682013 [details] [diff] [review] use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in layout/ Review of attachment 8682013 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=me with or without the suggested tweak below: ::: layout/style/CSSVariableResolver.cpp @@ +66,5 @@ > // Array of booleans, where each index is a variable ID. If an element is > // true, it indicates that the variable we have called > // EnumerateVariableReferences for has a reference to the variable with > // that ID. > + UniquePtr<bool[]> mReferences; Looks like this UniquePtr could be declared as 'const' -- it's given a value in the init list, and that value is never reassigned or reset. And making it 'const' gives a reader additional information/sanity-checking about the lifetime of the resource here. If you feel like it, feel free to make that additional tweak here (adding 'const'). I tried it locally, & it compiles just fine.
Attachment #8682013 - Flags: review?(dholbert) → review+
(In reply to Daniel Holbert [:dholbert] from comment #2) > Looks like this UniquePtr could be declared as 'const' -- it's given a value > in the init list, and that value is never reassigned or reset. And making > it 'const' gives a reader additional information/sanity-checking about the > lifetime of the resource here. > > If you feel like it, feel free to make that additional tweak here (adding > 'const'). I tried it locally, & it compiles just fine. That's a good idea, I'll do that. Thanks for the review!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
Blocks: 1229985
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: