@@ -2405,6 +2405,16 @@ inline Napi::Value FunctionReference::Call(
2405
2405
return scope.Escape (result);
2406
2406
}
2407
2407
2408
+ inline Napi::Value FunctionReference::Call (
2409
+ napi_value recv, size_t argc, const napi_value* args) const {
2410
+ EscapableHandleScope scope (_env);
2411
+ Napi::Value result = Value ().Call (recv, argc, args);
2412
+ if (scope.Env ().IsExceptionPending ()) {
2413
+ return Value ();
2414
+ }
2415
+ return scope.Escape (result);
2416
+ }
2417
+
2408
2418
inline Napi::Value FunctionReference::MakeCallback (
2409
2419
napi_value recv, const std::initializer_list<napi_value>& args) const {
2410
2420
EscapableHandleScope scope (_env);
@@ -2425,6 +2435,16 @@ inline Napi::Value FunctionReference::MakeCallback(
2425
2435
return scope.Escape (result);
2426
2436
}
2427
2437
2438
+ inline Napi::Value FunctionReference::MakeCallback (
2439
+ napi_value recv, size_t argc, const napi_value* args) const {
2440
+ EscapableHandleScope scope (_env);
2441
+ Napi::Value result = Value ().MakeCallback (recv, argc, args);
2442
+ if (scope.Env ().IsExceptionPending ()) {
2443
+ return Value ();
2444
+ }
2445
+ return scope.Escape (result);
2446
+ }
2447
+
2428
2448
inline Object FunctionReference::New (const std::initializer_list<napi_value>& args) const {
2429
2449
EscapableHandleScope scope (_env);
2430
2450
return scope.Escape (Value ().New (args)).As <Object>();
0 commit comments