add timeout and memory limit

This commit is contained in:
ekibun
2022-05-20 00:40:44 +08:00
parent 232ea07e89
commit 32aac42c19
8 changed files with 426 additions and 316 deletions

View File

@@ -25,7 +25,7 @@ extern "C"
DLLEXPORT JSValue *jsNULL();
DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel);
DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel, int64_t timeout);
DLLEXPORT uint32_t jsNewClass(JSContext *ctx, const char *name);
@@ -35,6 +35,8 @@ extern "C"
DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size);
DLLEXPORT void jsSetMemoryLimit(JSRuntime *rt, size_t limit);
DLLEXPORT void jsFreeRuntime(JSRuntime *rt);
DLLEXPORT JSValue *jsNewCFunction(JSContext *ctx, JSValue *funcData);