src: elevate v8 namespaces for PropertyAttribute
PR-URL: https://github.com/nodejs/node/pull/26681 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
parent
174da74701
commit
cf51ee4dcf
@ -118,7 +118,7 @@ void FSEventWrap::Initialize(Local<Object> target,
|
||||
FIXED_ONE_BYTE_STRING(env->isolate(), "initialized"),
|
||||
get_initialized_templ,
|
||||
Local<FunctionTemplate>(),
|
||||
static_cast<PropertyAttribute>(ReadOnly | DontDelete | v8::DontEnum));
|
||||
static_cast<PropertyAttribute>(ReadOnly | DontDelete | DontEnum));
|
||||
|
||||
target->Set(env->context(),
|
||||
fsevent_string,
|
||||
|
@ -53,6 +53,7 @@ namespace fs {
|
||||
using v8::Array;
|
||||
using v8::BigUint64Array;
|
||||
using v8::Context;
|
||||
using v8::DontDelete;
|
||||
using v8::EscapableHandleScope;
|
||||
using v8::Float64Array;
|
||||
using v8::Function;
|
||||
@ -68,6 +69,8 @@ using v8::Number;
|
||||
using v8::Object;
|
||||
using v8::ObjectTemplate;
|
||||
using v8::Promise;
|
||||
using v8::PropertyAttribute;
|
||||
using v8::ReadOnly;
|
||||
using v8::String;
|
||||
using v8::Symbol;
|
||||
using v8::Uint32;
|
||||
@ -120,8 +123,8 @@ FileHandle* FileHandle::New(Environment* env, int fd, Local<Object> obj) {
|
||||
.ToLocal(&obj)) {
|
||||
return nullptr;
|
||||
}
|
||||
v8::PropertyAttribute attr =
|
||||
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
|
||||
PropertyAttribute attr =
|
||||
static_cast<PropertyAttribute>(ReadOnly | DontDelete);
|
||||
if (obj->DefineOwnProperty(env->context(),
|
||||
env->fd_string(),
|
||||
Integer::New(env->isolate(), fd),
|
||||
|
@ -18,12 +18,15 @@ namespace node {
|
||||
using v8::Array;
|
||||
using v8::ArrayBuffer;
|
||||
using v8::Context;
|
||||
using v8::DontDelete;
|
||||
using v8::DontEnum;
|
||||
using v8::External;
|
||||
using v8::FunctionCallbackInfo;
|
||||
using v8::HandleScope;
|
||||
using v8::Integer;
|
||||
using v8::Local;
|
||||
using v8::Object;
|
||||
using v8::ReadOnly;
|
||||
using v8::String;
|
||||
using v8::Value;
|
||||
|
||||
@ -347,8 +350,8 @@ void StreamBase::AddMethod(Environment* env,
|
||||
void StreamBase::AddMethods(Environment* env, Local<FunctionTemplate> t) {
|
||||
HandleScope scope(env->isolate());
|
||||
|
||||
enum PropertyAttribute attributes = static_cast<PropertyAttribute>(
|
||||
v8::ReadOnly | v8::DontDelete | v8::DontEnum);
|
||||
enum PropertyAttribute attributes =
|
||||
static_cast<PropertyAttribute>(ReadOnly | DontDelete | DontEnum);
|
||||
Local<Signature> sig = Signature::New(env->isolate(), t);
|
||||
|
||||
AddMethod(env, sig, attributes, t, GetFD, env->fd_string());
|
||||
|
@ -30,6 +30,7 @@ namespace node {
|
||||
|
||||
using v8::Array;
|
||||
using v8::Context;
|
||||
using v8::DontDelete;
|
||||
using v8::FunctionCallbackInfo;
|
||||
using v8::FunctionTemplate;
|
||||
using v8::HandleScope;
|
||||
@ -38,6 +39,7 @@ using v8::Local;
|
||||
using v8::MaybeLocal;
|
||||
using v8::Object;
|
||||
using v8::PropertyAttribute;
|
||||
using v8::ReadOnly;
|
||||
using v8::Signature;
|
||||
using v8::String;
|
||||
using v8::Uint32;
|
||||
@ -98,7 +100,7 @@ void UDPWrap::Initialize(Local<Object> target,
|
||||
t->SetClassName(udpString);
|
||||
|
||||
enum PropertyAttribute attributes =
|
||||
static_cast<PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
|
||||
static_cast<PropertyAttribute>(ReadOnly | DontDelete);
|
||||
|
||||
Local<Signature> signature = Signature::New(env->isolate(), t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user