Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/cares_wrap.cc')
-rw-r--r--src/cares_wrap.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index edc86761876..30e27ecf70a 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -1701,7 +1701,7 @@ void SetServers(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsArray());
- Local<Array> arr = Local<Array>::Cast(args[0]);
+ Local<Array> arr = args[0].As<Array>();
uint32_t len = arr->Length();
@@ -1718,8 +1718,7 @@ void SetServers(const FunctionCallbackInfo<Value>& args) {
for (uint32_t i = 0; i < len; i++) {
CHECK(arr->Get(env->context(), i).ToLocalChecked()->IsArray());
- Local<Array> elm =
- Local<Array>::Cast(arr->Get(env->context(), i).ToLocalChecked());
+ Local<Array> elm = arr->Get(env->context(), i).ToLocalChecked().As<Array>();
CHECK(elm->Get(env->context(),
0).ToLocalChecked()->Int32Value(env->context()).FromJust());