Open Bug 1660007 Opened 5 years ago Updated 5 years ago

Avoid serializing binary data in nsStructuredCloneContainer::GetDataAsBase64

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: sg, Unassigned)

References

Details

nsStructuredCloneContainer::GetDataAsBase64 first serializes the binary data into a temporary nsAutoCString before calling Base64Encode. In principle, Base64Encode could work directly on the iterator's segments, and avoid the potentially large temporary allocation and copying. However, this requires an additional, more complex variant of Base64Encode, since the segment size is not guaranteed to be a multiple of 3.

Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.