Make structured cloning work with large array buffers
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(8 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
This will need format changes for ArrayBuffer, TypedArray, DataView objects because it stores (some) length values as 32-bit integers. We still need to support reading the current format, so we also have to add tests for that.
I wrote some patches for this a few months ago that I just have to clean up.
Assignee | ||
Comment 1•4 years ago
|
||
This ensures we can still read this after we add the new V3 types.
Assignee | ||
Comment 2•4 years ago
|
||
Renames SCTAG_ARRAY_BUFFER_OBJECT to SCTAG_ARRAY_BUFFER_OBJECT_V2 and adds a new
SCTAG_ARRAY_BUFFER_OBJECT that encodes the length as 64-bit value.
Depends on D101734
Assignee | ||
Comment 3•4 years ago
|
||
Instead of storing the length in the 32-bit data and the array type separately as
64-bit value, the new version just switches those.
Depends on D101735
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D101736
Assignee | ||
Comment 5•4 years ago
|
||
There are no backwards-compatibility concerns because SABs are only cloned within
the same process (checked in writeSharedArrayBuffer).
Depends on D101737
Assignee | ||
Comment 6•4 years ago
|
||
The length is encoded as 64-bit value (extraData) and used within the same process.
Depends on D101738
Assignee | ||
Comment 7•4 years ago
|
||
This prevents truncation in the structured clone code.
Depends on D101739
Assignee | ||
Comment 8•4 years ago
|
||
Depends on D101740
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eae09146c9f9
https://hg.mozilla.org/mozilla-central/rev/fae906026e24
https://hg.mozilla.org/mozilla-central/rev/ad251c4f6d76
https://hg.mozilla.org/mozilla-central/rev/2ca9f9036962
https://hg.mozilla.org/mozilla-central/rev/7f17f8fb1135
https://hg.mozilla.org/mozilla-central/rev/f7ac99e85da7
https://hg.mozilla.org/mozilla-central/rev/ea90adb7bf61
https://hg.mozilla.org/mozilla-central/rev/d5154885d8d2
Description
•