-
Notifications
You must be signed in to change notification settings - Fork 1
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
Context: Expose instruction count #1
base: main
Are you sure you want to change the base?
Conversation
f8a1509
to
01ae4c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
53e6ecb
to
6941e76
Compare
boa_engine/src/error.rs
Outdated
unreachable!( | ||
"The NoInstructionsRemain native error cannot be converted to an opaque type." | ||
) | ||
(constructors.eval_error().prototype(), ErrorKind::Eval) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to convert the native error into an opaque one? My concern would be that this error could be caught using try
-catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the error is thrown async then boa will convert it into an opaque error when it rejects the promise. This causes a panic. If an out of gas error is caught it will immediately be rethrown because you're still out of gas.
d68e3fc
to
4da6387
Compare
b8c11dc
to
41b24d5
Compare
41b24d5
to
533f6a5
Compare
Test262 conformance changes
|
42c4851
to
5ba29ab
Compare
5ba29ab
to
e5f312a
Compare
Exposes the instruction counter and fix a bug allowing unreachable behaviour.
instructions_remaining
counter is a public property.NoInstructionsRemaining
error can now be converted into a javascript error, preventing boa from panicking if the error is thrown async