Fix crypto abort on throwing setter by sam-github · Pull Request #27157 · nodejs/node (original) (raw)
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- tests and/or benchmarks are included
- documentation is changed or added
- commit message follows commit guidelines