Skip to content

Commit

Permalink
sync 执行函数抛错时向上抛出
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Jan 3, 2017
1 parent 47d761c commit a48fada
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fibjs/src/global/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ static void sync_stub(const v8::FunctionCallbackInfo<v8::Value> &args)

v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(args.Data());

func->Call(args.This(), (int32_t) argv.size(), argv.data());
v8::Local<v8::Value> result = func->Call(args.This(), (int32_t) argv.size(), argv.data());
if (result.IsEmpty())
{
args.GetReturnValue().Set(V8_RETURN(v8::Local<v8::Value>()));
return;
}

ev->wait();

Expand Down

0 comments on commit a48fada

Please sign in to comment.