Skip to content

n-api: test for finalizer calls JS from first round phantom callback #25927

Description

@mlippautz

V8's API does not allow calling directly back into V8 from weak callbacks, see: `

// 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.

@hashseed

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    node-apiIssues and PRs related to Node-API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions