@ -115,11 +115,6 @@ GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env,
}
}
void NewGetAddrInfoReqWrap ( const FunctionCallbackInfo < Value > & args ) {
CHECK ( args . IsConstructCall ( ) ) ;
}
class GetNameInfoReqWrap : public ReqWrap < uv_getnameinfo_t > {
class GetNameInfoReqWrap : public ReqWrap < uv_getnameinfo_t > {
public :
public :
GetNameInfoReqWrap ( Environment * env , Local < Object > req_wrap_obj ) ;
GetNameInfoReqWrap ( Environment * env , Local < Object > req_wrap_obj ) ;
@ -134,16 +129,6 @@ GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env,
}
}
void NewGetNameInfoReqWrap ( const FunctionCallbackInfo < Value > & args ) {
CHECK ( args . IsConstructCall ( ) ) ;
}
void NewQueryReqWrap ( const FunctionCallbackInfo < Value > & args ) {
CHECK ( args . IsConstructCall ( ) ) ;
}
int cmp_ares_tasks ( const node_ares_task * a , const node_ares_task * b ) {
int cmp_ares_tasks ( const node_ares_task * a , const node_ares_task * b ) {
if ( a - > sock < b - > sock )
if ( a - > sock < b - > sock )
return - 1 ;
return - 1 ;
@ -1400,8 +1385,12 @@ void Initialize(Local<Object> target,
target - > Set ( FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " AI_V4MAPPED " ) ,
target - > Set ( FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " AI_V4MAPPED " ) ,
Integer : : New ( env - > isolate ( ) , AI_V4MAPPED ) ) ;
Integer : : New ( env - > isolate ( ) , AI_V4MAPPED ) ) ;
auto is_construct_call_callback =
[ ] ( const FunctionCallbackInfo < Value > & args ) {
CHECK ( args . IsConstructCall ( ) ) ;
} ;
Local < FunctionTemplate > aiw =
Local < FunctionTemplate > aiw =
FunctionTemplate : : New ( env - > isolate ( ) , NewGetAddrInfoReqWrap ) ;
FunctionTemplate : : New ( env - > isolate ( ) , is_construct_call_callback ) ;
aiw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
aiw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
aiw - > SetClassName (
aiw - > SetClassName (
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " GetAddrInfoReqWrap " ) ) ;
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " GetAddrInfoReqWrap " ) ) ;
@ -1409,7 +1398,7 @@ void Initialize(Local<Object> target,
aiw - > GetFunction ( ) ) ;
aiw - > GetFunction ( ) ) ;
Local < FunctionTemplate > niw =
Local < FunctionTemplate > niw =
FunctionTemplate : : New ( env - > isolate ( ) , NewGetNameInfoReqWrap ) ;
FunctionTemplate : : New ( env - > isolate ( ) , is_construct_call_callback ) ;
niw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
niw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
niw - > SetClassName (
niw - > SetClassName (
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " GetNameInfoReqWrap " ) ) ;
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " GetNameInfoReqWrap " ) ) ;
@ -1417,7 +1406,7 @@ void Initialize(Local<Object> target,
niw - > GetFunction ( ) ) ;
niw - > GetFunction ( ) ) ;
Local < FunctionTemplate > qrw =
Local < FunctionTemplate > qrw =
FunctionTemplate : : New ( env - > isolate ( ) , NewQueryReqWrap ) ;
FunctionTemplate : : New ( env - > isolate ( ) , is_construct_call_callback ) ;
qrw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
qrw - > InstanceTemplate ( ) - > SetInternalFieldCount ( 1 ) ;
qrw - > SetClassName (
qrw - > SetClassName (
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " QueryReqWrap " ) ) ;
FIXED_ONE_BYTE_STRING ( env - > isolate ( ) , " QueryReqWrap " ) ) ;