@@ -3468,7 +3468,10 @@ inline HandleScope::HandleScope(Napi::Env env) : _env(env) {
3468
3468
}
3469
3469
3470
3470
inline HandleScope::~HandleScope () {
3471
- napi_close_handle_scope (_env, _scope);
3471
+ napi_status status = napi_close_handle_scope (_env, _scope);
3472
+ NAPI_FATAL_IF_FAILED (status,
3473
+ " HandleScope::~HandleScope" ,
3474
+ " napi_close_handle_scope" );
3472
3475
}
3473
3476
3474
3477
inline HandleScope::operator napi_handle_scope () const {
@@ -3493,7 +3496,10 @@ inline EscapableHandleScope::EscapableHandleScope(Napi::Env env) : _env(env) {
3493
3496
}
3494
3497
3495
3498
inline EscapableHandleScope::~EscapableHandleScope () {
3496
- napi_close_escapable_handle_scope (_env, _scope);
3499
+ napi_status status = napi_close_escapable_handle_scope (_env, _scope);
3500
+ NAPI_FATAL_IF_FAILED (status,
3501
+ " EscapableHandleScope::~EscapableHandleScope" ,
3502
+ " napi_close_escapable_handle_scope" );
3497
3503
}
3498
3504
3499
3505
inline EscapableHandleScope::operator napi_escapable_handle_scope () const {
@@ -3529,7 +3535,10 @@ inline CallbackScope::CallbackScope(napi_env env, napi_async_context context)
3529
3535
}
3530
3536
3531
3537
inline CallbackScope::~CallbackScope () {
3532
- napi_close_callback_scope (_env, _scope);
3538
+ napi_status status = napi_close_callback_scope (_env, _scope);
3539
+ NAPI_FATAL_IF_FAILED (status,
3540
+ " CallbackScope::~CallbackScope" ,
3541
+ " napi_close_callback_scope" );
3533
3542
}
3534
3543
3535
3544
inline CallbackScope::operator napi_callback_scope () const {
0 commit comments