summaryrefslogtreecommitdiff
path: root/src/async_wrap-inl.h
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2018-04-15 15:29:33 +0530
committerUjjwal Sharma <usharma1998@gmail.com>2018-04-20 10:58:06 +0530
commite32eddc550eb1aad8fe291a2808c22d1d6142aa5 (patch)
tree8601a3e63dac6d60d35cee8d47016924e9064d9e /src/async_wrap-inl.h
parent76f5b3966bc9bcc275728ce2317183272899272c (diff)
downloadandroid-node-v8-e32eddc550eb1aad8fe291a2808c22d1d6142aa5.tar.gz
android-node-v8-e32eddc550eb1aad8fe291a2808c22d1d6142aa5.tar.bz2
android-node-v8-e32eddc550eb1aad8fe291a2808c22d1d6142aa5.zip
src: move v8::HandleScope call to Emit
Move v8::HandleScope call to Emit removing it from previous locations where it was added to avoid crashing (constructor and destructor of AsyncWrap) for a more general and fool-proof solution. Ref: https://github.com/nodejs/node/pull/19972#issuecomment-381353894 PR-URL: https://github.com/nodejs/node/pull/20045 Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/async_wrap-inl.h')
-rw-r--r--src/async_wrap-inl.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/async_wrap-inl.h b/src/async_wrap-inl.h
index f9c709aa21..c9f1233324 100644
--- a/src/async_wrap-inl.h
+++ b/src/async_wrap-inl.h
@@ -50,7 +50,6 @@ 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());
}
@@ -58,7 +57,6 @@ 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());
}