@@ -2250,7 +2250,7 @@ void Initialize(Local<Object> target,
2250
2250
// Create FunctionTemplate for FSReqCallback
2251
2251
Local<FunctionTemplate> fst = env->NewFunctionTemplate (NewFSReqCallback);
2252
2252
fst->InstanceTemplate ()->SetInternalFieldCount (1 );
2253
- AsyncWrap::AddWrapMethods (env, fst );
2253
+ fst-> Inherit ( AsyncWrap::GetConstructorTemplate (env) );
2254
2254
Local<String> wrapString =
2255
2255
FIXED_ONE_BYTE_STRING (isolate, " FSReqCallback" );
2256
2256
fst->SetClassName (wrapString);
@@ -2263,7 +2263,7 @@ void Initialize(Local<Object> target,
2263
2263
// to do anything in the constructor, so we only store the instance template.
2264
2264
Local<FunctionTemplate> fh_rw = FunctionTemplate::New (isolate);
2265
2265
fh_rw->InstanceTemplate ()->SetInternalFieldCount (1 );
2266
- AsyncWrap::AddWrapMethods (env, fh_rw );
2266
+ fh_rw-> Inherit ( AsyncWrap::GetConstructorTemplate (env) );
2267
2267
Local<String> fhWrapString =
2268
2268
FIXED_ONE_BYTE_STRING (isolate, " FileHandleReqWrap" );
2269
2269
fh_rw->SetClassName (fhWrapString);
@@ -2272,7 +2272,7 @@ void Initialize(Local<Object> target,
2272
2272
2273
2273
// Create Function Template for FSReqPromise
2274
2274
Local<FunctionTemplate> fpt = FunctionTemplate::New (isolate);
2275
- AsyncWrap::AddWrapMethods (env, fpt );
2275
+ fpt-> Inherit ( AsyncWrap::GetConstructorTemplate (env) );
2276
2276
Local<String> promiseString =
2277
2277
FIXED_ONE_BYTE_STRING (isolate, " FSReqPromise" );
2278
2278
fpt->SetClassName (promiseString);
@@ -2282,7 +2282,7 @@ void Initialize(Local<Object> target,
2282
2282
2283
2283
// Create FunctionTemplate for FileHandle
2284
2284
Local<FunctionTemplate> fd = env->NewFunctionTemplate (FileHandle::New);
2285
- AsyncWrap::AddWrapMethods (env, fd );
2285
+ fd-> Inherit ( AsyncWrap::GetConstructorTemplate (env) );
2286
2286
env->SetProtoMethod (fd, " close" , FileHandle::Close);
2287
2287
env->SetProtoMethod (fd, " releaseFD" , FileHandle::ReleaseFD);
2288
2288
Local<ObjectTemplate> fdt = fd->InstanceTemplate ();
@@ -2301,7 +2301,7 @@ void Initialize(Local<Object> target,
2301
2301
Local<FunctionTemplate> fdclose = FunctionTemplate::New (isolate);
2302
2302
fdclose->SetClassName (FIXED_ONE_BYTE_STRING (isolate,
2303
2303
" FileHandleCloseReq" ));
2304
- AsyncWrap::AddWrapMethods (env, fdclose );
2304
+ fdclose-> Inherit ( AsyncWrap::GetConstructorTemplate (env) );
2305
2305
Local<ObjectTemplate> fdcloset = fdclose->InstanceTemplate ();
2306
2306
fdcloset->SetInternalFieldCount (1 );
2307
2307
env->set_fdclose_constructor_template (fdcloset);
0 commit comments