@@ -6,19 +6,25 @@ namespace util { |
6 | 6 |
|
7 | 7 | using v8::ALL_PROPERTIES; |
8 | 8 | using v8::Array; |
| 9 | +using v8::Boolean; |
9 | 10 | using v8::Context; |
10 | 11 | using v8::Function; |
11 | 12 | using v8::FunctionCallbackInfo; |
| 13 | +using v8::IndexFilter; |
12 | 14 | using v8::Integer; |
13 | 15 | using v8::Isolate; |
| 16 | +using v8::KeyCollectionMode; |
14 | 17 | using v8::Local; |
| 18 | +using v8::NewStringType; |
15 | 19 | using v8::Object; |
16 | 20 | using v8::ONLY_CONFIGURABLE; |
17 | 21 | using v8::ONLY_ENUMERABLE; |
18 | 22 | using v8::ONLY_WRITABLE; |
19 | 23 | using v8::Private; |
20 | 24 | using v8::Promise; |
| 25 | +using v8::PropertyFilter; |
21 | 26 | using v8::Proxy; |
| 27 | +using v8::ReadOnly; |
22 | 28 | using v8::SKIP_STRINGS; |
23 | 29 | using v8::SKIP_SYMBOLS; |
24 | 30 | using v8::String; |
@@ -37,13 +43,13 @@ static void GetOwnNonIndexProperties( |
37 | 43 |
|
38 | 44 | Local<Array> properties; |
39 | 45 |
|
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()); |
42 | 48 |
|
43 | 49 | if (!object->GetPropertyNames( |
44 | | - context, v8::KeyCollectionMode::kOwnOnly, |
| 50 | + context, KeyCollectionMode::kOwnOnly, |
45 | 51 | filter, |
46 | | - v8::IndexFilter::kSkipIndices) |
| 52 | + IndexFilter::kSkipIndices) |
47 | 53 | .ToLocal(&properties)) { |
48 | 54 | return; |
49 | 55 | } |
@@ -96,7 +102,7 @@ static void PreviewEntries(const FunctionCallbackInfo<Value>& args) { |
96 | 102 | return args.GetReturnValue().Set(entries); |
97 | 103 | Local<Array> ret = Array::New(env->isolate(), 2); |
98 | 104 | 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)) |
100 | 106 | .FromJust(); |
101 | 107 | return args.GetReturnValue().Set(ret); |
102 | 108 | } |
@@ -171,7 +177,7 @@ void SafeGetenv(const FunctionCallbackInfo<Value>& args) { |
171 | 177 | args.GetReturnValue() |
172 | 178 | .Set(String::NewFromUtf8( |
173 | 179 | args.GetIsolate(), text.c_str(), |
174 | | - v8::NewStringType::kNormal).ToLocalChecked()); |
| 180 | + NewStringType::kNormal).ToLocalChecked()); |
175 | 181 | } |
176 | 182 |
|
177 | 183 | void EnqueueMicrotask(const FunctionCallbackInfo<Value>& args) { |
@@ -202,7 +208,7 @@ void Initialize(Local<Object> target, |
202 | 208 | env->context(), |
203 | 209 | OneByteString(env->isolate(), "pushValToArrayMax"), |
204 | 210 | Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX), |
205 | | - v8::ReadOnly).FromJust(); |
| 211 | + ReadOnly).FromJust(); |
206 | 212 |
|
207 | 213 | #define V(name) \ |
208 | 214 | target->Set(context, \ |
|