Skip to content

Commit

Permalink
src: call overload ctor from the original ctor
Browse files Browse the repository at this point in the history
Call the new constructor overload from the original constructor to
reduce code duplication.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: #39768
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
RaisinTen authored and nodejs-github-bot committed Aug 21, 2021
1 parent 16853c9 commit e58592e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/api/callback.cc
Expand Up @@ -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,
Expand Down

0 comments on commit e58592e

Please sign in to comment.