worker: fix crash when SharedArrayBuffer outlives creating thread
Use the parent thread’s ArrayBuffer::Allocator
when creating a
Worker instance, as that allocator is guaranteed to outlive the
Worker itself.
Fixes: https://github.com/nodejs/node/issues/28777 Fixes: https://github.com/nodejs/node/issues/28773
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines