Closed Bug 1323998 Opened 8 years ago Closed 7 years ago

Stop using Scoped.h NSS types in dtlsidentity.(cpp|h) and nricectx.cpp

Categories

(Core :: WebRTC: Networking, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

Details

Attachments

(1 file)

Scoped.h is deprecated.
Rank: 45
Priority: -- → P4
Comment on attachment 8820314 [details]
Bug 1323998 - Stop using Scoped.h NSS types in dtlsidentity.(cpp|h) and nricectx.cpp.

https://reviewboard.mozilla.org/r/99838/#review100442

LGTM, if you can fix the constructor for DtlsIdentity.  I only found two call sites: https://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3A%22mozilla%3A%3ADtlsIdentity%3A%3ADtlsIdentity%28SECKEYPrivateKey+%2A%2C+CERTCertificate+%2A%2C+SSLKEAType%29%22

::: media/mtransport/dtlsidentity.h:26
(Diff revision 1)
>  
>  class DtlsIdentity final {
>   public:
>    // This constructor takes ownership of privkey and cert.
>    DtlsIdentity(SECKEYPrivateKey *privkey,
>                 CERTCertificate *cert,

I think that you should change this to accept Unique{SECKEYPrivateKey|CERTCertificate)&& and use Move() at the call sites.
Attachment #8820314 - Flags: review?(martin.thomson) → review+
Comment on attachment 8820314 [details]
Bug 1323998 - Stop using Scoped.h NSS types in dtlsidentity.(cpp|h) and nricectx.cpp.

https://reviewboard.mozilla.org/r/99838/#review100442

Thanks!

> I think that you should change this to accept Unique{SECKEYPrivateKey|CERTCertificate)&& and use Move() at the call sites.

Fixed, although I used plain UniqueX instead of UniqueX&& to make it clear that `DtlsIdentity` unconditionally takes ownership.
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/294ce2352aa7
Stop using Scoped.h NSS types in dtlsidentity.(cpp|h) and nricectx.cpp. r=mt
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/294ce2352aa7
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: