Skip to content

Fix crypto abort on throwing setter

See https://github.com/nodejs/node/pull/26868#discussion_r269179415

@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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading