Closed
Bug 1439362
Opened 3 years ago
Closed 3 years ago
make nsBase64Encoder slightly less malloc-happy
Categories
(Core :: Networking, enhancement, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
1.75 KB,
patch
|
valentin
:
review+
|
Details | Diff | Splinter Review |
nsBase64Encoder::Finish currently works by calling PL_Base64Encode to allocate a base64-encoded string, then Assign()'ing that to the result string, another allocation. mozilla::Base64Encode enables us to base64 encode directly into the result string with a single allocation, saving an allocation. (Base64Encode is also slightly more efficient, because we don't have to do a strlen() on the string being Assign()'d.) Let's use Base64Encode instead.
![]() |
Assignee | |
Comment 1•3 years ago
|
||
A small improvement, but a nice one.
Attachment #8952122 -
Flags: review?(valentin.gosu)
Attachment #8952122 -
Flags: review?(valentin.gosu) → review+
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/43b8d13b9961 make nsBase64Encoder slightly less malloc-happy; r=valentin
Comment 3•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43b8d13b9961
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•