Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-api: extend type-tagging to externals #47141

Conversation

gabrielschulhof
Copy link
Contributor

Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged.

Since externals behave as JavaScript objects on the JavaScript side,
allow them to be type-tagged.

Signed-off-by: Gabriel Schulhof <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Mar 17, 2023

Review requested:

  • @nodejs/node-api

Signed-off-by: Gabriel Schulhof <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nodejs-github-bot
Copy link
Collaborator

@gabrielschulhof
Copy link
Contributor Author

@mhdawson oof! You can't just pick any number for the type tag parameter. It's actually an index into a static array of 5 type tags. I inadvertently caused the test to index beyond the end of the array, and somehow armv7l happened to catch me. Fixed now, and I added a macro to validate the type index passed in from JS.

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 18, 2023
@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the node-api Issues and PRs related to the Node-API. label Mar 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@gabrielschulhof gabrielschulhof added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-ci PRs that need a full CI run. labels Mar 21, 2023
@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 22, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 22, 2023
@nodejs-github-bot nodejs-github-bot merged commit b4365c1 into nodejs:main Mar 22, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in b4365c1

@gabrielschulhof gabrielschulhof deleted the node-addon-api-1293-verify-type-tagging-of-externals branch March 22, 2023 04:49
RafaelGSS pushed a commit that referenced this pull request Apr 5, 2023
Since externals behave as JavaScript objects on the JavaScript side,
allow them to be type-tagged.

Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #47141
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Apr 6, 2023
RafaelGSS pushed a commit that referenced this pull request Apr 7, 2023
Since externals behave as JavaScript objects on the JavaScript side,
allow them to be type-tagged.

Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #47141
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
Since externals behave as JavaScript objects on the JavaScript side,
allow them to be type-tagged.

Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #47141
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants