Uh oh!
There was an error while loading. Please reload this page.
Fix crypto abort on throwing setter - #27157
Conversation
nodejs-github-bot
commented
Apr 9, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9686a81 to
cf6e4d2Comparesam-github
commented
Apr 11, 2019
@addaleax made your suggested changes, still this open question:
|
addaleax
commented
Apr 12, 2019
@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
ab0787cComparesam-github
commented
Apr 12, 2019
@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
4b43d49Comparenodejs-github-bot
commented
Apr 12, 2019
4b43d49 to
aff1a64Compareaff1a64 to
89432acComparenodejs-github-bot
commented
Apr 14, 2019
nodejs-github-bot
commented
Apr 16, 2019
sam-github
commented
Apr 17, 2019
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