-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
context::run_script() crash #80
Comments
Return empty result handle for a script with syntax error, do not catch JavaScript exception. Added a test case. See issue #80
Hi @VitaminCpp Thank you for the issue reporting! I've fixed it as you proposed. Now the |
Hi @pmed! |
Hi @VitaminCpp Thanks! It seems I have to review all the |
Addition to issue #80 fix: return empty result handle on a script run error
Hi,
if I try to compile a script with V8 6.4.388 with an intentional syntax error, my app crashes. This happens because of line 262. v8::Script::Compile() returns a MaybeLocal() and you're using ToLocalChecked() which will crash the current process as stated in v8.h.
To solve this issue just convert it by "ToLocal()" and then check for empty:
These "ToLocalChecked()" calls are IMHO a bit dangerous for people who run the V8 on the main thread.
The text was updated successfully, but these errors were encountered: