Closed
Description
NAPI currently has a policy that any API call during a pending-exeption state will bail out immediately with a napi_pending_exception
error. That policy is too restrictive.
It is often necessary for native modules to do some cleanup operations while in a pending-exception state. Most commonly they may need to close a handle scope. But also other things like releasing/deleting a reference should be allowed. I'm not sure about setting a property on an object (to an error state)... we should probably block anything that has a chance of re-entering JS code.
The node-sass
module has pretty good unit test coverage of error conditions, and a few of those error tests are hitting this problem.
Metadata
Metadata
Assignees
Labels
No labels