Make nsStringInputStream more flexible as to the backing data buffer
Categories
(Core :: XPCOM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
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.
Assignee | ||
Comment 1•3 years ago
|
||
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.
Comment 3•3 years ago
|
||
bugherder |
Comment 4•3 years ago
|
||
Sorry. I deleted the comment , should have made it on bug 1749497
Updated•3 years ago
|
Updated•3 years ago
|
Comment hidden (Intermittent Failures Robot) |
Description
•