| 21 | } |
| 22 | |
| 23 | static void xFunc(sqlite3_context* invocation, int argc, sqlite3_value** argv) { |
| 24 | FUNCTION_START(); |
| 25 | |
| 26 | v8::Local<v8::Value> args_fast[4]; |
| 27 | v8::Local<v8::Value>* args = NULL; |
| 28 | if (argc != 0) { |
| 29 | args = argc <= 4 ? args_fast : ALLOC_ARRAY<v8::Local<v8::Value>>(argc); |
| 30 | Data::GetArgumentsJS(isolate, args, argv, argc, self->safe_ints); |
| 31 | } |
| 32 | |
| 33 | v8::MaybeLocal<v8::Value> maybeReturnValue = self->fn.Get(isolate)->Call(OnlyContext, v8::Undefined(isolate), argc, args); |
| 34 | if (args != args_fast) delete[] args; |
| 35 | |
| 36 | if (maybeReturnValue.IsEmpty()) self->PropagateJSError(invocation); |
| 37 | else Data::ResultValueFromJS(isolate, invocation, maybeReturnValue.ToLocalChecked(), self); |
| 38 | } |
| 39 | |
| 40 | protected: |
| 41 |
nothing calls this directly
no test coverage detected