Skip to content

Commit 450bcde

Browse files
ZYSzysBethGriggs
authored andcommitted
src: use v8:: for consistency in util
Backport-PR-URL: #25005 PR-URL: #23934 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent 7840f71 commit 450bcde

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,17 +6,23 @@ namespace util {
66

77
using v8::ALL_PROPERTIES;
88
using v8::Array;
9+
using v8::Boolean;
910
using v8::Context;
1011
using v8::FunctionCallbackInfo;
12+
using v8::IndexFilter;
1113
using v8::Integer;
14+
using v8::KeyCollectionMode;
1215
using v8::Local;
16+
using v8::NewStringType;
1317
using v8::Object;
1418
using v8::ONLY_CONFIGURABLE;
1519
using v8::ONLY_ENUMERABLE;
1620
using v8::ONLY_WRITABLE;
1721
using v8::Private;
1822
using v8::Promise;
23+
using v8::PropertyFilter;
1924
using v8::Proxy;
25+
using v8::ReadOnly;
2026
using v8::SKIP_STRINGS;
2127
using v8::SKIP_SYMBOLS;
2228
using v8::String;
@@ -35,13 +41,13 @@ static void GetOwnNonIndexProperties(
3541

3642
Local<Array> properties;
3743

38-
v8::PropertyFilter filter =
39-
static_cast<v8::PropertyFilter>(args[1].As<Uint32>()->Value());
44+
PropertyFilter filter =
45+
static_cast<PropertyFilter>(args[1].As<Uint32>()->Value());
4046

4147
if (!object->GetPropertyNames(
42-
context, v8::KeyCollectionMode::kOwnOnly,
48+
context, KeyCollectionMode::kOwnOnly,
4349
filter,
44-
v8::IndexFilter::kSkipIndices)
50+
IndexFilter::kSkipIndices)
4551
.ToLocal(&properties)) {
4652
return;
4753
}
@@ -94,7 +100,7 @@ static void PreviewEntries(const FunctionCallbackInfo<Value>& args) {
94100
return args.GetReturnValue().Set(entries);
95101
Local<Array> ret = Array::New(env->isolate(), 2);
96102
ret->Set(env->context(), 0, entries).FromJust();
97-
ret->Set(env->context(), 1, v8::Boolean::New(env->isolate(), is_key_value))
103+
ret->Set(env->context(), 1, Boolean::New(env->isolate(), is_key_value))
98104
.FromJust();
99105
return args.GetReturnValue().Set(ret);
100106
}
@@ -169,7 +175,7 @@ void SafeGetenv(const FunctionCallbackInfo<Value>& args) {
169175
args.GetReturnValue()
170176
.Set(String::NewFromUtf8(
171177
args.GetIsolate(), text.c_str(),
172-
v8::NewStringType::kNormal).ToLocalChecked());
178+
NewStringType::kNormal).ToLocalChecked());
173179
}
174180

175181
void Initialize(Local<Object> target,
@@ -191,7 +197,7 @@ void Initialize(Local<Object> target,
191197
env->context(),
192198
OneByteString(env->isolate(), "pushValToArrayMax"),
193199
Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX),
194-
v8::ReadOnly).FromJust();
200+
ReadOnly).FromJust();
195201

196202
#define V(name) \
197203
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)