Esempio n. 1
0
JSValue jsMessageChannelPort2(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSMessageChannel* castedThis = static_cast<JSMessageChannel*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    MessageChannel* imp = static_cast<MessageChannel*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->port2()));
    return result;
}
EncodedJSValue jsMessageChannelConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSMessageChannel* domObject = jsDynamicCast<JSMessageChannel*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSMessageChannel::getConstructor(exec->vm(), domObject->globalObject()));
}
EncodedJSValue jsMessageChannelPort2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSMessageChannel* castedThis = jsDynamicCast<JSMessageChannel*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    MessageChannel& impl = castedThis->impl();
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.port2()));
    return JSValue::encode(result);
}
Esempio n. 4
0
JSValue jsMessageChannelConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSMessageChannel* domObject = static_cast<JSMessageChannel*>(asObject(slotBase));
    return JSMessageChannel::getConstructor(exec, domObject->globalObject());
}