summaryrefslogtreecommitdiff
path: root/src/node_api_types.h
diff options
context:
space:
mode:
authorJason Ginchereau <jasongin@microsoft.com>2017-04-05 10:18:56 -0700
committerMichael Dawson <michael_dawson@ca.ibm.com>2017-04-07 09:40:21 -0400
commit84602845c6f2a015b7b214751543d0793e45a5a9 (patch)
tree66e9a1c46daf50d0910f6c22cca746107fa90516 /src/node_api_types.h
parent943d0853076437896963975d039e7786e5f74192 (diff)
downloadandroid-node-v8-84602845c6f2a015b7b214751543d0793e45a5a9.tar.gz
android-node-v8-84602845c6f2a015b7b214751543d0793e45a5a9.tar.bz2
android-node-v8-84602845c6f2a015b7b214751543d0793e45a5a9.zip
n-api: Update property attrs enum to match JS spec
The napi_property_attributes enum used names and values from v8::PropertyAttribute, but those negative flag names were outdated along with the default behavior of a property being writable, enumerable, and configurable unless otherwise specified. To match the ES5 standard property descriptor those attributes should be positive flags and should default to false unless otherwise specified. PR-URL: https://github.com/nodejs/node/pull/12240 Fixes: https://github.com/nodejs/abi-stable-node/issues/221 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/node_api_types.h')
-rw-r--r--src/node_api_types.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node_api_types.h b/src/node_api_types.h
index 7cb242368a..f3f3faaa64 100644
--- a/src/node_api_types.h
+++ b/src/node_api_types.h
@@ -25,13 +25,13 @@ typedef void (*napi_finalize)(napi_env env,
typedef enum {
napi_default = 0,
- napi_read_only = 1 << 0,
- napi_dont_enum = 1 << 1,
- napi_dont_delete = 1 << 2,
+ napi_writable = 1 << 0,
+ napi_enumerable = 1 << 1,
+ napi_configurable = 1 << 2,
// Used with napi_define_class to distinguish static properties
// from instance properties. Ignored by napi_define_properties.
- napi_static_property = 1 << 10,
+ napi_static = 1 << 10,
} napi_property_attributes;
typedef struct {