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

RESOLVED FIXED in Firefox 53

Status

()

Core
WebRTC: Networking
P4
minor
Rank:
45
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
Scoped.h is deprecated.
Rank: 45
Priority: -- → P4
Comment hidden (mozreview-request)

Comment 2

10 months ago
mozreview-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

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+
(Assignee)

Comment 3

10 months ago
mozreview-review-reply
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.
Comment hidden (mozreview-request)
(Assignee)

Comment 5

10 months ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2856287b145560823a26a2efb6fd6e3039eaaad1
Orange X(10) looks like an intermittent.
Keywords: checkin-needed

Comment 6

10 months ago
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

Comment 7

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/294ce2352aa7
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.