diff options
author | legendecas <legendecas@gmail.com> | 2019-09-30 04:42:58 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-15 02:05:58 +0300 |
commit | 6afed1dc853cf2b040502d858caadc17575a7fdf (patch) | |
tree | 4162edee603f8a83ab4afd9b2a72c3ab1cc0ff17 /src/js_native_api_types.h | |
parent | f9caee986cae09cd4cb47e0a02a5b8672ab2c16d (diff) |
n-api: add `napi_detach_arraybuffer`
As ArrayBuffer#detach is an ecma spec operation
([Section 24.1.1.3](https://tc39.es/ecma262/#sec-detacharraybuffer)),
it might be good to have it in N-API.
Fixes https://github.com/nodejs/node/issues/29674
PR-URL: https://github.com/nodejs/node/pull/29768
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Diffstat (limited to 'src/js_native_api_types.h')
-rw-r--r-- | src/js_native_api_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/js_native_api_types.h b/src/js_native_api_types.h index ae8fedb1463..a81e76a6493 100644 --- a/src/js_native_api_types.h +++ b/src/js_native_api_types.h @@ -80,6 +80,8 @@ typedef enum { napi_closing, napi_bigint_expected, napi_date_expected, + napi_arraybuffer_expected, + napi_detachable_arraybuffer_expected, } napi_status; // Note: when adding a new enum value to `napi_status`, please also update // `const int last_status` in `napi_get_last_error_info()' definition, |