Skip to content

Commit

Permalink
More alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian.Just committed Aug 12, 2014
1 parent f1bb155 commit f462c2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dotnet/clrfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 455,7 @@ Handle<v8::Value> ClrFunc::Call(Handle<v8::Value> payload, Handle<v8::Value> cal
Task<System::Object^>^ task = this->func(context->Payload);
if (task->IsCompleted)
{
DBG("Complete 1. pass");
// Completed synchronously. Return a value or invoke callback based on call pattern.
context->Task = task;
return scope.Close(context->CompleteOnV8Thread());
Expand All @@ -468,6 469,7 @@ Handle<v8::Value> ClrFunc::Call(Handle<v8::Value> payload, Handle<v8::Value> cal
}
else
{
DBG("Complete 2. pass");
// Create a GC root around the ClrFuncInvokeContext to ensure it is not garbage collected
// while the CLR function executes asynchronously.
context->InitializeAsyncOperation();
Expand All @@ -479,6 481,7 @@ Handle<v8::Value> ClrFunc::Call(Handle<v8::Value> payload, Handle<v8::Value> cal
}
catch (System::Exception^ e)
{
DBG("Exception 1. pass");
return scope.Close(throwV8Exception(ClrFunc::MarshalCLRExceptionToV8(e)));
}

Expand Down

0 comments on commit f462c2f

Please sign in to comment.