napi_close_handle_scope
NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
napi_handle_scope scope);
-
[in] env
:调用 API 的环境。¥
[in] env
: The environment that the API is invoked under. -
[in] scope
:napi_value
表示要关闭的范围。¥
[in] scope
:napi_value
representing the scope to be closed.
如果 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.