Closed Bug 1720422 Opened 5 months ago Closed 3 months ago

Templatized API for Typed Arrays and other data buffers

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(13 files, 1 obsolete file)

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
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

I would like to create a C++ API for accessing and manipulating ArrayBuffers and views of ArrayBuffers.

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Depends on: 1723245
No longer depends on: 1723245
Attachment #9232064 - Attachment description: Bug 1720422 - Label wrapped/maybeWrapped parameters correctly and fix class visibility → Bug 1720422 - Label wrapped/maybeWrapped parameters correctly
Attachment #9232064 - Attachment is obsolete: true
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77ff4529ea3e
Expose a templatized TypedArray<T> class in JSAPI r=jonco,nbp
https://hg.mozilla.org/integration/autoland/rev/ae5f6b9ecf4a
Switch structured cloning to use the templatized TypedArray<T> class. r=jonco
https://hg.mozilla.org/integration/autoland/rev/677e4aa42b4d
Make eg GetInt8ArrayData call TypedArray<Int8>::getData rather than the other way around (replace macros with function templates) r=jonco
https://hg.mozilla.org/integration/autoland/rev/410e13fdf4e5
Move typed array unwrap API to templatized version r=jonco
https://hg.mozilla.org/integration/autoland/rev/180daaed9cc8
Fill in the rest of the ArrayBuffer+ArrayBufferView hierarchy, and base more ArrayBufferViewObject public APIs off of new API r=jonco
https://hg.mozilla.org/integration/autoland/rev/f212ab757312
Add (type)Array aliases, eg JS::Int8Array r=jonco
https://hg.mozilla.org/integration/autoland/rev/b5bafd6f08d3
Convert the JS_GetObjectAs(type)Array APIs r=jonco
https://hg.mozilla.org/integration/autoland/rev/16695064a637
Convert the JS_Is(type)Array APIs r=jonco
https://hg.mozilla.org/integration/autoland/rev/23cc649c6e14
Move js::Scalar -> JS::Scalar for public API, but alias it as js::Scalar r=jonco
https://hg.mozilla.org/integration/autoland/rev/6880cf8c51bc
Switch DOM bindings typed arrays to using JSAPI templates r=jonco,smaug
https://hg.mozilla.org/integration/autoland/rev/44c3e9e78d0a
Support Rooted<...view type...> operations. r=jonco
https://hg.mozilla.org/integration/autoland/rev/ccb7a164fe32
Add tests of new ArrayBufferOrView API r=jonco
https://hg.mozilla.org/integration/autoland/rev/94293ba5a5a5
Fix hazards in TestingFunctions.cpp r=jonco
See Also: → 1726671

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:sfink, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(sphink)
Flags: needinfo?(jcoppeard)
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c3169618f2f
Expose a templatized TypedArray<T> class in JSAPI r=jonco,nbp
https://hg.mozilla.org/integration/autoland/rev/a66bd5c442a4
Switch structured cloning to use the templatized TypedArray<T> class. r=jonco
https://hg.mozilla.org/integration/autoland/rev/4791d6790af7
Make eg GetInt8ArrayData call TypedArray<Int8>::getData rather than the other way around (replace macros with function templates) r=jonco
https://hg.mozilla.org/integration/autoland/rev/2da058734d5c
Move typed array unwrap API to templatized version r=jonco
https://hg.mozilla.org/integration/autoland/rev/e0d16e395a5f
Fix hazards in TestingFunctions.cpp r=jonco
https://hg.mozilla.org/integration/autoland/rev/df0c1ee4d0b0
Fill in the rest of the ArrayBuffer+ArrayBufferView hierarchy, and base more ArrayBufferViewObject public APIs off of new API r=jonco
https://hg.mozilla.org/integration/autoland/rev/456fc09d6816
Add (type)Array aliases, eg JS::Int8Array r=jonco
https://hg.mozilla.org/integration/autoland/rev/2d444b132a3d
Convert the JS_GetObjectAs(type)Array APIs r=jonco
https://hg.mozilla.org/integration/autoland/rev/988eccbeb2ae
Convert the JS_Is(type)Array APIs r=jonco
https://hg.mozilla.org/integration/autoland/rev/5445f480023e
Move js::Scalar -> JS::Scalar for public API, but alias it as js::Scalar r=jonco
https://hg.mozilla.org/integration/autoland/rev/e162d996deac
Switch DOM bindings typed arrays to using JSAPI templates r=jonco,smaug
https://hg.mozilla.org/integration/autoland/rev/7c17e89fe77a
Support Rooted<...view type...> operations. r=jonco
https://hg.mozilla.org/integration/autoland/rev/31caca93507e
Add tests of new ArrayBufferOrView API r=jonco

Weird, this flooded me with "Code Review bot found <n> build errors on <phabrev>" messages that complain about serious compile errors, but it seems to have stuck. I did build it locally before landing. I'm not sure what happened.

Flags: needinfo?(sphink)
Flags: needinfo?(jcoppeard)
Regressions: 1736338
Regressions: 1731039
You need to log in before you can comment on or make changes to this bug.