Skip to content

[threads][test][js-api] Add tests for growing shared memory#248

Open
backes wants to merge 1 commit intoWebAssembly:mainfrom
backes:add-test-for-grow-SAB
Open

[threads][test][js-api] Add tests for growing shared memory#248
backes wants to merge 1 commit intoWebAssembly:mainfrom
backes:add-test-for-grow-SAB

Conversation

@backes
Copy link
Member

@backes backes commented Mar 12, 2026

Add a few first (!) js-api test to this repo. In particular:

  • Growing a non-shared memory always detaches the old buffer and allocates a fresh one (as before).
  • Growing a shared memory only refreshes the buffer if the delta in pages is > 0.
  • Growing a shared memory has no effect on unrelated shared memories.

Note that V8 didn't implement this correctly until https://crrev.com/c/7660970, see https://crbug.com/492128992.

Add a few first (!) js-api test to this repo. In particular:
- Growing a non-shared memory always detaches the old buffer and
  allocates a fresh one (as before).
- Growing a shared memory only refreshes the buffer if the delta in
  pages is > 0.
- Growing a shared memory has no effect on unrelated shared memories.

Note that V8 didn't implement this correctly until
https://crrev.com/c/7660970, see https://crbug.com/492128992.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant