Closed Bug 1265452 Opened 4 years ago Closed 4 years ago

Replace usage of nsAutoPtr in gfx/thebes with mozilla::UniquePtr

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(2 files, 1 obsolete file)

Most of the usage of nsAutoPtr in thebes seems to be in font-related code, so I thought I'd take a stab at eliminating it in the interests of general modernization.
Attachment #8742420 - Flags: review?(jmuizelaar)
Blocks: 1265459
Comment on attachment 8742420 [details] [diff] [review]
Remove use of nsAutoPtr from gfx/thebes

Review of attachment 8742420 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxFont.cpp
@@ +862,1 @@
>      // of classes that lack a proper copy constructor

This isn't true anymore. Can we just make mGlyphExtentsArray an nsTArray of UniquePtr? You can do that in a follow up.
Attachment #8742420 - Flags: review?(jmuizelaar) → review+
Tryserver points out that I'd missed a change in gfxFT2FontList.cpp for Android, so added that; carrying over r=jrmuizel.
Attachment #8742420 - Attachment is obsolete: true
As suggested in comment 2. (Note that we're changing an AutoTArray to nsTArray here; I don't think there's much point in the AutoTArray as the chances that we'll _only_ ever access the extents of the space glyph in a given font are pretty minimal.)
Attachment #8742472 - Flags: review?(jmuizelaar)
Attachment #8742472 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/9d396d690080
https://hg.mozilla.org/mozilla-central/rev/1d5416c99477
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.