-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.
Description
V8's API does not allow calling directly back into V8 from weak callbacks, see: `
Line 540 in 938e118
// calls may be called in the first callback. Should additional work be |
Instead, a second pass callback should be set using the WeakCallbackInfo API.
Affected are tests using this testing API:
napi_call_function(env, undefined, js_cb, 0, NULL, NULL)); |
This should fire a DCHECK for allowed allocations as soon as the JS callback executed non-trivial JS.
It also breaks the assumption that V8 can call out to the callback during the GC when not all pointers (of other v8::Persistent handles) have not been updated.
Metadata
Metadata
Assignees
Labels
node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.