| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cd1da67 commit 36abc18
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -686,7 +686,10 @@ For more details, review the [Object lifetime management][]. | |||
| 686 | 686 | ||
| 687 | 687 | #### napi_type_tag | |
| 688 | 688 | <!-- YAML | |
| 689 | - added: v14.8.0 | ||
| 689 | + added: | ||
| 690 | + - v14.8.0 | ||
| 691 | + - v12.19.0 | ||
| 692 | + napiVersion: 8 | ||
| 690 | 693 | --> | |
| 691 | 694 | ||
| 692 | 695 | A 128-bit value stored as two unsigned 64-bit integers. It serves as a UUID | |
@@ -1694,15 +1697,16 @@ with `napi_add_env_cleanup_hook`, otherwise the process will abort. | |||
| 1694 | 1697 | ||
| 1695 | 1698 | #### napi_add_async_cleanup_hook | |
| 1696 | 1699 | <!-- YAML | |
| 1697 | - added: v14.8.0 | ||
| 1700 | + added: | ||
| 1701 | + - v14.8.0 | ||
| 1702 | + - v12.19.0 | ||
| 1703 | + napiVersion: 8 | ||
| 1698 | 1704 | changes: | |
| 1699 | 1705 | - version: v14.10.0 | |
| 1700 | 1706 | pr-url: https://github.com/nodejs/node/pull/34819 | |
| 1701 | 1707 | description: Changed signature of the `hook` callback. | |
| 1702 | 1708 | --> | |
| 1703 | 1709 | ||
| 1704 | - > Stability: 1 - Experimental | ||
| 1705 | - | ||
| 1706 | 1710 | ```c | |
| 1707 | 1711 | NAPI_EXTERN napi_status napi_add_async_cleanup_hook( | |
| 1708 | 1712 | napi_env env, | |
@@ -1740,8 +1744,6 @@ changes: | |||
| 1740 | 1744 | description: Removed `env` parameter. | |
| 1741 | 1745 | --> | |
| 1742 | 1746 | ||
| 1743 | - > Stability: 1 - Experimental | ||
| 1744 | - | ||
| 1745 | 1747 | ```c | |
| 1746 | 1748 | NAPI_EXTERN napi_status napi_remove_async_cleanup_hook( | |
| 1747 | 1749 | napi_async_cleanup_hook_handle remove_handle); | |
@@ -4196,11 +4198,12 @@ specification). | |||
| 4196 | 4198 | ||
| 4197 | 4199 | #### napi_object_freeze | |
| 4198 | 4200 | <!-- YAML | |
| 4199 | - added: v14.14.0 | ||
| 4201 | + added: | ||
| 4202 | + - v14.14.0 | ||
| 4203 | + - v12.20.0 | ||
| 4204 | + napiVersion: 8 | ||
| 4200 | 4205 | --> | |
| 4201 | 4206 | ||
| 4202 | - > Stability: 1 - Experimental | ||
| 4203 | - | ||
| 4204 | 4207 | ```c | |
| 4205 | 4208 | napi_status napi_object_freeze(napi_env env, | |
| 4206 | 4209 | napi_value object); | |
@@ -4221,11 +4224,12 @@ ECMA-262 specification. | |||
| 4221 | 4224 | ||
| 4222 | 4225 | #### napi_object_seal | |
| 4223 | 4226 | <!-- YAML | |
| 4224 | - added: v14.14.0 | ||
| 4227 | + added: | ||
| 4228 | + - v14.14.0 | ||
| 4229 | + - v12.20.0 | ||
| 4230 | + napiVersion: 8 | ||
| 4225 | 4231 | --> | |
| 4226 | 4232 | ||
| 4227 | - > Stability: 1 - Experimental | ||
| 4228 | - | ||
| 4229 | 4233 | ```c | |
| 4230 | 4234 | napi_status napi_object_seal(napi_env env, | |
| 4231 | 4235 | napi_value object); | |
@@ -4884,11 +4888,12 @@ JavaScript object becomes garbage-collected. | |||
| 4884 | 4888 | ||
| 4885 | 4889 | ### napi_type_tag_object | |
| 4886 | 4890 | <!-- YAML | |
| 4887 | - added: v14.8.0 | ||
| 4891 | + added: | ||
| 4892 | + - v14.8.0 | ||
| 4893 | + - v12.19.0 | ||
| 4894 | + napiVersion: 8 | ||
| 4888 | 4895 | --> | |
| 4889 | 4896 | ||
| 4890 | - > Stability: 1 - Experimental | ||
| 4891 | - | ||
| 4892 | 4897 | ```c | |
| 4893 | 4898 | napi_status napi_type_tag_object(napi_env env, | |
| 4894 | 4899 | napi_value js_object, | |
@@ -4911,11 +4916,12 @@ If the object already has an associated type tag, this API will return | |||
| 4911 | 4916 | ||
| 4912 | 4917 | ### napi_check_object_type_tag | |
| 4913 | 4918 | <!-- YAML | |
| 4914 | - added: v14.8.0 | ||
| 4919 | + added: | ||
| 4920 | + - v14.8.0 | ||
| 4921 | + - v12.19.0 | ||
| 4922 | + napiVersion: 8 | ||
| 4915 | 4923 | --> | |
| 4916 | 4924 | ||
| 4917 | - > Stability: 1 - Experimental | ||
| 4918 | - | ||
| 4919 | 4925 | ```c | |
| 4920 | 4926 | napi_status napi_check_object_type_tag(napi_env env, | |
| 4921 | 4927 | napi_value js_object, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ | |||
| 17 | 17 | // functions available in a new version of N-API that is not yet ported in all | |
| 18 | 18 | // LTS versions, they can set NAPI_VERSION knowing that they have specifically | |
| 19 | 19 | // depended on that version. | |
| 20 | - #define NAPI_VERSION 7 | ||
| 20 | + #define NAPI_VERSION 8 | ||
| 21 | 21 | #endif | |
| 22 | 22 | #endif | |
| 23 | 23 | ||
@@ -539,7 +539,7 @@ NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env, | |||
| 539 | 539 | bool* result); | |
| 540 | 540 | #endif // NAPI_VERSION >= 7 | |
| 541 | 541 | ||
| 542 | - #ifdef NAPI_EXPERIMENTAL | ||
| 542 | + #if NAPI_VERSION >= 8 | ||
| 543 | 543 | // Type tagging | |
| 544 | 544 | NAPI_EXTERN napi_status napi_type_tag_object(napi_env env, | |
| 545 | 545 | napi_value value, | |
@@ -554,7 +554,7 @@ NAPI_EXTERN napi_status napi_object_freeze(napi_env env, | |||
| 554 | 554 | napi_value object); | |
| 555 | 555 | NAPI_EXTERN napi_status napi_object_seal(napi_env env, | |
| 556 | 556 | napi_value object); | |
| 557 | - #endif // NAPI_EXPERIMENTAL | ||
| 557 | + #endif // NAPI_VERSION >= 8 | ||
| 558 | 558 | ||
| 559 | 559 | EXTERN_C_END | |
| 560 | 560 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,15 +31,15 @@ typedef enum { | |||
| 31 | 31 | // from instance properties. Ignored by napi_define_properties. | |
| 32 | 32 | napi_static = 1 << 10, | |
| 33 | 33 | ||
| 34 | - #ifdef NAPI_EXPERIMENTAL | ||
| 34 | + #if NAPI_VERSION >= 8 | ||
| 35 | 35 | // Default for class methods. | |
| 36 | 36 | napi_default_method = napi_writable | napi_configurable, | |
| 37 | 37 | ||
| 38 | 38 | // Default for object properties, like in JS obj[prop]. | |
| 39 | 39 | napi_default_jsproperty = napi_writable | | |
| 40 | 40 | napi_enumerable | | |
| 41 | 41 | napi_configurable, | |
| 42 | - #endif // NAPI_EXPERIMENTAL | ||
| 42 | + #endif // NAPI_VERSION >= 8 | ||
| 43 | 43 | } napi_property_attributes; | |
| 44 | 44 | ||
| 45 | 45 | typedef enum { | |
@@ -150,11 +150,11 @@ typedef enum { | |||
| 150 | 150 | } napi_key_conversion; | |
| 151 | 151 | #endif // NAPI_VERSION >= 6 | |
| 152 | 152 | ||
| 153 | - #ifdef NAPI_EXPERIMENTAL | ||
| 153 | + #if NAPI_VERSION >= 8 | ||
| 154 | 154 | typedef struct { | |
| 155 | 155 | uint64_t lower; | |
| 156 | 156 | uint64_t upper; | |
| 157 | 157 | } napi_type_tag; | |
| 158 | - #endif // NAPI_EXPERIMENTAL | ||
| 158 | + #endif // NAPI_VERSION >= 8 | ||
| 159 | 159 | ||
| 160 | 160 | #endif // SRC_JS_NATIVE_API_TYPES_H_ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -250,7 +250,7 @@ napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func); | |||
| 250 | 250 | ||
| 251 | 251 | #endif // NAPI_VERSION >= 4 | |
| 252 | 252 | ||
| 253 | - #ifdef NAPI_EXPERIMENTAL | ||
| 253 | + #if NAPI_VERSION >= 8 | ||
| 254 | 254 | ||
| 255 | 255 | NAPI_EXTERN napi_status napi_add_async_cleanup_hook( | |
| 256 | 256 | napi_env env, | |
@@ -261,7 +261,7 @@ NAPI_EXTERN napi_status napi_add_async_cleanup_hook( | |||
| 261 | 261 | NAPI_EXTERN napi_status napi_remove_async_cleanup_hook( | |
| 262 | 262 | napi_async_cleanup_hook_handle remove_handle); | |
| 263 | 263 | ||
| 264 | - #endif // NAPI_EXPERIMENTAL | ||
| 264 | + #endif // NAPI_VERSION >= 8 | ||
| 265 | 265 | ||
| 266 | 266 | EXTERN_C_END | |
| 267 | 267 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,10 +41,10 @@ typedef struct { | |||
| 41 | 41 | const char* release; | |
| 42 | 42 | } napi_node_version; | |
| 43 | 43 | ||
| 44 | - #ifdef NAPI_EXPERIMENTAL | ||
| 44 | + #if NAPI_VERSION >= 8 | ||
| 45 | 45 | typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle; | |
| 46 | 46 | typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle, | |
| 47 | 47 | void* data); | |
| 48 | - #endif // NAPI_EXPERIMENTAL | ||
| 48 | + #endif // NAPI_VERSION >= 8 | ||
| 49 | 49 | ||
| 50 | 50 | #endif // SRC_NODE_API_TYPES_H_ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,6 +93,6 @@ | |||
| 93 | 93 | ||
| 94 | 94 | // The NAPI_VERSION provided by this version of the runtime. This is the version | |
| 95 | 95 | // which the Node binary being built supports. | |
| 96 | - #define NAPI_VERSION 7 | ||
| 96 | + #define NAPI_VERSION 8 | ||
| 97 | 97 | ||
| 98 | 98 | #endif // SRC_NODE_VERSION_H_ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject), | |||
| 33 | 33 | test_general.testGetPrototype(extendedObject)); | |
| 34 | 34 | ||
| 35 | 35 | // Test version management functions | |
| 36 | - assert.strictEqual(test_general.testGetVersion(), 7); | ||
| 36 | + assert.strictEqual(test_general.testGetVersion(), 8); | ||
| 37 | 37 | ||
| 38 | 38 | [ | |
| 39 | 39 | 123, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - #define NAPI_EXPERIMENTAL | ||
| 2 | 1 | #include <js_native_api.h> | |
| 3 | 2 | #include "../common.h" | |
| 4 | 3 | #include <string.h> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - #define NAPI_EXPERIMENTAL | ||
| 2 | 1 | #include "node_api.h" | |
| 3 | 2 | #include "assert.h" | |
| 4 | 3 | #include "uv.h" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments