Skip to content

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

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

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