Skip to content

Should JS-API compile methods accept shared buffers? #1907

@eqrion

Description

@eqrion

The JS-API for compiling modules takes a BufferSource for accepting bytecode [1]. This does not allow shared array buffers or shared array buffer views [2]. Firefox until Fx138 actually supported shared array buffers/views, but I removed this to be compliant with the spec here [3]. This also made some optimizations easier as you can assume there are no racing writes to the buffer.

We have since gotten bug reports that while Chrome doesn't support shared array buffers (which is why I thought it was a safe change to make in Firefox), it does support views of shared array buffers. Safari supports boths shared array buffers and view of shared array buffers.

[1] https://webassembly.github.io/spec/js-api/index.html#modules
[2] https://webidl.spec.whatwg.org/#BufferSource
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1931407

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions