-
Notifications
You must be signed in to change notification settings - Fork 648
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
Missing default rejection tracking and console.log() polyfill to the Hermes CLI #1480
Comments
Your example uses |
no output nor exception. How do I reconcile the difference of behaviour? |
@wcandillon there is no real difference in behavior. The spec does not specify how unhandled Promise rejection should be handled by the host environment. It is up to the integrator of the JS engine. Browsers and NodeJS provide their own mechanisms. I suspect React Native does too, or it should. The Hermes CLI tool is a very minimalistic integration of the engine, it only provides If you need this behavior, you can configure the rejection hook yourself from JS like this:
I think there is a good point to be made that the Hermes CLI tool should set this by default and it should also probably provide a very simple polyfill for |
Bug Description
The following code returns 10 on v8 but doesn't return anything using the hermes binary:
The Expected Behavior
To return 10;
The text was updated successfully, but these errors were encountered: