Closed Bug 1362390 Opened 7 years ago Closed 7 years ago

make Base64Encode on nsString more tolerant of allocation failures

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

Bug 1362194 is making Base64Decode more tolerant of allocation failures, we might as well apply the same treatment to Base64Encode as well, since that can get called from script too.
This patch is essentially the same as bug 1362194, just done as a single patch.
This patch is dependent on some of the bits added in said bug.

crash-stats says we have a few crashes in this function and its callees, so
this is addressing a problem...though me might just be moving the crash
someplace else...
Attachment #8864852 - Flags: review?(continuation)
Attachment #8864852 - Flags: review?(continuation) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4b157d9d0e7
make Base64Encode tolerant of allocation failures; r=mccr8
Blocks: 1362449
https://hg.mozilla.org/mozilla-central/rev/a4b157d9d0e7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment on attachment 8864852 [details] [diff] [review]
make Base64Encode tolerant of allocation failures

Approval Request Comment
[Feature/Bug causing the regression]: many eons ago
[User impact if declined]: crashes (not in this bug, but this function is definitely implicated in crash signatures)
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: no
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: This is required for a clean uplift of bug 1362194, due to sloppy coding on the part of the author.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: We are now failing on OOM on a common codepath.
[String changes made/needed]: None.
Attachment #8864852 - Flags: approval-mozilla-beta?
Note that this bug and bug 1362194 landed in the same push on inbound, so that's why we didn't see any problems with bug 1362194 compiling on inbound.
Comment on attachment 8864852 [details] [diff] [review]
make Base64Encode tolerant of allocation failures

Required by bug 1362194. Beta54+. Should be in 54 beta 7.
Attachment #8864852 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Nathan Froyd [:froydnj] from comment #4)
> [Is this code covered by automated tests?]: yes
> [Has the fix been verified in Nightly?]: no
> [Needs manual test from QE? If yes, steps to reproduce]: no

Setting qe-verify- based on Nathan's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: