Closed Bug 1454040 Opened 6 years ago Closed 6 years ago

remove nsAutoPtr use from nsSMILTimedElement

Categories

(Core :: Layout, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(2 files)

We have something newer and better in UniquePtr.
UniquePtr is nicer than nsAutoPtr.
Attachment #8967826 - Flags: review?(dholbert)
This patch handles the other use of nsAutoPtr in nsSMILTimedElement: the
storing of nsSMILTimeValueSpecs.
Attachment #8967827 - Flags: review?(dholbert)
Comment on attachment 8967826 [details] [diff] [review]
part 1 - make time intervals in nsSMILTimedElement UniquePtrs

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

This seems fine. r=me , 2 stylistic nits:

::: dom/smil/nsSMILTimedElement.h
@@ +354,5 @@
>  protected:
>    // Typedefs
>    typedef nsTArray<nsAutoPtr<nsSMILTimeValueSpec> > TimeValueSpecList;
>    typedef nsTArray<RefPtr<nsSMILInstanceTime> >   InstanceTimeList;
> +  typedef nsTArray<mozilla::UniquePtr<nsSMILInterval>>      IntervalList;

Nit: please get rid of the extra spaces before "IntervalList" here.

(They were presumably for alignment at some point in the past, but now with the extra length from "mozilla::UniquePtr", they just throw this token way off to the right awkwardly.)

@@ +600,5 @@
>    InstanceTimeList                mEndInstances;
>    uint32_t                        mInstanceSerialIndex;
>  
>    nsSMILAnimationFunction*        mClient;
> +  mozilla::UniquePtr<nsSMILInterval>       mCurrentInterval;

Here too, let's kill the awkward now-useless extra spaces.
Attachment #8967826 - Flags: review?(dholbert) → review+
Comment on attachment 8967827 [details] [diff] [review]
part 2 - remove nsAutoPtr entirely from nsSMILTimedElement

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

r=me
Attachment #8967827 - Flags: review?(dholbert) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/20babe43b5d5
part 1 - make time intervals in nsSMILTimedElement UniquePtrs; r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/33c879d73a09
part 2 - remove nsAutoPtr entirely from nsSMILTimedElement; r=dholbert
https://hg.mozilla.org/mozilla-central/rev/20babe43b5d5
https://hg.mozilla.org/mozilla-central/rev/33c879d73a09
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.