コード例 #1
0
ファイル: JSTestInterface.cpp プロジェクト: edcwconan/webkit
EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(thisValue);
    JSValue decodedThisValue = JSValue::decode(thisValue);
    auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    if (UNLIKELY(!castedThis)) {
        return throwGetterTypeError(*state, "TestInterface", "supplementalStr3");
    }
    return JSValue::encode(castedThis->supplementalStr3(*state));
}
コード例 #2
0
EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(thisValue);
    JSValue decodedThisValue = JSValue::decode(thisValue);
    auto* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(decodedThisValue);
    if (UNLIKELY(!castedThis)) {
        return throwGetterTypeError(*state, "TestJSBuiltinConstructor", "testAttributeRWCustom");
    }
    return JSValue::encode(castedThis->testAttributeRWCustom(*state));
}
コード例 #3
0
ファイル: JSTestNode.cpp プロジェクト: JohnDn/webkit
EncodedJSValue jsTestNodeName(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestNode* castedThis = jsDynamicCast<JSTestNode*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis))
        return throwGetterTypeError(*state, "TestNode", "name");
    auto& impl = castedThis->wrapped();
    JSValue result = jsStringWithCache(state, impl.name());
    return JSValue::encode(result);
}
コード例 #4
0
ファイル: JSTestInterface.cpp プロジェクト: edcwconan/webkit
EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(thisValue);
    JSValue decodedThisValue = JSValue::decode(thisValue);
    auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    if (UNLIKELY(!castedThis)) {
        return throwGetterTypeError(*state, "TestInterface", "supplementalNode");
    }
    auto& impl = castedThis->wrapped();
    JSValue result = toJS(state, castedThis->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
    return JSValue::encode(result);
}
コード例 #5
0
ファイル: JSTestInterface.cpp プロジェクト: edcwconan/webkit
EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(thisValue);
    JSValue decodedThisValue = JSValue::decode(thisValue);
    auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    if (UNLIKELY(!castedThis)) {
        return throwGetterTypeError(*state, "TestInterface", "implementsStr2");
    }
    auto& impl = castedThis->wrapped();
    JSValue result = jsStringWithCache(state, impl.implementsStr2());
    return JSValue::encode(result);
}