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