-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide readyPromiseReject
to instantiateWasm
#23038
Comments
Do you mean when I call the .catch or .then using Module({}) after still cannot catch up the things from quit_? Also where can I find the pre-js.js using a dirty hack? |
Sorry I don't understand the sentence :/ What I mean is that in
You should create the |
I've definitely run into this problem that if an error is thrown in I think we ought to deprecate |
@FelixNumworks, can I ask what you use case is for overriding |
I need to I am now realizing that the parameter Since this works ( I must say though that having to explicitly set all my module parameters in |
Yes, unfortunately is code size and complexity thing. The problem is that each element of |
Great that |
When providing an
instantiateWasm
method to the Module, only asuccessCallback
is passed to the method (see docs here)The problem is that no
failureCallback
is provided.In the case of a sync instantiation of the WASM, I can return
false
if the instantiation fails.But in the case of an async instantiation, if the instantiation fails, the error isn't properly handled and the page freezes.
I'd like
instantiateWasm
to take 3 args instead of 2:imports
,successCallback
andfailureCallback
.This means changing this line:
emscripten/src/preamble.js
Line 1067 in 06cebfc
to
Current workaround
For others having the same problem, I'm currently using a dirty hack through
pre-js.js
by doing:And when I instantiate my module:
Version of emscripten/emsdk:
emcc 3.1.61
The text was updated successfully, but these errors were encountered: