MCPcopy Index your code
hub / github.com/nodejs/node / finalizeBindings

Method finalizeBindings

lib/wasi.js:112–126  ·  view source on GitHub ↗
(instance, {
    memory = instance?.exports?.memory,
  } = kEmptyObject)

Source from the content-addressed store, hash-verified

110 }
111
112 finalizeBindings(instance, {
113 memory = instance?.exports?.memory,
114 } = kEmptyObject) {
115 if (this[kStarted]) {
116 throw new ERR_WASI_ALREADY_STARTED();
117 }
118
119 validateObject(instance, 'instance');
120 validateObject(instance.exports, 'instance.exports');
121
122 this[kSetMemory](memory);
123
124 this[kInstance] = instance;
125 this[kStarted] = true;
126 }
127
128 // Must not export _initialize, must export _start
129 start(instance) {

Callers 3

startMethod · 0.95
initializeMethod · 0.95
wasi-preview-1.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected