Created
May 12, 2018 11:02
Revisions
-
Deepal Priyadarshana created this gist
May 12, 2018 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ MaybeLocal<Value> InternalMakeCallback(Environment* env, Local<Object> recv, const Local<Function> callback, int argc, Local<Value> argv[], async_context asyncContext) { // ...redacted... Local<Function> domain_cb = env->domain_callback(); MaybeLocal<Value> ret; if (asyncContext.async_id != 0 || domain_cb.IsEmpty() || recv.IsEmpty()) { ret = callback->Call(env->context(), recv, argc, argv); } else { // ...redacted... } // ...redacted ... scope.Close(); if (scope.Failed()) { return Undefined(env->isolate()); } return ret; }