| 432 | } |
| 433 | |
| 434 | V8_EXPORT JSFunction *GetFunctionFromValue(v8::Isolate* Isolate, v8::Value *Value, int IsOut) |
| 435 | { |
| 436 | if (IsOut) |
| 437 | { |
| 438 | auto Context = Isolate->GetCurrentContext(); |
| 439 | auto Outer = Value->ToObject(Context).ToLocalChecked(); |
| 440 | auto Realvalue = Outer->Get(Context, FV8Utils::V8String(Isolate, "value")).ToLocalChecked(); |
| 441 | return GetFunctionFromValue(Isolate, *Realvalue, false); |
| 442 | } |
| 443 | else |
| 444 | { |
| 445 | auto Context = Isolate->GetCurrentContext(); |
| 446 | auto Function = v8::Local<v8::Function>::Cast(Value->ToObject(Context).ToLocalChecked()); |
| 447 | auto JsEngine = FV8Utils::IsolateData<JSEngine>(Isolate); |
| 448 | return JsEngine->CreateJSFunction(Isolate, Context, Function); |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | V8_EXPORT puerts::JSObject *GetJSObjectFromValue(v8::Isolate* Isolate, v8::Value *Value, int IsOut) |
| 453 | { |
nothing calls this directly
no test coverage detected