Skip to content

Commit

Permalink
src: remove redundant calls to v8::HandleScope
Browse files Browse the repository at this point in the history
Remove redundant calls to v8::HandleScope in the contructor and
destructor for the AsyncScope class

Refs: nodejs#19972 (comment)
Refs: nodejs#20045
  • Loading branch information
ryzokuken committed Apr 17, 2018
1 parent e86b319 commit 4a1e88f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/async_wrap-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@ inline AsyncWrap::AsyncScope::AsyncScope(AsyncWrap* wrap)
Environment* env = wrap->env();
if (env->async_hooks()->fields()[Environment::AsyncHooks::kBefore] == 0)
return;
v8::HandleScope handle_scope(env->isolate());
EmitBefore(env, wrap->get_async_id());
}

inline AsyncWrap::AsyncScope::~AsyncScope() {
Environment* env = wrap_->env();
if (env->async_hooks()->fields()[Environment::AsyncHooks::kAfter] == 0)
return;
v8::HandleScope handle_scope(env->isolate());
EmitAfter(env, wrap_->get_async_id());
}

Expand Down

0 comments on commit 4a1e88f

Please sign in to comment.