Closed Bug 1258298 Opened 4 years ago Closed 4 years ago

Switch more Scoped.h templates in PSM to UniquePtr equivalents

Categories

(Core :: Security: PSM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

References

Details

Attachments

(1 file)

Scoped.h is deprecated, so PSM should continue migrating to UniquePtr.
In addition, adding more UniquePtr templates will slightly reduce conversion friction for consumers of ScopedNSSTypes.h.
(Updating summary because I found more Scoped.h templates that can be converted as part of this bug.)
Summary: Switch to UniquePtr equivalents of 4 Scoped.h templates in PSM → Switch more Scoped.h templates in PSM to UniquePtr equivalents
Comment on attachment 8734654 [details]
MozReview Request: Bug 1258298 - Switch more Scoped.h templates in PSM to UniquePtr equivalents.

https://reviewboard.mozilla.org/r/42383/#review38991

LGTM - see comment though.

::: security/manager/ssl/ScopedNSSTypes.h:371
(Diff revision 1)
> +                                      PK11_FreeSymKey)
>  
>  MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniquePLArenaPool,
>                                        PLArenaPool,
>                                        internal::PORT_FreeArena_false)
> +MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniquePORTString,

There are some places in PSM where we're using the long form of an equivalent of this (e.g. https://dxr.mozilla.org/mozilla-central/rev/d5f3da0cfe7ccf846c354014c9b059fad6ba0de5/security/manager/ssl/SSLServerCertVerification.cpp#894 ). It would be nice to update them to use UniquePORTString.
Attachment #8734654 - Flags: review?(dkeeler) → review+
https://reviewboard.mozilla.org/r/42383/#review38991

Thanks for the review!

> There are some places in PSM where we're using the long form of an equivalent of this (e.g. https://dxr.mozilla.org/mozilla-central/rev/d5f3da0cfe7ccf846c354014c9b059fad6ba0de5/security/manager/ssl/SSLServerCertVerification.cpp#894 ). It would be nice to update them to use UniquePORTString.

Noted. I have a WIP for using UniquePORTString more in PSM anyways, so I'll make those changes in Bug 1259909 as well.
https://hg.mozilla.org/mozilla-central/rev/163b4a287e0a
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Blocks: 1260642
You need to log in before you can comment on or make changes to this bug.