mirror of https://github.com/nodejs/node.git
Constants should be readOnly and DontDelete
parent
635986e433
commit
db23af05b0
|
@ -25,7 +25,8 @@ namespace node {
|
|||
|
||||
#define NODE_DEFINE_CONSTANT(target, constant) \
|
||||
(target)->Set(v8::String::NewSymbol(#constant), \
|
||||
v8::Integer::New(constant))
|
||||
v8::Integer::New(constant), \
|
||||
static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete))
|
||||
|
||||
#define NODE_SET_METHOD(obj, name, callback) \
|
||||
obj->Set(v8::String::NewSymbol(name), \
|
||||
|
|
Loading…
Reference in New Issue