MCPcopy Create free account
hub / github.com/GoogleChrome/samples / receiveInstance

Function receiveInstance

mkbitmap/mkbitmap.js:868–889  ·  view source on GitHub ↗

@param {WebAssembly.Module=} module

(instance, module)

Source from the content-addressed store, hash-verified

866 // performing other necessary setup
867 /** @param {WebAssembly.Module=} module*/
868 function receiveInstance(instance, module) {
869 var exports = instance.exports;
870
871 Module['asm'] = exports;
872
873 wasmMemory = Module['asm']['memory'];
874 assert(wasmMemory, "memory not found in wasm exports");
875 // This assertion doesn't hold when emscripten is run in --post-link
876 // mode.
877 // TODO(sbc): Read INITIAL_MEMORY out of the wasm file in post-link mode.
878 //assert(wasmMemory.buffer.byteLength === 16777216);
879 updateMemoryViews();
880
881 wasmTable = Module['asm']['__indirect_function_table'];
882 assert(wasmTable, "table not found in wasm exports");
883
884 addOnInit(Module['asm']['__wasm_call_ctors']);
885
886 removeRunDependency('wasm-instantiate');
887
888 return exports;
889 }
890 // wait for the pthread pool (if any)
891 addRunDependency('wasm-instantiate');
892

Callers 1

Calls 4

assertFunction · 0.70
updateMemoryViewsFunction · 0.70
addOnInitFunction · 0.70
removeRunDependencyFunction · 0.70

Tested by

no test coverage detected