Skip to content

worker: fix passing multiple SharedArrayBuffers at once

V8 has a handle scope below each GetSharedArrayBufferId() call, so using a v8::Local that outlives that handle scope to store references to SharedArrayBuffers is invalid and may cause accidental de-duplication of passed SharedArrayBuffers.

Use a persistent handle instead to address this issue.

Fixes: https://github.com/nodejs/node/issues/28559

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading