Exemplo n.º 1
0
static v8::Handle<v8::Value> startCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.MessagePort.start");
    MessagePort* imp = V8MessagePort::toNative(args.Holder());
    imp->start();
    return v8::Handle<v8::Value>();
}
JSValue JSC_HOST_CALL jsMessagePortPrototypeFunctionStart(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSMessagePort::s_info))
        return throwError(exec, TypeError);
    JSMessagePort* castedThisObj = static_cast<JSMessagePort*>(asObject(thisValue));
    MessagePort* imp = static_cast<MessagePort*>(castedThisObj->impl());

    imp->start();
    return jsUndefined();
}
Exemplo n.º 3
0
EncodedJSValue JSC_HOST_CALL jsMessagePortPrototypeFunctionStart(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSMessagePort::s_info))
        return throwVMTypeError(exec);
    JSMessagePort* castedThis = static_cast<JSMessagePort*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSMessagePort::s_info);
    MessagePort* imp = static_cast<MessagePort*>(castedThis->impl());

    imp->start();
    return JSValue::encode(jsUndefined());
}
static v8::Handle<v8::Value> startCallback(const v8::Arguments& args)
{
    MessagePort* imp = V8MessagePort::toNative(args.Holder());
    imp->start();
    return v8Undefined();
}