-
Notifications
You must be signed in to change notification settings - Fork 174
Fix more error cases #332
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
Fix more error cases #332
Conversation
- fix more cases of missing `sf->cur_pc`. - use more precise error messages for number conversion methods - add test cases in test_builtin.js
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 with a question. Now that you covered all cases, does it make sense to still set cur_pc
in the exception:
label? If not, shall we skip it and add a check-abort?
@@ -762,6 +762,12 @@ Failure (testClassNames doesn't contain expected[1] stack = at MyObj (stack- | |||
at <eval> (stack-traces.js:291:49) | |||
): expected <true> found <false> | |||
Failure (UnintendedCallerCensorship didn't contain new ReferenceError): expected <true> found <false> | |||
Failure: expected <"abc"> found <undefined> |
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.
Weird, how did this come back?
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.
I don't know. I am investigating this, but won't have much time until tonight.
We should have a more complete emulation of the v8 error handling:
- the stack trace should be computed by a v8 specific function
Error.captureStackTrace
, which is non-standard but is quite handy for introspection. It takes an object as argument and sets itsstack
property to a the stack trace string, and an optional second argument which is an array of frames.
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.
@@ -966,6 +966,54 @@ function test_proxy_is_array() | |||
} | |||
} | |||
|
|||
function test_cur_pc() |
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.
Very nice!
Yes, Conversely, we might want to initialize |
TBH I'd rather abort hard so it's easy to catch, fix and be done with it... |
In the debug target, that's fine, but in the production version, why abort when there is no user visible downside? |
sf->cur_pc
.