From db23af05b04442b7d910c535900a9f78a2983b56 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 30 Aug 2010 16:04:31 +0700 Subject: [PATCH] Constants should be readOnly and DontDelete --- src/node.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node.h b/src/node.h index e20c801fd2f..901d853d3fc 100644 --- a/src/node.h +++ b/src/node.h @@ -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::ReadOnly|v8::DontDelete)) #define NODE_SET_METHOD(obj, name, callback) \ obj->Set(v8::String::NewSymbol(name), \