Skip to content

n-api: throw RangeError in napi_create_dataview() with invalid range

The API is required that byte_length + byte_offset is less than or equal to the size in bytes of the array passed in. If not, a RangeError exception is raised.

Refs: https://nodejs.org/api/n-api.html#n_api_napi_create_dataview

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

n-api

Merge request reports

Loading