napi_close_handle_scope
NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
napi_handle_scope scope); [in] env:调用该 API 时所处的环境。[in] scope:napi_value表示要关闭的范围。
如果 API 成功,则返回 napi_ok。
🌐 Returns napi_ok if the API succeeded.
此 API 会关闭传入的作用域。作用域必须按照创建的相反顺序关闭。
🌐 This API closes the scope passed in. Scopes must be closed in the reverse order from which they were created.
即使存在挂起的 JavaScript 异常,也可以调用此 API。
🌐 This API can be called even if there is a pending JavaScript exception.