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