Closed Bug 1748719 Opened 2 years ago Closed 2 years ago

Make nsStringInputStream more flexible as to the backing data buffer

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(1 file)

This change aims to make the way that the nsStringInputStream owns the backing data buffer more flexible. This has a few impacts, including allowing arbitrarily large payload sizes on 64-bit platforms, not requiring as complex checks around borrowed string buffers or nsTArray data storage, and supporting custom data ownership schemes such as those used by blobs.

This change aims to make the way that the nsStringInputStream owns the backing
data buffer more flexible. This has a few impacts, including allowing
arbitrarily large payload sizes on 64-bit platforms, not requiring as complex
checks around borrowed string buffers or nsTArray data storage, and supporting
custom data ownership schemes such as those used by blobs.

The new system uses a separate refcounted object internally to provide the
contiguous backing buffer, with the nsStringInputStream wrapping it and
providing the nsIInputStream interface and cursor. This also avoids issues
around the buffer being mutated during reads, as mutating the nsIInputStream
no longer mutates the actual data storage object.

Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3cc75bb261ba
Make nsStringInputStream more flexible as to the backing data buffer, r=mccr8
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Regressions: 1749497

Sorry. I deleted the comment , should have made it on bug 1749497

Status: RESOLVED → REOPENED
Flags: needinfo?(nika)
Resolution: FIXED → ---
Target Milestone: 97 Branch → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Flags: needinfo?(nika)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: