@param {WebAssembly.Module=} module
(instance, module)
| 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 |
no test coverage detected