Skip to content

N-API: Enforce handle scope semantics more strictly #16175

Closed
@addaleax

Description

@addaleax

The addons-napi/test_handle_scope is currently failing in debug mode because in at least one case a handle scope is opened but never closed (because it bails out on an error before it can finish). Obviously, the test case can be fixed, but we might want to give this a bit more thought:

  • Do we want to only have this check active in debug mode? I’d say no.
  • Should we error out (i.e. crash) if users don’t close all handle scopes they have opened? I’d say yes.

@nodejs/n-api

Metadata

Metadata

Assignees

No one assigned

    Labels

    node-apiIssues and PRs related to the Node-API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions