11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst { MessageChannel } = require('worker_threads'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci// Regression test for https://github.com/nodejs/node/issues/28559 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciconst obj = [ 91cb0ef41Sopenharmony_ci [ new SharedArrayBuffer(0), new SharedArrayBuffer(1) ], 101cb0ef41Sopenharmony_ci [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ], 111cb0ef41Sopenharmony_ci]; 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciconst { port1, port2 } = new MessageChannel(); 141cb0ef41Sopenharmony_ciport1.once('message', common.mustCall((message) => { 151cb0ef41Sopenharmony_ci assert.deepStrictEqual(message, obj); 161cb0ef41Sopenharmony_ci})); 171cb0ef41Sopenharmony_ciport2.postMessage(obj); 18