-
Notifications
You must be signed in to change notification settings - Fork 30k
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
node-api: extend type-tagging to externals #47141
Conversation
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged. Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
Review requested:
|
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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. |
Landed in b4365c1 |
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged. Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com> PR-URL: #47141 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged. Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com> PR-URL: #47141 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged. Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com> PR-URL: #47141 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged.