| 58 | } |
| 59 | |
| 60 | int main(int argc, char **argv) |
| 61 | { |
| 62 | int r; |
| 63 | JSRuntime *rt; |
| 64 | JSContext *ctx; |
| 65 | r = 0; |
| 66 | rt = JS_NewRuntime(); |
| 67 | js_std_set_worker_new_context_func(JS_NewCustomContext); |
| 68 | js_std_init_handlers(rt); |
| 69 | JS_SetModuleLoaderFunc2(rt, NULL, js_module_loader, js_module_check_attributes, NULL); |
| 70 | ctx = JS_NewCustomContext(rt); |
| 71 | js_std_add_helpers(ctx, argc, argv); |
| 72 | js_std_eval_binary(ctx, qjsc_function_source, qjsc_function_source_size, 0); |
| 73 | r = js_std_loop(ctx); |
| 74 | if (r) { |
| 75 | js_std_dump_error(ctx); |
| 76 | } |
| 77 | js_std_free_handlers(rt); |
| 78 | JS_FreeContext(ctx); |
| 79 | JS_FreeRuntime(rt); |
| 80 | return r; |
| 81 | } |
nothing calls this directly
no test coverage detected