(binaryFile, imports, receiver)
| 801 | } |
| 802 | |
| 803 | function instantiateArrayBuffer(binaryFile, imports, receiver) { |
| 804 | return getBinaryPromise(binaryFile).then(function(binary) { |
| 805 | return WebAssembly.instantiate(binary, imports); |
| 806 | }).then(function (instance) { |
| 807 | return instance; |
| 808 | }).then(receiver, function(reason) { |
| 809 | err('failed to asynchronously prepare wasm: ' + reason); |
| 810 | |
| 811 | // Warn on some common problems. |
| 812 | if (isFileURI(wasmBinaryFile)) { |
| 813 | err('warning: Loading from a file URI (' + wasmBinaryFile + ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'); |
| 814 | } |
| 815 | abort(reason); |
| 816 | }); |
| 817 | } |
| 818 | |
| 819 | function instantiateAsync(binary, binaryFile, imports, callback) { |
| 820 | if (!binary && |
no test coverage detected