@@ -840,7 +840,7 @@ class GetHostByNameWrap: public QueryWrap {
840840
841841template <class Wrap >
842842static void Query (const FunctionCallbackInfo<Value>& args) {
843- Environment* env = Environment::GetCurrent (args. GetIsolate () );
843+ Environment* env = Environment::GetCurrent (args);
844844
845845 CHECK_EQ (false , args.IsConstructCall ());
846846 CHECK (args[0 ]->IsObject ());
@@ -1003,7 +1003,7 @@ static void IsIP(const FunctionCallbackInfo<Value>& args) {
10031003
10041004
10051005static void GetAddrInfo (const FunctionCallbackInfo<Value>& args) {
1006- Environment* env = Environment::GetCurrent (args. GetIsolate () );
1006+ Environment* env = Environment::GetCurrent (args);
10071007
10081008 CHECK (args[0 ]->IsObject ());
10091009 CHECK (args[1 ]->IsString ());
@@ -1055,7 +1055,7 @@ static void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
10551055
10561056
10571057static void GetNameInfo (const FunctionCallbackInfo<Value>& args) {
1058- Environment* env = Environment::GetCurrent (args. GetIsolate () );
1058+ Environment* env = Environment::GetCurrent (args);
10591059
10601060 CHECK (args[0 ]->IsObject ());
10611061 CHECK (args[1 ]->IsString ());
@@ -1087,7 +1087,7 @@ static void GetNameInfo(const FunctionCallbackInfo<Value>& args) {
10871087
10881088
10891089static void GetServers (const FunctionCallbackInfo<Value>& args) {
1090- Environment* env = Environment::GetCurrent (args. GetIsolate () );
1090+ Environment* env = Environment::GetCurrent (args);
10911091
10921092 Local<Array> server_array = Array::New (env->isolate ());
10931093
@@ -1116,7 +1116,7 @@ static void GetServers(const FunctionCallbackInfo<Value>& args) {
11161116
11171117
11181118static void SetServers (const FunctionCallbackInfo<Value>& args) {
1119- Environment* env = Environment::GetCurrent (args. GetIsolate () );
1119+ Environment* env = Environment::GetCurrent (args);
11201120
11211121 CHECK (args[0 ]->IsArray ());
11221122
@@ -1184,7 +1184,7 @@ static void SetServers(const FunctionCallbackInfo<Value>& args) {
11841184
11851185
11861186static void StrError (const FunctionCallbackInfo<Value>& args) {
1187- Environment* env = Environment::GetCurrent (args. GetIsolate () );
1187+ Environment* env = Environment::GetCurrent (args);
11881188 const char * errmsg = ares_strerror (args[0 ]->Int32Value ());
11891189 args.GetReturnValue ().Set (OneByteString (env->isolate (), errmsg));
11901190}
@@ -1232,24 +1232,24 @@ static void Initialize(Handle<Object> target,
12321232 CaresTimerClose,
12331233 NULL );
12341234
1235- NODE_SET_METHOD (target, " queryA" , Query<QueryAWrap>);
1236- NODE_SET_METHOD (target, " queryAaaa" , Query<QueryAaaaWrap>);
1237- NODE_SET_METHOD (target, " queryCname" , Query<QueryCnameWrap>);
1238- NODE_SET_METHOD (target, " queryMx" , Query<QueryMxWrap>);
1239- NODE_SET_METHOD (target, " queryNs" , Query<QueryNsWrap>);
1240- NODE_SET_METHOD (target, " queryTxt" , Query<QueryTxtWrap>);
1241- NODE_SET_METHOD (target, " querySrv" , Query<QuerySrvWrap>);
1242- NODE_SET_METHOD (target, " queryNaptr" , Query<QueryNaptrWrap>);
1243- NODE_SET_METHOD (target, " querySoa" , Query<QuerySoaWrap>);
1244- NODE_SET_METHOD (target, " getHostByAddr" , Query<GetHostByAddrWrap>);
1245-
1246- NODE_SET_METHOD (target, " getaddrinfo" , GetAddrInfo);
1247- NODE_SET_METHOD (target, " getnameinfo" , GetNameInfo);
1248- NODE_SET_METHOD (target, " isIP" , IsIP);
1249-
1250- NODE_SET_METHOD (target, " strerror" , StrError);
1251- NODE_SET_METHOD (target, " getServers" , GetServers);
1252- NODE_SET_METHOD (target, " setServers" , SetServers);
1235+ env-> SetMethod (target, " queryA" , Query<QueryAWrap>);
1236+ env-> SetMethod (target, " queryAaaa" , Query<QueryAaaaWrap>);
1237+ env-> SetMethod (target, " queryCname" , Query<QueryCnameWrap>);
1238+ env-> SetMethod (target, " queryMx" , Query<QueryMxWrap>);
1239+ env-> SetMethod (target, " queryNs" , Query<QueryNsWrap>);
1240+ env-> SetMethod (target, " queryTxt" , Query<QueryTxtWrap>);
1241+ env-> SetMethod (target, " querySrv" , Query<QuerySrvWrap>);
1242+ env-> SetMethod (target, " queryNaptr" , Query<QueryNaptrWrap>);
1243+ env-> SetMethod (target, " querySoa" , Query<QuerySoaWrap>);
1244+ env-> SetMethod (target, " getHostByAddr" , Query<GetHostByAddrWrap>);
1245+
1246+ env-> SetMethod (target, " getaddrinfo" , GetAddrInfo);
1247+ env-> SetMethod (target, " getnameinfo" , GetNameInfo);
1248+ env-> SetMethod (target, " isIP" , IsIP);
1249+
1250+ env-> SetMethod (target, " strerror" , StrError);
1251+ env-> SetMethod (target, " getServers" , GetServers);
1252+ env-> SetMethod (target, " setServers" , SetServers);
12531253
12541254 target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " AF_INET" ),
12551255 Integer::New (env->isolate (), AF_INET));
0 commit comments