Skip to content

WebSocket::send_with_u8_array is broken with atomics, bulk-memory WASM features /SharedArrayBuffer WASM memory #4101

Closed as not planned
@r58Playz

Description

@r58Playz

Describe the Bug

When using the Atomics and Bulk Memory WASM features (SharedArrayBuffer WASM memory) WebSocket::send_with_u8_array throws an error from wasm-bindgen code. This can be worked around with a sed to create a Uint8Array from the WASM array, but that's obviously not clean.

Workaround example

Edit: This seems similar to #3772.

Steps to Reproduce

Run build.sh and serve.py in this repository and put a WebSocket server on localhost:4000: https://github.com/r58Playz/wasm-bindgen-ws-bug

Expected Behavior

WebSocket::send_with_u8_array should function properly.

Actual Behavior

This error:

Chrome:
Chrome error

Firefox:
Firefox error

WebKit:
image

Additional Context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions