diff --git a/src/node_util.cc b/src/node_util.cc index c183f314a1394f..ac39be407dd47f 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -6,19 +6,25 @@ namespace util { using v8::ALL_PROPERTIES; using v8::Array; +using v8::Boolean; using v8::Context; using v8::Function; using v8::FunctionCallbackInfo; +using v8::IndexFilter; using v8::Integer; using v8::Isolate; +using v8::KeyCollectionMode; using v8::Local; +using v8::NewStringType; using v8::Object; using v8::ONLY_CONFIGURABLE; using v8::ONLY_ENUMERABLE; using v8::ONLY_WRITABLE; using v8::Private; using v8::Promise; +using v8::PropertyFilter; using v8::Proxy; +using v8::ReadOnly; using v8::SKIP_STRINGS; using v8::SKIP_SYMBOLS; using v8::String; @@ -37,13 +43,13 @@ static void GetOwnNonIndexProperties( Local properties; - v8::PropertyFilter filter = - static_cast(args[1].As()->Value()); + PropertyFilter filter = + static_cast(args[1].As()->Value()); if (!object->GetPropertyNames( - context, v8::KeyCollectionMode::kOwnOnly, + context, KeyCollectionMode::kOwnOnly, filter, - v8::IndexFilter::kSkipIndices) + IndexFilter::kSkipIndices) .ToLocal(&properties)) { return; } @@ -96,7 +102,7 @@ static void PreviewEntries(const FunctionCallbackInfo& args) { return args.GetReturnValue().Set(entries); Local ret = Array::New(env->isolate(), 2); ret->Set(env->context(), 0, entries).FromJust(); - ret->Set(env->context(), 1, v8::Boolean::New(env->isolate(), is_key_value)) + ret->Set(env->context(), 1, Boolean::New(env->isolate(), is_key_value)) .FromJust(); return args.GetReturnValue().Set(ret); } @@ -171,7 +177,7 @@ void SafeGetenv(const FunctionCallbackInfo& args) { args.GetReturnValue() .Set(String::NewFromUtf8( args.GetIsolate(), text.c_str(), - v8::NewStringType::kNormal).ToLocalChecked()); + NewStringType::kNormal).ToLocalChecked()); } void EnqueueMicrotask(const FunctionCallbackInfo& args) { @@ -202,7 +208,7 @@ void Initialize(Local target, env->context(), OneByteString(env->isolate(), "pushValToArrayMax"), Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX), - v8::ReadOnly).FromJust(); + ReadOnly).FromJust(); #define V(name) \ target->Set(context, \ diff --git a/src/util.cc b/src/util.cc index a0f0b0bf89657d..9f0b8ebc9d7596 100644 --- a/src/util.cc +++ b/src/util.cc @@ -102,7 +102,7 @@ BufferValue::BufferValue(Isolate* isolate, Local value) { void LowMemoryNotification() { if (v8_initialized) { - auto isolate = v8::Isolate::GetCurrent(); + auto isolate = Isolate::GetCurrent(); if (isolate != nullptr) { isolate->LowMemoryNotification(); } @@ -134,7 +134,7 @@ std::set ParseCommaSeparatedSet(const std::string& in) { return out; } -void ThrowErrStringTooLong(v8::Isolate* isolate) { +void ThrowErrStringTooLong(Isolate* isolate) { isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); }