summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-03-20 19:19:02 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-27 10:30:11 -0400
commitcc7bb855a78a11d1e7fb3eed78ba0b9458da0841 (patch)
tree49d55ad6cd0e5786dedc88ea67de4238e3579878 /src/api
parent51970537ee06f824160fcd035b018117ce264345 (diff)
downloadandroid-node-v8-cc7bb855a78a11d1e7fb3eed78ba0b9458da0841.tar.gz
android-node-v8-cc7bb855a78a11d1e7fb3eed78ba0b9458da0841.tar.bz2
android-node-v8-cc7bb855a78a11d1e7fb3eed78ba0b9458da0841.zip
src: move AsyncCallbackScope out of Environment
PR-URL: https://github.com/nodejs/node/pull/26824 Refs: https://github.com/nodejs/node/issues/26776 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r--src/api/callback.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/callback.cc b/src/api/callback.cc
index 7c6e8d8697..4083ae8487 100644
--- a/src/api/callback.cc
+++ b/src/api/callback.cc
@@ -92,7 +92,7 @@ void InternalCallbackScope::Close() {
AsyncWrap::EmitAfter(env_, async_context_.async_id);
}
- if (env_->makecallback_depth() > 1) {
+ if (env_->async_callback_scope_depth() > 1) {
return;
}
@@ -217,7 +217,7 @@ MaybeLocal<Value> MakeCallback(Isolate* isolate,
Context::Scope context_scope(env->context());
MaybeLocal<Value> ret =
InternalMakeCallback(env, recv, callback, argc, argv, asyncContext);
- if (ret.IsEmpty() && env->makecallback_depth() == 0) {
+ if (ret.IsEmpty() && env->async_callback_scope_depth() == 0) {
// This is only for legacy compatibility and we may want to look into
// removing/adjusting it.
return Undefined(env->isolate());