-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 crypto abort on throwing setter #27157
Conversation
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.
Thank you!
9686a81
to
cf6e4d2
Compare
@addaleax made your suggested changes, still this open question:
|
@sam-github Yeah, I don’t think there’s a definite right or wrong answer. But I think forwarding the setter exception is what would happen if we were to do this in JS land (unless there are explicit |
cf6e4d2
to
ab0787c
Compare
@addaleax the analogy with js is not entirely perfect, because the openssl error is not (yet) an exception, but it is an "error". The properties are doced as "exist if they do" (lots of crypto errors don't come from openssl, so don't have the properties), so that isn't a problem, but I'll leave it as it is, throwing the first pending exception. Its a total fringe case, its hard to imagine anyone attaching throwing setters on the global object prototype and expecting deterministic behaviour. |
ab0787c
to
4b43d49
Compare
4b43d49
to
aff1a64
Compare
aff1a64
to
89432ac
Compare
Landed in 69140bc |
PR-URL: #27157 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
See #26868 (comment)
@addaleax Note there are 2 commits. Actually, I'm not convinced the second commit is correct.
If a C++ API called from js has an openssl error occur, then while creating the error object to throw from C++, it calls into user-land js, and THAT throws, which error should actually suface? With all the Maybe checking, I made it be the "pending" low-level error. That was a useful exercise, it gives me a better understanding what all the Maybe's are about, but I have to say, I'm not sure its what I would expect.
In this case, isn't it the first error, the openssl API one, that we would want thrown? Not the second one?
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes