Closed Bug 1406486 Opened 7 years ago Closed 7 years ago

provide nsClientAuthRememberEntry/nsCertOverrideEntry with move constructors

Categories

(Core :: Security: PSM, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

(Whiteboard: [psm-assigned])

Attachments

(1 file)

Move constructors are more appropriate for these classes, since the underlying hashtable code will be moving them around, not copying them. We can take this opportunity to fix a bug in nsClientAuthRememberEntry: it wasn't transferring the value of mEntryKey, which would have been disastrous if the underlying hash table was ever resized.
These have the potential to be more efficient, and we're also fixing a bug in passing.
Attachment #8916083 - Flags: review?(dkeeler)
Comment on attachment 8916083 [details] [diff] [review] provide nsClientAuthRememberEntry/nsCertOverrideEntry with move constructors Review of attachment 8916083 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: security/manager/ssl/nsClientAuthRemember.h @@ +62,5 @@ > { > } > > + nsClientAuthRememberEntry(nsClientAuthRememberEntry&& aToMove) > + : mSettings(mozilla::Move(aToMove.mSettings)) I realize we've got unified compilation, but generally in PSM we've been directly including headers where we use what they declare rather than relying on getting them indirectly (also might be a nice opportunity to re-sort the includes in this file). @@ -66,2 @@ > { > - mSettings = aToCopy.mSettings; Siiiiiiiiiiiiiiiiiiiiiigh. Thanks.
Attachment #8916083 - Flags: review?(dkeeler) → review+
Priority: -- → P1
Whiteboard: [psm-assigned]
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1df1edaf60c3 provide nsClientAuthRememberEntry/nsCertOverrideEntry with move constructors; r=keeler
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: