Example #1
0
static bool
RequestInterruptCallback(JSContext *cx, unsigned argc, jsval *vp)
{
    JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
    if (!sRemain--)
        JS_RequestInterruptCallback(JS_GetRuntime(cx));
    args.rval().setUndefined();
    return true;
}
Example #2
0
void MozJSImplScope::gc() {
    _pendingGC.store(true);
    JS_RequestInterruptCallback(_runtime);
}