MCPcopy Create free account
hub / github.com/nodejs/node / workerCode

Function workerCode

deps/v8/test/mjsunit/wasm/grow-shared-memory.js:37–46  ·  view source on GitHub ↗
(workerHelpers)

Source from the content-addressed store, hash-verified

35(function TestPostMessageWithGrow() {
36 print(arguments.callee.name);
37 function workerCode(workerHelpers) {
38 eval(workerHelpers);
39 onmessage = function({data:obj}) {
40 assertIsWasmSharedMemory(obj.memory);
41 assertTrue(1 === obj.memory.grow(1));
42 assertTrue(obj.memory.buffer.byteLength === obj.expected_size);
43 assertIsWasmSharedMemory(obj.memory);
44 postMessage("OK");
45 }
46 }
47 let worker = new Worker(workerCode,
48 {type: 'function', arguments: [workerHelpers]});
49

Callers

nothing calls this directly

Calls 4

assertIsWasmSharedMemoryFunction · 0.70
assertTrueFunction · 0.70
evalFunction · 0.50
mainMethod · 0.45

Tested by

no test coverage detected