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

Function constructAndStore

test/fixtures/wpt/encoding/streams/realms.window.js:103–110  ·  view source on GitHub ↗
(what)

Source from the content-addressed store, hash-verified

101// writeRealm. Returns the id that can be used to access the object in those
102// realms. |what| can contain constructor arguments.
103async function constructAndStore(what) {
104 const objId = id();
105 // Call |constructorRealm|'s constructor from inside |constructedRealm|.
106 writeRealm[objId] = await evalInRealmAndReturn(
107 constructedRealm, `new parent.constructorRealm.${what}`);
108 readRealm[objId] = writeRealm[objId];
109 return objId;
110}
111
112// Calls read() on the readable side of the TransformStream stored in
113// readRealm[objId]. Locks the readable side as a side-effect.

Callers 3

runGenericTestsFunction · 0.85

Calls 2

evalInRealmAndReturnFunction · 0.85
idFunction · 0.50

Tested by

no test coverage detected