You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't even know if this is actually an emscripten bug or node's bug. Just observed some strange behavior.
If I load a wasm module compiled by emscripten in NodeJS 12, the unhandled-promise-rejection behavior is changed: if I comment out line 2, the unhandled-promise-rejection will not terminate the node. However, if I uncomment line 2, it immediately crash the node.
process['on']('uncaughtException',function(ex){// suppress ExitStatus exceptions from showing an errorif(!(exinstanceofExitStatus)){throwex;}});process['on']('unhandledRejection',abort);
But why? What will happened if I delete these handler?
Some version of node will just exit with 0 in this case. I believe we had issues where failures in testing were going unnoticed because tests returning 0 is signal of success.
It could be that recent versions of node have fixed that.. i seem to remember them promising they would do that.
In the mean time I think you can build with -s NODEJS_CATCH_REJECTION=0 to fix this no?
Hi.
I don't even know if this is actually an emscripten bug or node's bug. Just observed some strange behavior.
If I load a wasm module compiled by emscripten in NodeJS 12, the unhandled-promise-rejection behavior is changed: if I comment out line 2, the unhandled-promise-rejection will not terminate the node. However, if I uncomment line 2, it immediately crash the node.
Here's a demonstration project:
https://github.com/yllan/unhandled-promise-rejection/
The text was updated successfully, but these errors were encountered: