MCPcopy Create free account
hub / github.com/buke/quickjs-go / call_handler

Function call_handler

deps/quickjs/quickjs-libc.c:2543–2557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2541}
2542
2543static int call_handler(JSContext *ctx, JSValue func)
2544{
2545 int r;
2546 JSValue ret, func1;
2547 /* 'func' might be destroyed when calling itself (if it frees the
2548 handler), so must take extra care */
2549 func1 = JS_DupValue(ctx, func);
2550 ret = JS_Call(ctx, func1, JS_UNDEFINED, 0, NULL);
2551 JS_FreeValue(ctx, func1);
2552 r = 0;
2553 if (JS_IsException(ret))
2554 r = -1;
2555 JS_FreeValue(ctx, ret);
2556 return r;
2557}
2558
2559static int js_os_run_timers(JSRuntime *rt, JSContext *ctx, JSThreadState *ts, int *min_delay)
2560{

Callers 2

js_os_run_timersFunction · 0.85
js_os_poll_internalFunction · 0.85

Calls 1

JS_IsExceptionFunction · 0.85

Tested by

no test coverage detected