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

N-API: Support for DataView #13926

Closed
mhdawson opened this issue Jun 26, 2017 · 4 comments
Closed

N-API: Support for DataView #13926

mhdawson opened this issue Jun 26, 2017 · 4 comments
Labels
node-api Issues and PRs related to the Node-API.

Comments

@mhdawson
Copy link
Member

mhdawson commented Jun 26, 2017

  • Version: ALL
  • Platform: ALL
  • Subsystem: ALL

N-API currently has APIs for ArrayBuffer and TypedArray classes, but not the DataView class. The DataView class is specified by ES6 as another kind of view over an ArrayBuffer.

While it could be possible to extend (and rename?) napi_create_typedarray() and napi_get_typedarray_info() to also support DataView objects, The combination would be too confusing, because a DataView doesn't have a type, and measures length in terms of bytes instead of elements. There should be separate APIs:

  • napi_is_dataview()
  • napi_create_dataview()
  • napi_get_dataview_info()

The N-API team will get to this based on priorities, but this is a good place for others to contribute as well. If you start working on this, assign the issue to yourself and add a comment that you are working on it.

@mhdawson mhdawson added the node-api Issues and PRs related to the Node-API. label Jun 26, 2017
@shivanth
Copy link
Contributor

I'm working on this

@cjihrig
Copy link
Contributor

cjihrig commented Jul 14, 2017

@shivanth are you still working on this?

@shivanth
Copy link
Contributor

Yup

@shivanth
Copy link
Contributor

I might be able to submit a PR this weekend

shivanth added a commit to shivanth/node that referenced this issue Jul 19, 2017
Basic support for Dataview is added by this commit. This is achieved
by using three functions, napi_create_dataview(), napi_is_dataview()
and napi_get_dataview_info();

Fixes: nodejs#13926
@shivanth shivanth mentioned this issue Jul 20, 2017
4 tasks
addaleax pushed a commit that referenced this issue Jul 27, 2017
Basic support for Dataview is added in this commit. This is achieved
by using three functions, napi_create_dataview(), napi_is_dataview()
and napi_get_dataview_info().

PR-URL: #14382
Fixes: #13926
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this issue Apr 10, 2018
Basic support for Dataview is added in this commit. This is achieved
by using three functions, napi_create_dataview(), napi_is_dataview()
and napi_get_dataview_info().

PR-URL: nodejs#14382
Fixes: nodejs#13926
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this issue Apr 16, 2018
Basic support for Dataview is added in this commit. This is achieved
by using three functions, napi_create_dataview(), napi_is_dataview()
and napi_get_dataview_info().

Backport-PR-URL: #19447
PR-URL: #14382
Fixes: #13926
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants