add option to change max stack size.

This commit is contained in:
ekibun
2021-01-03 21:47:14 +08:00
parent d7224dd840
commit e8ba97011a
9 changed files with 41 additions and 5 deletions

View File

@@ -71,6 +71,11 @@ extern "C"
return rt;
}
DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size)
{
JS_SetMaxStackSize(rt, stack_size);
}
DLLEXPORT void jsFreeRuntime(JSRuntime *rt)
{
JS_SetRuntimeOpaque(rt, nullptr);

View File

@@ -21,6 +21,8 @@ extern "C"
DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel);
DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size);
DLLEXPORT void jsFreeRuntime(JSRuntime *rt);
DLLEXPORT JSContext *jsNewContext(JSRuntime *rt);