mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
src: only open HandleScope when necessary
PR-URL: https://github.com/nodejs/node/pull/26734 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit is contained in:
1 parent
d812dbb495
commit
bca23f2ee7
1 file changed
+1
-1
+1
-1
@@ -79,7 +79,6 @@ InternalCallbackScope::~InternalCallbackScope() {
|
||||
void InternalCallbackScope::Close() {
|
||||
if (closed_) return;
|
||||
closed_ = true;
|
||||
HandleScope handle_scope(env_->isolate());
|
||||
|
||||
if (!env_->can_call_into_js()) return;
|
||||
if (failed_ && !env_->is_main_thread() && env_->is_stopping()) {
|
||||
@@ -117,6 +116,7 @@ void InternalCallbackScope::Close() {
|
||||
return;
|
||||
}
|
||||
|
||||
HandleScope handle_scope(env_->isolate());
|
||||
Local<Object> process = env_->process_object();
|
||||
|
||||
if (!env_->can_call_into_js()) return;
|
||||
|
||||
Reference in new issue
Block a user