Esempio n. 1
0
virtual JSRuntime * createRuntime() {
    JSRuntime *rt = JS_NewRuntime(768 * 1024, JS_USE_HELPER_THREADS);
    if (!rt)
        return nullptr;
    setNativeStackQuota(rt);
    return rt;
}
Esempio n. 2
0
virtual JSRuntime * createRuntime() override
{
    JSRuntime* rt = JS_NewRuntime(0);
    if (!rt)
        return nullptr;
    JS_SetGCParameter(rt, JSGC_MAX_BYTES, (uint32_t)-1);
    setNativeStackQuota(rt);
    return rt;
}