Use UniquePLArenaPool to manage PLArenaPools in PSM

RESOLVED FIXED in Firefox 48

Status

()

Core
Security: PSM
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

Tracking

unspecified
mozilla48
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

(Whiteboard: [psm-assigned])

MozReview Requests

()

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

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
UniquePLArenaPools should be used instead of:
 - ScopedPLArenaPool, because Scoped.h is deprecated.
 - Manual PLArenaPool pointers, because manual memory management can be error prone.
(Assignee)

Comment 1

2 years ago
Created attachment 8738027 [details]
MozReview Request: Bug 1260644 - Use UniquePLArenaPool to manage PLArenaPools in PSM.

Review commit: https://reviewboard.mozilla.org/r/44243/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/44243/
Attachment #8738027 - Flags: review?(dkeeler)
Comment on attachment 8738027 [details]
MozReview Request: Bug 1260644 - Use UniquePLArenaPool to manage PLArenaPools in PSM.

https://reviewboard.mozilla.org/r/44243/#review41083

LGTM.

::: security/manager/ssl/nsDataSignatureVerifier.cpp:44
(Diff revision 1)
>  nsDataSignatureVerifier::VerifyData(const nsACString & aData,
>                                      const nsACString & aSignature,
>                                      const nsACString & aPublicKey,
>                                      bool *_retval)
>  {
>      // Allocate an arena to handle the majority of the allocations

This function should be 2-space indented if you feel like fixing that too. Not a big deal, though.

::: security/manager/ssl/nsDataSignatureVerifier.cpp:65
(Diff revision 1)
>      if (!pki) {
> -        PORT_FreeArena(arena, false);
>          return NS_ERROR_FAILURE;
>      }
>      SECKEYPublicKey *publicKey = SECKEY_ExtractPublicKey(pki);
>      SECKEY_DestroySubjectPublicKeyInfo(pki);

Hmmm - looks like this function could benefit from some other UniqueType conversions (that can be a follow-up, though).
Attachment #8738027 - Flags: review?(dkeeler) → review+
(Assignee)

Comment 3

2 years ago
https://reviewboard.mozilla.org/r/44243/#review41083

Thanks for the review!

I'll address the things noted below in Bug 1029173.
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/63c6be19398d
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.