src: call overload ctor from the original ctor

Call the new constructor overload from the original constructor to
reduce code duplication.

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>
This commit is contained in:
Darshan Sen authored and Michaël Zasso committed 2021-08-22 08:48:41 +02:00
1 parent 0918ea0683
commit a704c9dfce
1 file changed
+2 -7
+2 -7
View File
@@ -18,13 +18,8 @@ using v8::Value;
CallbackScope::CallbackScope(Isolate* isolate,
Local<Object> object,
async_context asyncContext)
: private_(new InternalCallbackScope(Environment::GetCurrent(isolate),
object,
asyncContext)),
try_catch_(isolate) {
try_catch_.SetVerbose(true);
}
async_context async_context)
: CallbackScope(Environment::GetCurrent(isolate), object, async_context) {}
CallbackScope::CallbackScope(Environment* env,
Local<Object> object,