Skip to content

Commit 38b0525

Browse files
ZYSzystargos
authored andcommitted
src: use v8:: for consistency in util
PR-URL: #23934 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent 7012f72 commit 38b0525

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

src/node_util.cc

+13-7
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ namespace util {
66

77
using v8::ALL_PROPERTIES;
88
using v8::Array;
9+
using v8::Boolean;
910
using v8::Context;
1011
using v8::Function;
1112
using v8::FunctionCallbackInfo;
13+
using v8::IndexFilter;
1214
using v8::Integer;
1315
using v8::Isolate;
16+
using v8::KeyCollectionMode;
1417
using v8::Local;
18+
using v8::NewStringType;
1519
using v8::Object;
1620
using v8::ONLY_CONFIGURABLE;
1721
using v8::ONLY_ENUMERABLE;
1822
using v8::ONLY_WRITABLE;
1923
using v8::Private;
2024
using v8::Promise;
25+
using v8::PropertyFilter;
2126
using v8::Proxy;
27+
using v8::ReadOnly;
2228
using v8::SKIP_STRINGS;
2329
using v8::SKIP_SYMBOLS;
2430
using v8::String;
@@ -37,13 +43,13 @@ static void GetOwnNonIndexProperties(
3743

3844
Local<Array> properties;
3945

40-
v8::PropertyFilter filter =
41-
static_cast<v8::PropertyFilter>(args[1].As<Uint32>()->Value());
46+
PropertyFilter filter =
47+
static_cast<PropertyFilter>(args[1].As<Uint32>()->Value());
4248

4349
if (!object->GetPropertyNames(
44-
context, v8::KeyCollectionMode::kOwnOnly,
50+
context, KeyCollectionMode::kOwnOnly,
4551
filter,
46-
v8::IndexFilter::kSkipIndices)
52+
IndexFilter::kSkipIndices)
4753
.ToLocal(&properties)) {
4854
return;
4955
}
@@ -96,7 +102,7 @@ static void PreviewEntries(const FunctionCallbackInfo<Value>& args) {
96102
return args.GetReturnValue().Set(entries);
97103
Local<Array> ret = Array::New(env->isolate(), 2);
98104
ret->Set(env->context(), 0, entries).FromJust();
99-
ret->Set(env->context(), 1, v8::Boolean::New(env->isolate(), is_key_value))
105+
ret->Set(env->context(), 1, Boolean::New(env->isolate(), is_key_value))
100106
.FromJust();
101107
return args.GetReturnValue().Set(ret);
102108
}
@@ -171,7 +177,7 @@ void SafeGetenv(const FunctionCallbackInfo<Value>& args) {
171177
args.GetReturnValue()
172178
.Set(String::NewFromUtf8(
173179
args.GetIsolate(), text.c_str(),
174-
v8::NewStringType::kNormal).ToLocalChecked());
180+
NewStringType::kNormal).ToLocalChecked());
175181
}
176182

177183
void EnqueueMicrotask(const FunctionCallbackInfo<Value>& args) {
@@ -202,7 +208,7 @@ void Initialize(Local<Object> target,
202208
env->context(),
203209
OneByteString(env->isolate(), "pushValToArrayMax"),
204210
Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX),
205-
v8::ReadOnly).FromJust();
211+
ReadOnly).FromJust();
206212

207213
#define V(name) \
208214
target->Set(context, \

src/util.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ BufferValue::BufferValue(Isolate* isolate, Local<Value> value) {
102102

103103
void LowMemoryNotification() {
104104
if (v8_initialized) {
105-
auto isolate = v8::Isolate::GetCurrent();
105+
auto isolate = Isolate::GetCurrent();
106106
if (isolate != nullptr) {
107107
isolate->LowMemoryNotification();
108108
}
@@ -134,7 +134,7 @@ std::set<std::string> ParseCommaSeparatedSet(const std::string& in) {
134134
return out;
135135
}
136136

137-
void ThrowErrStringTooLong(v8::Isolate* isolate) {
137+
void ThrowErrStringTooLong(Isolate* isolate) {
138138
isolate->ThrowException(ERR_STRING_TOO_LONG(isolate));
139139
}
140140

0 commit comments

Comments
 (0)