File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -1066,17 +1066,13 @@ MaybeLocal<Value> InternalMakeCallback(Environment* env,
10661066 return Undefined (env->isolate ());
10671067 }
10681068
1069- MaybeLocal<Value> ret;
1069+ MaybeLocal<Value> ret = callback-> Call (env-> context (), recv, argc, argv) ;
10701070
1071- {
1072- ret = callback->Call (env->context (), recv, argc, argv);
1073-
1074- if (ret.IsEmpty ()) {
1075- // NOTE: For backwards compatibility with public API we return Undefined()
1076- // if the top level call threw.
1077- scope.MarkAsFailed ();
1078- return scope.IsInnerMakeCallback () ? ret : Undefined (env->isolate ());
1079- }
1071+ if (ret.IsEmpty ()) {
1072+ // NOTE: For backwards compatibility with public API we return Undefined()
1073+ // if the top level call threw.
1074+ scope.MarkAsFailed ();
1075+ return scope.IsInnerMakeCallback () ? ret : Undefined (env->isolate ());
10801076 }
10811077
10821078 scope.Close ();
You can’t perform that action at this time.
0 commit comments