Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Sen <darshan.sen@postman.com>2021-08-15 08:30:35 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2021-08-21 09:53:50 +0300
commit16853c9d551275dce5390e10a1f1704e9954430b (patch)
tree657deb67cebb11132449f78999bf2ce844fe9e78 /src/node_api.cc
parent248f4c376444d0202f1d08f039c59485d6aea2e9 (diff)
src: add a constructor overload for CallbackScope
This overload accepts the current Environment* as an argument, unlike the other constructor, which accepts an Isolate*. This is useful because we can pass the current Environment* directly instead of recomputing it from the Isolate* inside the constructor. Signed-off-by: Darshan Sen <darshan.sen@postman.com> PR-URL: https://github.com/nodejs/node/pull/39768 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index 8304ccb7e86..b1b85073508 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -539,7 +539,7 @@ class AsyncContext {
class CallbackScope : public node::CallbackScope {
public:
explicit CallbackScope(AsyncContext* async_context)
- : node::CallbackScope(async_context->node_env()->isolate(),
+ : node::CallbackScope(async_context->node_env(),
async_context->resource_.Get(
async_context->node_env()->isolate()),
async_context->async_context()) {}