static v8::Handle<v8::Value> clearTimeoutCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.WorkerContext.clearTimeout");
    WorkerContext* imp = V8WorkerContext::toNative(args.Holder());
    EXCEPTION_BLOCK(int, handle, toInt32(args[0]));
    imp->clearTimeout(handle);
    return v8::Handle<v8::Value>();
}
Example #2
0
JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearTimeout(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.isObject(&JSWorkerContext::s_info))
        return throwError(exec, TypeError);
    JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue));
    WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl());
    int handle = args.at(0).toInt32(exec);

    imp->clearTimeout(handle);
    return jsUndefined();
}