mirror of https://github.com/golang/go.git
misc/wasm: handle error during instantiateStreaming
The same catch block is there in wasm_exec.js for node processes. Added it in browser invocations too, to prevent uncaught exceptions. Change-Id: Icab577ec585fa86df3c76db508b49401bcdb52ae Reviewed-on: https://go-review.googlesource.com/132916 Reviewed-by: Richard Musiol <neelance@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
db3f52db8e
commit
e2e44a5d16
|
|
@ -27,6 +27,8 @@ license that can be found in the LICENSE file.
|
||||||
mod = result.module;
|
mod = result.module;
|
||||||
inst = result.instance;
|
inst = result.instance;
|
||||||
document.getElementById("runButton").disabled = false;
|
document.getElementById("runButton").disabled = false;
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue