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 dataview #14382

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Relocate the links in doc
  • Loading branch information
shivanth committed Jul 21, 2017
commit 3fdc71e412227df174349b53da2ed6c49f7c9dad
5 changes: 2 additions & 3 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,7 @@ but one which allows items of different size and type in the ArrayBuffer.


Copy link
Member

Choose a reason for hiding this comment

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

napi_create_typedarray() has

It's required that (length * size_of_element) + byte_offset should be <= the size in bytes of the array passed in. If not, a RangeError exception is raised.

There should one here as well, with "(length * size_of_element)" replaced with byte_length.

JavaScript DataView Objects are described in
[Section 24.3](https://tc39.github.io/ecma262/#sec-dataview-objects)
of the ECMAScript Language Specification.
[Section 24.3][] of the ECMAScript Language Specification.

### Functions to convert from C types to N-API
#### *napi_create_number*
Expand Down Expand Up @@ -3247,11 +3246,11 @@ support it:
[Object Wrap]: #n_api_object_wrap
[Section 9.1.6]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc
[Section 12.5.5]: https://tc39.github.io/ecma262/#sec-typeof-operator
[Section 24.3]: https://tc39.github.io/ecma262/#sec-dataview-objects
[Working with JavaScript Functions]: #n_api_working_with_javascript_functions
[Working with JavaScript Properties]: #n_api_working_with_javascript_properties
[Working with JavaScript Values]: #n_api_working_with_javascript_values
[Working with JavaScript Values - Abstract Operations]: #n_api_working_with_javascript_values_abstract_operations
[Section 24.3]: https://tc39.github.io/ecma262/#sec-dataview-objects

[`napi_cancel_async_work`]: #n_api_napi_cancel_async_work
[`napi_close_escapable_handle_scope`]: #n_api_napi_close_escapable_handle_scope
Expand Down