Closed Bug 1260644 Opened 4 years ago Closed 4 years ago

Use UniquePLArenaPool to manage PLArenaPools in PSM

Categories

(Core :: Security: PSM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

References

Details

(Whiteboard: [psm-assigned])

Attachments

(1 file)

UniquePLArenaPools should be used instead of:
 - ScopedPLArenaPool, because Scoped.h is deprecated.
 - Manual PLArenaPool pointers, because manual memory management can be error prone.
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+
https://reviewboard.mozilla.org/r/44243/#review41083

Thanks for the review!

I'll address the things noted below in Bug 1029173.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/63c6be19398d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.