mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
8c36168b42
`--no-harmony-sharedarraybuffer` was removed from V8 but it's still possible to disable the feature with `--enable-sharedarraybuffer-per-context`. PR-URL: https://github.com/nodejs/node/pull/49639 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
22 lines
563 B
JavaScript
22 lines
563 B
JavaScript
// Flags: --enable-sharedarraybuffer-per-context
|
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
// Regression test for https://github.com/nodejs/node/issues/39717.
|
|
|
|
// Do not use isMainThread so that this test itself can be run inside a Worker.
|
|
if (!process.env.HAS_STARTED_WORKER) {
|
|
process.env.HAS_STARTED_WORKER = 1;
|
|
const w = new Worker(__filename);
|
|
|
|
w.on('exit', common.mustCall((status) => {
|
|
assert.strictEqual(status, 2);
|
|
}));
|
|
} else {
|
|
process.exit(2);
|
|
}
|