This is using GPU memory, not WASM (CPU) memory, so it should not be a problem.
initAsync
returns a promise, so you can try something like this:
engine.initAsync().then(() => {
// everything ok
}).catch((err) => {
// an error occurred
});
But it’s normally the same thing than awaiting on initAsync()
and using a try/catch to handle the error…