Changeset 206953 in webkit


Ignore:
Timestamp:
Oct 8, 2016 6:09:30 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Refactor binding generated casted-this checks
https://bugs.webkit.org/show_bug.cgi?id=162677

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-08
Reviewed by Darin Adler.

No change of behavior.

Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks.

The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue.
In the future, the second function should only take references.

Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value.
This allows implementing the first function using the second function as template parameter.

Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access.

  • bindings/js/JSDOMBinding.h:

(WebCore::BindingCaller::attribute):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:
  • bindings/scripts/test/JS/JSTestNondeterministic.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.cpp:
  • bindings/scripts/test/JS/JSattribute.h:
Location:
trunk/Source/WebCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206952 r206953  
     12016-10-08  Youenn Fablet  <youenn@apple.com>
     2
     3        Refactor binding generated casted-this checks
     4        https://bugs.webkit.org/show_bug.cgi?id=162677
     5
     6        Reviewed by Darin Adler.
     7
     8        No change of behavior.
     9
     10        Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks.
     11
     12        The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue.
     13        In the future, the second function should only take references.
     14
     15        Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value.
     16        This allows implementing the first function using the second function as template parameter.
     17
     18        Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access.
     19
     20        * bindings/js/JSDOMBinding.h:
     21        (WebCore::BindingCaller::attribute):
     22        * bindings/scripts/CodeGeneratorJS.pm:
     23        (GenerateHeader):
     24        (GenerateImplementation):
     25        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
     26        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
     27        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
     28        * bindings/scripts/test/JS/JSTestEventConstructor.h:
     29        * bindings/scripts/test/JS/JSTestException.cpp:
     30        * bindings/scripts/test/JS/JSTestException.h:
     31        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
     32        * bindings/scripts/test/JS/JSTestInterface.cpp:
     33        * bindings/scripts/test/JS/JSTestInterface.h:
     34        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
     35        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
     36        * bindings/scripts/test/JS/JSTestNode.cpp:
     37        * bindings/scripts/test/JS/JSTestNode.h:
     38        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
     39        * bindings/scripts/test/JS/JSTestNondeterministic.h:
     40        * bindings/scripts/test/JS/JSTestObj.cpp:
     41        * bindings/scripts/test/JS/JSTestObj.h:
     42        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
     43        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
     44        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
     45        * bindings/scripts/test/JS/JSTestTypedefs.h:
     46        * bindings/scripts/test/JS/JSattribute.cpp:
     47        * bindings/scripts/test/JS/JSattribute.h:
     48
    1492016-10-08  Enrique Ocaña González  <eocanha@igalia.com>
    250
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.h

    r206681 r206953  
    383383template<typename VariadicHelper> typename VariadicHelper::Result toArguments(JSC::ExecState&, size_t startIndex = 0);
    384384
     385enum class CastedThisErrorBehavior { Throw, ReturnEarly };
     386
     387template<typename JSClass>
     388struct BindingCaller {
     389    using AttributeGetterFunction = JSC::JSValue(JSC::ExecState*, JSClass*, JSC::ThrowScope&);
     390
     391    template<AttributeGetterFunction getter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
     392    static JSC::EncodedJSValue attribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, const char* attributeName)
     393    {
     394        ASSERT(state);
     395        auto throwScope = DECLARE_THROW_SCOPE(state->vm());
     396        auto* thisObject = JSClass::castForAttribute(state, thisValue);
     397        if (UNLIKELY(!thisObject)) {
     398            ASSERT(JSClass::info());
     399            return shouldThrow == CastedThisErrorBehavior::Throw ?
     400                throwGetterTypeError(*state, throwScope, JSClass::info()->className, attributeName) : JSC::JSValue::encode(JSC::jsUndefined());
     401        }
     402        // FIXME: We should refactor the binding generated code to use references for state and thisObject.
     403        return JSC::JSValue::encode(getter(state, thisObject, throwScope));
     404    }
     405};
     406
    385407// Inline functions and template definitions.
    386408
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r206877 r206953  
    14111411    # Attribute and function enums
    14121412    if ($numAttributes > 0) {
     1413        push(@headerContent, "    static ${className}* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);\n");
     1414
    14131415        foreach (@{$interface->attributes}) {
    14141416            my $attribute = $_;
     
    24042406
    24052407        push(@implContent, $endAppleCopyright) if $inAppleCopyright;
    2406 
    24072408        push(@implContent, "\n");
    24082409    }
     
    24102411    if ($numAttributes > 0 || NeedsConstructorProperty($interface)) {
    24112412        push(@implContent, "// Attributes\n\n");
     2413
    24122414        foreach my $attribute (@{$interface->attributes}) {
    24132415            next if $attribute->signature->extendedAttributes->{ForwardDeclareInHeader};
     
    28582860
    28592861    }
     2862
     2863    if ($numAttributes > 0) {
     2864        my $castingFunction = $interface->extendedAttributes->{"CustomProxyToJSObject"} ? "to${className}" : GetCastingHelperForThisObject($interface);
     2865        # FIXME: Remove ImplicitThis keyword as it is no longer defined by WebIDL spec and is only used in DOMWindow.
     2866        if ($interface->extendedAttributes->{"ImplicitThis"}) {
     2867            push(@implContent, "inline ${className}* ${className}::castForAttribute(ExecState* state, EncodedJSValue thisValue)\n");
     2868            push(@implContent, "{\n");
     2869            push(@implContent, "    JSValue decodedThisValue = JSValue::decode(thisValue);\n");
     2870            push(@implContent, "    if (decodedThisValue.isUndefinedOrNull())\n");
     2871            push(@implContent, "        decodedThisValue = state->thisValue().toThis(state, NotStrictMode);\n");
     2872            push(@implContent, "    return $castingFunction(decodedThisValue);\n");
     2873            push(@implContent, "}\n\n");
     2874        } else {
     2875            push(@implContent, "inline ${className}* ${className}::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)\n");
     2876            push(@implContent, "{\n");
     2877            push(@implContent, "    return $castingFunction(JSValue::decode(thisValue));\n");
     2878            push(@implContent, "}\n\n");
     2879        }
     2880    }
     2881
    28602882    $numAttributes = $numAttributes + 1 if NeedsConstructorProperty($interface);
    28612883    if ($numAttributes > 0) {
     
    28752897            push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
    28762898
    2877             push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
    2878             push(@implContent, "{\n");
    2879 
    2880             push(@implContent, "    VM& vm = state->vm();\n");
    2881             push(@implContent, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
    2882             push(@implContent, "    UNUSED_PARAM(throwScope);\n");
    2883             push(@implContent, "    UNUSED_PARAM(thisValue);\n");
    2884 
    28852899            if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
    2886                 push(@implContent, "    JSValue decodedThisValue = JSValue::decode(thisValue);\n");
    2887                 my $castingFunction = $interface->extendedAttributes->{CustomProxyToJSObject} ? "to${className}" : GetCastingHelperForThisObject($interface);
    2888                 # http://heycam.github.io/webidl/#ImplicitThis
    2889                 if ($interface->extendedAttributes->{ImplicitThis}) {
    2890                     push(@implContent, "    auto* castedThis = decodedThisValue.isUndefinedOrNull() ? $castingFunction(state->thisValue().toThis(state, NotStrictMode)) : $castingFunction(decodedThisValue);\n");
    2891                 } else {
    2892                     push(@implContent, "    auto* castedThis = $castingFunction(decodedThisValue);\n");
    2893                 }
    2894                 push(@implContent, "    if (UNLIKELY(!castedThis)) {\n");
    2895                 if ($attribute->signature->extendedAttributes->{LenientThis}) {
    2896                     push(@implContent, "        return JSValue::encode(jsUndefined());\n");
    2897                 } else {
    2898                     push(@implContent, "        return throwGetterTypeError(*state, throwScope, \"$visibleInterfaceName\", \"$name\");\n");
    2899                 }
    2900                 push(@implContent, "    }\n");
    2901             }
     2900                my $templateParameters = "${getFunctionName}Getter";
     2901                $templateParameters .= ", CastedThisErrorBehavior::ReturnEarly" if ($attribute->signature->extendedAttributes->{LenientThis});
     2902                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*, ${className}*, ThrowScope& throwScope);\n\n");
     2903
     2904                push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
     2905                push(@implContent, "{\n");
     2906                push(@implContent, "    return BindingCaller<${className}>::attribute<${templateParameters}>(state, thisValue, \"$name\");\n");
     2907                push(@implContent, "}\n\n");
     2908
     2909                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state, ${className}* thisObject, ThrowScope& throwScope)\n");
     2910                push(@implContent, "{\n");
     2911                push(@implContent, "    UNUSED_PARAM(throwScope);\n");
     2912            } else {
     2913                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*);\n\n");
     2914
     2915                push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue, PropertyName)\n");
     2916                push(@implContent, "{\n");
     2917                push(@implContent, "    return JSValue::encode(${getFunctionName}Getter(state));\n");
     2918                push(@implContent, "}\n\n");
     2919
     2920                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state)\n");
     2921                push(@implContent, "{\n");
     2922            }
     2923            push(@implContent, "    UNUSED_PARAM(state);\n");
    29022924
    29032925            my @arguments = ();
     
    29172939                    AddToImplIncludes("Settings.h");
    29182940                    my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{EnabledBySetting}) . "Enabled";
    2919                     push(@implContent, "    if (UNLIKELY(!castedThis->wrapped().frame()))\n");
    2920                     push(@implContent, "        return JSValue::encode(jsUndefined());\n");
    2921                     push(@implContent, "    Settings& settings = castedThis->wrapped().frame()->settings();\n");
     2941                    push(@implContent, "    if (UNLIKELY(!thisObject->wrapped().frame()))\n");
     2942                    push(@implContent, "        return jsUndefined();\n");
     2943                    push(@implContent, "    Settings& settings = thisObject->wrapped().frame()->settings();\n");
    29222944                    push(@implContent, "    if (!settings.$enable_function())\n");
    2923                     push(@implContent, "        return JSValue::encode(jsUndefined());\n");
     2945                    push(@implContent, "        return jsUndefined();\n");
    29242946                }
    29252947            }
     
    29312953                !$attribute->signature->extendedAttributes->{DoNotCheckSecurityOnGetter}) {
    29322954                if ($interfaceName eq "DOMWindow") {
    2933                     push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
     2955                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, thisObject->wrapped(), ThrowSecurityError))\n");
    29342956                } else {
    2935                     push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
     2957                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))\n");
    29362958                }
    2937                 push(@implContent, "        return JSValue::encode(jsUndefined());\n");
     2959                push(@implContent, "        return jsUndefined();\n");
    29382960            }
    29392961
     
    29522974                push(@implContent, "    static NeverDestroyed<const AtomicString> bindingName(\"$interfaceName.$name\", AtomicString::ConstructFromLiteral);\n");
    29532975                push(@implContent, "    if (cursor.isCapturing()) {\n");
    2954                 push(@implContent, "        $memoizedType memoizedResult = castedThis->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
     2976                push(@implContent, "        $memoizedType memoizedResult = thisObject->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
    29552977                push(@implContent, "        cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, $exceptionCode);\n");
    2956                 push(@implContent, "        JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
     2978                push(@implContent, "        JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
    29572979                push(@implContent, "        setDOMException(state, throwScope, ec);\n") if $getterMayThrowLegacyException;
    2958                 push(@implContent, "        return JSValue::encode(result);\n");
     2980                push(@implContent, "        return result;\n");
    29592981                push(@implContent, "    }\n");
    29602982                push(@implContent, "\n");
     
    29642986                push(@implContent, "        if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
    29652987                # FIXME: the generated code should report an error if an input cannot be fetched or converted.
    2966                 push(@implContent, "            JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
     2988                push(@implContent, "            JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
    29672989                push(@implContent, "            setDOMException(state, throwScope, input->exceptionCode());\n") if $getterMayThrowLegacyException;
    2968                 push(@implContent, "            return JSValue::encode(result);\n");
     2990                push(@implContent, "            return result;\n");
    29692991                push(@implContent, "        }\n");
    29702992                push(@implContent, "    }\n");
     
    29732995
    29742996            if (HasCustomGetter($attribute->signature->extendedAttributes)) {
    2975                 push(@implContent, "    return JSValue::encode(castedThis->$implGetterFunctionName(*state));\n");
     2997                push(@implContent, "    return thisObject->$implGetterFunctionName(*state);\n");
    29762998            } elsif ($attribute->signature->extendedAttributes->{CheckSecurityForNode}) {
    29772999                $implIncludes{"JSDOMBinding.h"} = 1;
    2978                 push(@implContent, "    auto& impl = castedThis->wrapped();\n");
    2979                 push(@implContent, "    return JSValue::encode(shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
     3000                push(@implContent, "    auto& impl = thisObject->wrapped();\n");
     3001                push(@implContent, "    return shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "thisObject") . " : jsNull();\n");
    29803002            } elsif ($type eq "EventHandler") {
    29813003                $implIncludes{"EventNames.h"} = 1;
     
    29843006                    : "eventHandlerAttribute";
    29853007                my $eventName = EventHandlerAttributeEventName($attribute);
    2986                 push(@implContent, "    UNUSED_PARAM(state);\n");
    2987                 push(@implContent, "    return JSValue::encode($getter(castedThis->wrapped(), $eventName));\n");
     3008                push(@implContent, "    return $getter(thisObject->wrapped(), $eventName);\n");
    29883009            } elsif ($attribute->signature->type =~ /Constructor$/) {
    29893010                my $constructorType = $attribute->signature->type;
    29903011                $constructorType =~ s/Constructor$//;
    2991                 # When Constructor attribute is used by DOMWindow.idl, it's correct to pass castedThis as the global object
    2992                 # When JSDOMWrappers have a back-pointer to the globalObject we can pass castedThis->globalObject()
     3012                # When Constructor attribute is used by DOMWindow.idl, it's correct to pass thisObject as the global object
     3013                # When JSDOMWrappers have a back-pointer to the globalObject we can pass thisObject->globalObject()
    29933014                if ($interfaceName eq "DOMWindow") {
    29943015                    my $named = ($constructorType =~ /Named$/) ? "Named" : "";
    29953016                    $constructorType =~ s/Named$//;
    2996                     push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::get${named}Constructor(state->vm(), castedThis));\n");
     3017                    push(@implContent, "    return JS" . $constructorType . "::get${named}Constructor(state->vm(), thisObject);\n");
    29973018                } else {
    29983019                    AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{Conditional});
    2999                     push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::getConstructor(state->vm(), castedThis->globalObject()));\n");
     3020                    push(@implContent, "    return JS" . $constructorType . "::getConstructor(state->vm(), thisObject->globalObject());\n");
    30003021                }
    30013022            } elsif (!$attribute->signature->extendedAttributes->{GetterMayThrowLegacyException} && !$attribute->signature->extendedAttributes->{GetterMayThrowLegacyExceptionWithMessage}) {
     
    30043025                    $cacheIndex = $currentCachedAttribute;
    30053026                    $currentCachedAttribute++;
    3006                     push(@implContent, "    if (JSValue cachedValue = castedThis->m_" . $attribute->signature->name . ".get())\n");
    3007                     push(@implContent, "        return JSValue::encode(cachedValue);\n");
     3027                    push(@implContent, "    if (JSValue cachedValue = thisObject->m_" . $attribute->signature->name . ".get())\n");
     3028                    push(@implContent, "        return cachedValue;\n");
    30083029                }
    30093030
    3010                 my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "JSValue::encode(jsUndefined())");
     3031                my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "jsUndefined()");
    30113032
    30123033                if ($svgListPropertyType) {
    3013                     push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $interface, "castedThis->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
     3034                    push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $interface, "thisObject->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
    30143035                } elsif ($svgPropertyOrListPropertyType) {
    3015                     push(@implContent, "    $svgPropertyOrListPropertyType& impl = castedThis->wrapped().propertyReference();\n");
     3036                    push(@implContent, "    $svgPropertyOrListPropertyType& impl = thisObject->wrapped().propertyReference();\n");
    30163037                    if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
    3017                         push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "castedThis") . ";\n");
     3038                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "thisObject") . ";\n");
    30183039                    } else {
    3019                         push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
     3040                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
    30203041
    30213042                    }
     
    30343055
    30353056                    unshift(@arguments, @callWithArgs);
    3036                     my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
    3037                     push(@implContent, "    auto& impl = castedThis->wrapped();\n") if !$attribute->isStatic;
     3057                    my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "thisObject");
     3058                    push(@implContent, "    auto& impl = thisObject->wrapped();\n") if !$attribute->isStatic;
    30383059                    if ($codeGenerator->IsSVGAnimatedType($type)) {
    30393060                        push(@implContent, "    auto obj = $jsType;\n");
    3040                         push(@implContent, "    JSValue result = toJS(state, castedThis->globalObject(), obj.get());\n");
     3061                        push(@implContent, "    JSValue result = toJS(state, thisObject->globalObject(), obj.get());\n");
    30413062                    } else {
    30423063                        push(@implContent, "    JSValue result = $jsType;\n");
     
    30443065                }
    30453066
    3046                 push(@implContent, "    castedThis->m_" . $attribute->signature->name . ".set(state->vm(), castedThis, result);\n") if $attribute->signature->extendedAttributes->{CachedAttribute};
    3047                 push(@implContent, "    return JSValue::encode(result);\n");
     3067                push(@implContent, "    thisObject->m_" . $attribute->signature->name . ".set(state->vm(), thisObject, result);\n") if $attribute->signature->extendedAttributes->{CachedAttribute};
     3068                push(@implContent, "    return result;\n");
    30483069
    30493070            } else {
    3050                 unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "JSValue::encode(jsUndefined())"));
     3071                unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "jsUndefined()"));
    30513072
    30523073                if ($svgPropertyOrListPropertyType) {
    3053                     push(@implContent, "    $svgPropertyOrListPropertyType impl(*castedThis->wrapped());\n");
    3054                     push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
     3074                    push(@implContent, "    $svgPropertyOrListPropertyType impl(*thisObject->wrapped());\n");
     3075                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
    30553076                } else {
    3056                     push(@implContent, "    auto& impl = castedThis->wrapped();\n");
    3057                     push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
     3077                    push(@implContent, "    auto& impl = thisObject->wrapped();\n");
     3078                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
    30583079                }
    30593080
    30603081                push(@implContent, "    setDOMException(state, throwScope, ec);\n");
    30613082
    3062                 push(@implContent, "    return JSValue::encode(result);\n");
     3083                push(@implContent, "    return result;\n");
    30633084            }
    30643085
    30653086            push(@implContent, "}\n\n");
    30663087
    3067             push(@implContent, "#endif\n") if $attributeConditionalString;
    3068 
    3069             push(@implContent, "\n");
     3088            push(@implContent, "#endif\n\n") if $attributeConditionalString;
    30703089        }
    30713090
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r206723 r206953  
    141141}
    142142
     143inline JSTestActiveDOMObject* JSTestActiveDOMObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     144{
     145    return jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
     146}
     147
     148static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState*, JSTestActiveDOMObject*, ThrowScope& throwScope);
     149
    143150EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    144151{
    145     VM& vm = state->vm();
    146     auto throwScope = DECLARE_THROW_SCOPE(vm);
     152    return BindingCaller<JSTestActiveDOMObject>::attribute<jsTestActiveDOMObjectExcitingAttrGetter>(state, thisValue, "excitingAttr");
     153}
     154
     155static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState* state, JSTestActiveDOMObject* thisObject, ThrowScope& throwScope)
     156{
    147157    UNUSED_PARAM(throwScope);
    148     UNUSED_PARAM(thisValue);
    149     JSValue decodedThisValue = JSValue::decode(thisValue);
    150     auto* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(decodedThisValue);
    151     if (UNLIKELY(!castedThis)) {
    152         return throwGetterTypeError(*state, throwScope, "TestActiveDOMObject", "excitingAttr");
    153     }
    154     if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))
    155         return JSValue::encode(jsUndefined());
    156     auto& impl = castedThis->wrapped();
     158    UNUSED_PARAM(state);
     159    if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))
     160        return jsUndefined();
     161    auto& impl = thisObject->wrapped();
    157162    JSValue result = jsNumber(impl.excitingAttr());
    158     return JSValue::encode(result);
    159 }
    160 
     163    return result;
     164}
    161165
    162166EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h

    r206723 r206953  
    5050
    5151    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     52    static JSTestActiveDOMObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5253public:
    5354    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r206723 r206953  
    179179}
    180180
     181inline JSTestEventConstructor* JSTestEventConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     182{
     183    return jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(thisValue));
     184}
     185
     186static inline JSValue jsTestEventConstructorAttr1Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
     187
    181188EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
    182189{
    183     VM& vm = state->vm();
    184     auto throwScope = DECLARE_THROW_SCOPE(vm);
     190    return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr1Getter>(state, thisValue, "attr1");
     191}
     192
     193static inline JSValue jsTestEventConstructorAttr1Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
     194{
    185195    UNUSED_PARAM(throwScope);
    186     UNUSED_PARAM(thisValue);
    187     JSValue decodedThisValue = JSValue::decode(thisValue);
    188     auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
    189     if (UNLIKELY(!castedThis)) {
    190         return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr1");
    191     }
    192     auto& impl = castedThis->wrapped();
     196    UNUSED_PARAM(state);
     197    auto& impl = thisObject->wrapped();
    193198    JSValue result = jsStringWithCache(state, impl.attr1());
    194     return JSValue::encode(result);
    195 }
    196 
     199    return result;
     200}
     201
     202static inline JSValue jsTestEventConstructorAttr2Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
    197203
    198204EncodedJSValue jsTestEventConstructorAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
    199205{
    200     VM& vm = state->vm();
    201     auto throwScope = DECLARE_THROW_SCOPE(vm);
     206    return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr2Getter>(state, thisValue, "attr2");
     207}
     208
     209static inline JSValue jsTestEventConstructorAttr2Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
     210{
    202211    UNUSED_PARAM(throwScope);
    203     UNUSED_PARAM(thisValue);
    204     JSValue decodedThisValue = JSValue::decode(thisValue);
    205     auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
    206     if (UNLIKELY(!castedThis)) {
    207         return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr2");
    208     }
    209     auto& impl = castedThis->wrapped();
     212    UNUSED_PARAM(state);
     213    auto& impl = thisObject->wrapped();
    210214    JSValue result = jsStringWithCache(state, impl.attr2());
    211     return JSValue::encode(result);
    212 }
    213 
     215    return result;
     216}
    214217
    215218#if ENABLE(SPECIAL_EVENT)
     219static inline JSValue jsTestEventConstructorAttr3Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
     220
    216221EncodedJSValue jsTestEventConstructorAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
    217222{
    218     VM& vm = state->vm();
    219     auto throwScope = DECLARE_THROW_SCOPE(vm);
     223    return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr3Getter>(state, thisValue, "attr3");
     224}
     225
     226static inline JSValue jsTestEventConstructorAttr3Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
     227{
    220228    UNUSED_PARAM(throwScope);
    221     UNUSED_PARAM(thisValue);
    222     JSValue decodedThisValue = JSValue::decode(thisValue);
    223     auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
    224     if (UNLIKELY(!castedThis)) {
    225         return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr3");
    226     }
    227     auto& impl = castedThis->wrapped();
     229    UNUSED_PARAM(state);
     230    auto& impl = thisObject->wrapped();
    228231    JSValue result = jsStringWithCache(state, impl.attr3());
    229     return JSValue::encode(result);
     232    return result;
    230233}
    231234
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h

    r206723 r206953  
    5252
    5353    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     54    static JSTestEventConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5455protected:
    5556    JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventConstructor>&&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r206723 r206953  
    133133}
    134134
     135inline JSTestException* JSTestException::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     136{
     137    return jsDynamicCast<JSTestException*>(JSValue::decode(thisValue));
     138}
     139
     140static inline JSValue jsTestExceptionNameGetter(ExecState*, JSTestException*, ThrowScope& throwScope);
     141
    135142EncodedJSValue jsTestExceptionName(ExecState* state, EncodedJSValue thisValue, PropertyName)
    136143{
    137     VM& vm = state->vm();
    138     auto throwScope = DECLARE_THROW_SCOPE(vm);
     144    return BindingCaller<JSTestException>::attribute<jsTestExceptionNameGetter>(state, thisValue, "name");
     145}
     146
     147static inline JSValue jsTestExceptionNameGetter(ExecState* state, JSTestException* thisObject, ThrowScope& throwScope)
     148{
    139149    UNUSED_PARAM(throwScope);
    140     UNUSED_PARAM(thisValue);
    141     JSValue decodedThisValue = JSValue::decode(thisValue);
    142     auto* castedThis = jsDynamicCast<JSTestException*>(decodedThisValue);
    143     if (UNLIKELY(!castedThis)) {
    144         return throwGetterTypeError(*state, throwScope, "TestException", "name");
    145     }
    146     auto& impl = castedThis->wrapped();
     150    UNUSED_PARAM(state);
     151    auto& impl = thisObject->wrapped();
    147152    JSValue result = jsStringWithCache(state, impl.name());
    148     return JSValue::encode(result);
    149 }
    150 
     153    return result;
     154}
    151155
    152156EncodedJSValue jsTestExceptionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h

    r206723 r206953  
    5151
    5252    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     53    static JSTestException* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5354public:
    5455    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp

    r206723 r206953  
    178178}
    179179
     180inline JSTestGlobalObject* JSTestGlobalObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     181{
     182    return jsDynamicCast<JSTestGlobalObject*>(JSValue::decode(thisValue));
     183}
     184
     185static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
     186
    180187EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    181188{
    182     VM& vm = state->vm();
    183     auto throwScope = DECLARE_THROW_SCOPE(vm);
    184     UNUSED_PARAM(throwScope);
    185     UNUSED_PARAM(thisValue);
    186     JSValue decodedThisValue = JSValue::decode(thisValue);
    187     auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
    188     if (UNLIKELY(!castedThis)) {
    189         return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "regularAttribute");
    190     }
    191     auto& impl = castedThis->wrapped();
     189    return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectRegularAttributeGetter>(state, thisValue, "regularAttribute");
     190}
     191
     192static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
     193{
     194    UNUSED_PARAM(throwScope);
     195    UNUSED_PARAM(state);
     196    auto& impl = thisObject->wrapped();
    192197    JSValue result = jsStringWithCache(state, impl.regularAttribute());
    193     return JSValue::encode(result);
    194 }
    195 
     198    return result;
     199}
     200
     201static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
    196202
    197203EncodedJSValue jsTestGlobalObjectPublicAndPrivateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    198204{
    199     VM& vm = state->vm();
    200     auto throwScope = DECLARE_THROW_SCOPE(vm);
    201     UNUSED_PARAM(throwScope);
    202     UNUSED_PARAM(thisValue);
    203     JSValue decodedThisValue = JSValue::decode(thisValue);
    204     auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
    205     if (UNLIKELY(!castedThis)) {
    206         return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateAttribute");
    207     }
    208     auto& impl = castedThis->wrapped();
     205    return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectPublicAndPrivateAttributeGetter>(state, thisValue, "publicAndPrivateAttribute");
     206}
     207
     208static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
     209{
     210    UNUSED_PARAM(throwScope);
     211    UNUSED_PARAM(state);
     212    auto& impl = thisObject->wrapped();
    209213    JSValue result = jsStringWithCache(state, impl.publicAndPrivateAttribute());
    210     return JSValue::encode(result);
    211 }
    212 
    213 
    214 #if ENABLE(TEST_FEATURE)
     214    return result;
     215}
     216
     217#if ENABLE(TEST_FEATURE)
     218static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
     219
    215220EncodedJSValue jsTestGlobalObjectPublicAndPrivateConditionalAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    216221{
    217     VM& vm = state->vm();
    218     auto throwScope = DECLARE_THROW_SCOPE(vm);
    219     UNUSED_PARAM(throwScope);
    220     UNUSED_PARAM(thisValue);
    221     JSValue decodedThisValue = JSValue::decode(thisValue);
    222     auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
    223     if (UNLIKELY(!castedThis)) {
    224         return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateConditionalAttribute");
    225     }
    226     auto& impl = castedThis->wrapped();
     222    return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter>(state, thisValue, "publicAndPrivateConditionalAttribute");
     223}
     224
     225static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
     226{
     227    UNUSED_PARAM(throwScope);
     228    UNUSED_PARAM(state);
     229    auto& impl = thisObject->wrapped();
    227230    JSValue result = jsStringWithCache(state, impl.publicAndPrivateConditionalAttribute());
    228     return JSValue::encode(result);
    229 }
    230 
    231 #endif
    232 
    233 #if ENABLE(TEST_FEATURE)
     231    return result;
     232}
     233
     234#endif
     235
     236#if ENABLE(TEST_FEATURE)
     237static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
     238
    234239EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    235240{
    236     VM& vm = state->vm();
    237     auto throwScope = DECLARE_THROW_SCOPE(vm);
    238     UNUSED_PARAM(throwScope);
    239     UNUSED_PARAM(thisValue);
    240     JSValue decodedThisValue = JSValue::decode(thisValue);
    241     auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
    242     if (UNLIKELY(!castedThis)) {
    243         return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeAttribute");
    244     }
    245     auto& impl = castedThis->wrapped();
     241    return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectEnabledAtRuntimeAttributeGetter>(state, thisValue, "enabledAtRuntimeAttribute");
     242}
     243
     244static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
     245{
     246    UNUSED_PARAM(throwScope);
     247    UNUSED_PARAM(state);
     248    auto& impl = thisObject->wrapped();
    246249    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
    247     return JSValue::encode(result);
     250    return result;
    248251}
    249252
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h

    r206723 r206953  
    5252
    5353    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     54    static JSTestGlobalObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5455public:
    5556    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r206723 r206953  
    411411}
    412412
    413 #if ENABLE(Condition22) || ENABLE(Condition23)
    414 EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    415 {
    416     VM& vm = state->vm();
    417     auto throwScope = DECLARE_THROW_SCOPE(vm);
    418     UNUSED_PARAM(throwScope);
    419     UNUSED_PARAM(thisValue);
     413inline JSTestInterface* JSTestInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     414{
     415    return jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     416}
     417
     418#if ENABLE(Condition22) || ENABLE(Condition23)
     419static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState*);
     420
     421EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue, PropertyName)
     422{
     423    return JSValue::encode(jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(state));
     424}
     425
     426static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState* state)
     427{
     428    UNUSED_PARAM(state);
    420429    JSValue result = jsNumber(TestInterface::implementsStaticReadOnlyAttr());
    421     return JSValue::encode(result);
    422 }
    423 
    424 #endif
    425 
    426 #if ENABLE(Condition22) || ENABLE(Condition23)
    427 EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    428 {
    429     VM& vm = state->vm();
    430     auto throwScope = DECLARE_THROW_SCOPE(vm);
    431     UNUSED_PARAM(throwScope);
    432     UNUSED_PARAM(thisValue);
     430    return result;
     431}
     432
     433#endif
     434
     435#if ENABLE(Condition22) || ENABLE(Condition23)
     436static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState*);
     437
     438EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue, PropertyName)
     439{
     440    return JSValue::encode(jsTestInterfaceConstructorImplementsStaticAttrGetter(state));
     441}
     442
     443static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState* state)
     444{
     445    UNUSED_PARAM(state);
    433446    JSValue result = jsStringWithCache(state, TestInterface::implementsStaticAttr());
    434     return JSValue::encode(result);
    435 }
    436 
    437 #endif
    438 
    439 #if ENABLE(Condition22) || ENABLE(Condition23)
     447    return result;
     448}
     449
     450#endif
     451
     452#if ENABLE(Condition22) || ENABLE(Condition23)
     453static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     454
    440455EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
    441456{
    442     VM& vm = state->vm();
    443     auto throwScope = DECLARE_THROW_SCOPE(vm);
    444     UNUSED_PARAM(throwScope);
    445     UNUSED_PARAM(thisValue);
    446     JSValue decodedThisValue = JSValue::decode(thisValue);
    447     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    448     if (UNLIKELY(!castedThis)) {
    449         return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr1");
    450     }
    451     auto& impl = castedThis->wrapped();
     457    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr1Getter>(state, thisValue, "implementsStr1");
     458}
     459
     460static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     461{
     462    UNUSED_PARAM(throwScope);
     463    UNUSED_PARAM(state);
     464    auto& impl = thisObject->wrapped();
    452465    JSValue result = jsStringWithCache(state, impl.implementsStr1());
    453     return JSValue::encode(result);
    454 }
    455 
    456 #endif
    457 
    458 #if ENABLE(Condition22) || ENABLE(Condition23)
     466    return result;
     467}
     468
     469#endif
     470
     471#if ENABLE(Condition22) || ENABLE(Condition23)
     472static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     473
    459474EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
    460475{
    461     VM& vm = state->vm();
    462     auto throwScope = DECLARE_THROW_SCOPE(vm);
    463     UNUSED_PARAM(throwScope);
    464     UNUSED_PARAM(thisValue);
    465     JSValue decodedThisValue = JSValue::decode(thisValue);
    466     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    467     if (UNLIKELY(!castedThis)) {
    468         return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr2");
    469     }
    470     auto& impl = castedThis->wrapped();
     476    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr2Getter>(state, thisValue, "implementsStr2");
     477}
     478
     479static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     480{
     481    UNUSED_PARAM(throwScope);
     482    UNUSED_PARAM(state);
     483    auto& impl = thisObject->wrapped();
    471484    JSValue result = jsStringWithCache(state, impl.implementsStr2());
    472     return JSValue::encode(result);
    473 }
    474 
    475 #endif
    476 
    477 #if ENABLE(Condition22) || ENABLE(Condition23)
     485    return result;
     486}
     487
     488#endif
     489
     490#if ENABLE(Condition22) || ENABLE(Condition23)
     491static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     492
    478493EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
    479494{
    480     VM& vm = state->vm();
    481     auto throwScope = DECLARE_THROW_SCOPE(vm);
    482     UNUSED_PARAM(throwScope);
    483     UNUSED_PARAM(thisValue);
    484     JSValue decodedThisValue = JSValue::decode(thisValue);
    485     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    486     if (UNLIKELY(!castedThis)) {
    487         return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr3");
    488     }
    489     return JSValue::encode(castedThis->implementsStr3(*state));
    490 }
    491 
    492 #endif
    493 
    494 #if ENABLE(Condition22) || ENABLE(Condition23)
     495    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr3Getter>(state, thisValue, "implementsStr3");
     496}
     497
     498static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     499{
     500    UNUSED_PARAM(throwScope);
     501    UNUSED_PARAM(state);
     502    return thisObject->implementsStr3(*state);
     503}
     504
     505#endif
     506
     507#if ENABLE(Condition22) || ENABLE(Condition23)
     508static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     509
    495510EncodedJSValue jsTestInterfaceImplementsNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
    496511{
    497     VM& vm = state->vm();
    498     auto throwScope = DECLARE_THROW_SCOPE(vm);
    499     UNUSED_PARAM(throwScope);
    500     UNUSED_PARAM(thisValue);
    501     JSValue decodedThisValue = JSValue::decode(thisValue);
    502     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    503     if (UNLIKELY(!castedThis)) {
    504         return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsNode");
    505     }
    506     auto& impl = castedThis->wrapped();
    507     JSValue result = toJS(state, castedThis->globalObject(), impl.implementsNode());
    508     return JSValue::encode(result);
    509 }
    510 
    511 #endif
    512 
    513 #if ENABLE(Condition11) || ENABLE(Condition12)
    514 EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    515 {
    516     VM& vm = state->vm();
    517     auto throwScope = DECLARE_THROW_SCOPE(vm);
    518     UNUSED_PARAM(throwScope);
    519     UNUSED_PARAM(thisValue);
     512    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsNodeGetter>(state, thisValue, "implementsNode");
     513}
     514
     515static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     516{
     517    UNUSED_PARAM(throwScope);
     518    UNUSED_PARAM(state);
     519    auto& impl = thisObject->wrapped();
     520    JSValue result = toJS(state, thisObject->globalObject(), impl.implementsNode());
     521    return result;
     522}
     523
     524#endif
     525
     526#if ENABLE(Condition11) || ENABLE(Condition12)
     527static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState*);
     528
     529EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue, PropertyName)
     530{
     531    return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(state));
     532}
     533
     534static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState* state)
     535{
     536    UNUSED_PARAM(state);
    520537    JSValue result = jsNumber(WebCore::TestSupplemental::supplementalStaticReadOnlyAttr());
    521     return JSValue::encode(result);
    522 }
    523 
    524 #endif
    525 
    526 #if ENABLE(Condition11) || ENABLE(Condition12)
    527 EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    528 {
    529     VM& vm = state->vm();
    530     auto throwScope = DECLARE_THROW_SCOPE(vm);
    531     UNUSED_PARAM(throwScope);
    532     UNUSED_PARAM(thisValue);
     538    return result;
     539}
     540
     541#endif
     542
     543#if ENABLE(Condition11) || ENABLE(Condition12)
     544static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState*);
     545
     546EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue, PropertyName)
     547{
     548    return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticAttrGetter(state));
     549}
     550
     551static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState* state)
     552{
     553    UNUSED_PARAM(state);
    533554    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStaticAttr());
    534     return JSValue::encode(result);
    535 }
    536 
    537 #endif
    538 
    539 #if ENABLE(Condition11) || ENABLE(Condition12)
     555    return result;
     556}
     557
     558#endif
     559
     560#if ENABLE(Condition11) || ENABLE(Condition12)
     561static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     562
    540563EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
    541564{
    542     VM& vm = state->vm();
    543     auto throwScope = DECLARE_THROW_SCOPE(vm);
    544     UNUSED_PARAM(throwScope);
    545     UNUSED_PARAM(thisValue);
    546     JSValue decodedThisValue = JSValue::decode(thisValue);
    547     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    548     if (UNLIKELY(!castedThis)) {
    549         return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr1");
    550     }
    551     auto& impl = castedThis->wrapped();
     565    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr1Getter>(state, thisValue, "supplementalStr1");
     566}
     567
     568static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     569{
     570    UNUSED_PARAM(throwScope);
     571    UNUSED_PARAM(state);
     572    auto& impl = thisObject->wrapped();
    552573    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(impl));
    553     return JSValue::encode(result);
    554 }
    555 
    556 #endif
    557 
    558 #if ENABLE(Condition11) || ENABLE(Condition12)
     574    return result;
     575}
     576
     577#endif
     578
     579#if ENABLE(Condition11) || ENABLE(Condition12)
     580static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     581
    559582EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
    560583{
    561     VM& vm = state->vm();
    562     auto throwScope = DECLARE_THROW_SCOPE(vm);
    563     UNUSED_PARAM(throwScope);
    564     UNUSED_PARAM(thisValue);
    565     JSValue decodedThisValue = JSValue::decode(thisValue);
    566     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    567     if (UNLIKELY(!castedThis)) {
    568         return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr2");
    569     }
    570     auto& impl = castedThis->wrapped();
     584    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr2Getter>(state, thisValue, "supplementalStr2");
     585}
     586
     587static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     588{
     589    UNUSED_PARAM(throwScope);
     590    UNUSED_PARAM(state);
     591    auto& impl = thisObject->wrapped();
    571592    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(impl));
    572     return JSValue::encode(result);
    573 }
    574 
    575 #endif
    576 
    577 #if ENABLE(Condition11) || ENABLE(Condition12)
     593    return result;
     594}
     595
     596#endif
     597
     598#if ENABLE(Condition11) || ENABLE(Condition12)
     599static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     600
    578601EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
    579602{
    580     VM& vm = state->vm();
    581     auto throwScope = DECLARE_THROW_SCOPE(vm);
    582     UNUSED_PARAM(throwScope);
    583     UNUSED_PARAM(thisValue);
    584     JSValue decodedThisValue = JSValue::decode(thisValue);
    585     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    586     if (UNLIKELY(!castedThis)) {
    587         return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr3");
    588     }
    589     return JSValue::encode(castedThis->supplementalStr3(*state));
    590 }
    591 
    592 #endif
    593 
    594 #if ENABLE(Condition11) || ENABLE(Condition12)
     603    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr3Getter>(state, thisValue, "supplementalStr3");
     604}
     605
     606static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     607{
     608    UNUSED_PARAM(throwScope);
     609    UNUSED_PARAM(state);
     610    return thisObject->supplementalStr3(*state);
     611}
     612
     613#endif
     614
     615#if ENABLE(Condition11) || ENABLE(Condition12)
     616static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
     617
    595618EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
    596619{
    597     VM& vm = state->vm();
    598     auto throwScope = DECLARE_THROW_SCOPE(vm);
    599     UNUSED_PARAM(throwScope);
    600     UNUSED_PARAM(thisValue);
    601     JSValue decodedThisValue = JSValue::decode(thisValue);
    602     auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
    603     if (UNLIKELY(!castedThis)) {
    604         return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalNode");
    605     }
    606     auto& impl = castedThis->wrapped();
    607     JSValue result = toJS(state, castedThis->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
    608     return JSValue::encode(result);
     620    return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalNodeGetter>(state, thisValue, "supplementalNode");
     621}
     622
     623static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
     624{
     625    UNUSED_PARAM(throwScope);
     626    UNUSED_PARAM(state);
     627    auto& impl = thisObject->wrapped();
     628    JSValue result = toJS(state, thisObject->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
     629    return result;
    609630}
    610631
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r206723 r206953  
    5555
    5656    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     57    static JSTestInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5758
    5859    // Custom attributes
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp

    r206723 r206953  
    133133}
    134134
     135inline JSTestJSBuiltinConstructor* JSTestJSBuiltinConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     136{
     137    return jsDynamicCast<JSTestJSBuiltinConstructor*>(JSValue::decode(thisValue));
     138}
     139
     140static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
     141
    135142EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
    136143{
    137     VM& vm = state->vm();
    138     auto throwScope = DECLARE_THROW_SCOPE(vm);
    139     UNUSED_PARAM(throwScope);
    140     UNUSED_PARAM(thisValue);
    141     JSValue decodedThisValue = JSValue::decode(thisValue);
    142     auto* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(decodedThisValue);
    143     if (UNLIKELY(!castedThis)) {
    144         return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeCustom");
    145     }
    146     return JSValue::encode(castedThis->testAttributeCustom(*state));
    147 }
    148 
     144    return BindingCaller<JSTestJSBuiltinConstructor>::attribute<jsTestJSBuiltinConstructorTestAttributeCustomGetter>(state, thisValue, "testAttributeCustom");
     145}
     146
     147static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
     148{
     149    UNUSED_PARAM(throwScope);
     150    UNUSED_PARAM(state);
     151    return thisObject->testAttributeCustom(*state);
     152}
     153
     154static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
    149155
    150156EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
    151157{
    152     VM& vm = state->vm();
    153     auto throwScope = DECLARE_THROW_SCOPE(vm);
    154     UNUSED_PARAM(throwScope);
    155     UNUSED_PARAM(thisValue);
    156     JSValue decodedThisValue = JSValue::decode(thisValue);
    157     auto* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(decodedThisValue);
    158     if (UNLIKELY(!castedThis)) {
    159         return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeRWCustom");
    160     }
    161     return JSValue::encode(castedThis->testAttributeRWCustom(*state));
    162 }
    163 
     158    return BindingCaller<JSTestJSBuiltinConstructor>::attribute<jsTestJSBuiltinConstructorTestAttributeRWCustomGetter>(state, thisValue, "testAttributeRWCustom");
     159}
     160
     161static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
     162{
     163    UNUSED_PARAM(throwScope);
     164    UNUSED_PARAM(state);
     165    return thisObject->testAttributeRWCustom(*state);
     166}
    164167
    165168EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h

    r206723 r206953  
    4747
    4848    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     49    static JSTestJSBuiltinConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    4950    static void visitChildren(JSCell*, JSC::SlotVisitor&);
    5051
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r206723 r206953  
    169169}
    170170
     171inline JSTestNode* JSTestNode::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     172{
     173    return jsDynamicCast<JSTestNode*>(JSValue::decode(thisValue));
     174}
     175
     176static inline JSValue jsTestNodeNameGetter(ExecState*, JSTestNode*, ThrowScope& throwScope);
     177
    171178EncodedJSValue jsTestNodeName(ExecState* state, EncodedJSValue thisValue, PropertyName)
    172179{
    173     VM& vm = state->vm();
    174     auto throwScope = DECLARE_THROW_SCOPE(vm);
     180    return BindingCaller<JSTestNode>::attribute<jsTestNodeNameGetter>(state, thisValue, "name");
     181}
     182
     183static inline JSValue jsTestNodeNameGetter(ExecState* state, JSTestNode* thisObject, ThrowScope& throwScope)
     184{
    175185    UNUSED_PARAM(throwScope);
    176     UNUSED_PARAM(thisValue);
    177     JSValue decodedThisValue = JSValue::decode(thisValue);
    178     auto* castedThis = jsDynamicCast<JSTestNode*>(decodedThisValue);
    179     if (UNLIKELY(!castedThis)) {
    180         return throwGetterTypeError(*state, throwScope, "TestNode", "name");
    181     }
    182     auto& impl = castedThis->wrapped();
     186    UNUSED_PARAM(state);
     187    auto& impl = thisObject->wrapped();
    183188    JSValue result = jsStringWithCache(state, impl.name());
    184     return JSValue::encode(result);
    185 }
    186 
     189    return result;
     190}
    187191
    188192EncodedJSValue jsTestNodeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h

    r206723 r206953  
    4848
    4949    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     50    static JSTestNode* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5051    static void visitChildren(JSCell*, JSC::SlotVisitor&);
    5152
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r206723 r206953  
    144144}
    145145
     146inline JSTestNondeterministic* JSTestNondeterministic::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     147{
     148    return jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
     149}
     150
     151static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
     152
    146153EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    147154{
    148     VM& vm = state->vm();
    149     auto throwScope = DECLARE_THROW_SCOPE(vm);
    150     UNUSED_PARAM(throwScope);
    151     UNUSED_PARAM(thisValue);
    152     JSValue decodedThisValue = JSValue::decode(thisValue);
    153     auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
    154     if (UNLIKELY(!castedThis)) {
    155         return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicReadonlyAttr");
    156     }
     155    return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicReadonlyAttrGetter>(state, thisValue, "nondeterministicReadonlyAttr");
     156}
     157
     158static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
     159{
     160    UNUSED_PARAM(throwScope);
     161    UNUSED_PARAM(state);
    157162#if ENABLE(WEB_REPLAY)
    158163    JSGlobalObject* globalObject = state->lexicalGlobalObject();
     
    160165    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicReadonlyAttr", AtomicString::ConstructFromLiteral);
    161166    if (cursor.isCapturing()) {
    162         int32_t memoizedResult = castedThis->wrapped().nondeterministicReadonlyAttr();
     167        int32_t memoizedResult = thisObject->wrapped().nondeterministicReadonlyAttr();
    163168        cursor.appendInput<MemoizedDOMResult<int32_t>>(bindingName.get().string(), memoizedResult, 0);
    164169        JSValue result = jsNumber(memoizedResult);
    165         return JSValue::encode(result);
     170        return result;
    166171    }
    167172
     
    171176        if (input && input->convertTo<int32_t>(memoizedResult)) {
    172177            JSValue result = jsNumber(memoizedResult);
    173             return JSValue::encode(result);
     178            return result;
    174179        }
    175180    }
    176181#endif
    177     auto& impl = castedThis->wrapped();
     182    auto& impl = thisObject->wrapped();
    178183    JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
    179     return JSValue::encode(result);
    180 }
    181 
     184    return result;
     185}
     186
     187static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
    182188
    183189EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    184190{
    185     VM& vm = state->vm();
    186     auto throwScope = DECLARE_THROW_SCOPE(vm);
    187     UNUSED_PARAM(throwScope);
    188     UNUSED_PARAM(thisValue);
    189     JSValue decodedThisValue = JSValue::decode(thisValue);
    190     auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
    191     if (UNLIKELY(!castedThis)) {
    192         return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicWriteableAttr");
    193     }
     191    return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicWriteableAttrGetter>(state, thisValue, "nondeterministicWriteableAttr");
     192}
     193
     194static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
     195{
     196    UNUSED_PARAM(throwScope);
     197    UNUSED_PARAM(state);
    194198#if ENABLE(WEB_REPLAY)
    195199    JSGlobalObject* globalObject = state->lexicalGlobalObject();
     
    197201    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicWriteableAttr", AtomicString::ConstructFromLiteral);
    198202    if (cursor.isCapturing()) {
    199         String memoizedResult = castedThis->wrapped().nondeterministicWriteableAttr();
     203        String memoizedResult = thisObject->wrapped().nondeterministicWriteableAttr();
    200204        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
    201205        JSValue result = jsStringWithCache(state, memoizedResult);
    202         return JSValue::encode(result);
     206        return result;
    203207    }
    204208
     
    208212        if (input && input->convertTo<String>(memoizedResult)) {
    209213            JSValue result = jsStringWithCache(state, memoizedResult);
    210             return JSValue::encode(result);
     214            return result;
    211215        }
    212216    }
    213217#endif
    214     auto& impl = castedThis->wrapped();
     218    auto& impl = thisObject->wrapped();
    215219    JSValue result = jsStringWithCache(state, impl.nondeterministicWriteableAttr());
    216     return JSValue::encode(result);
    217 }
    218 
     220    return result;
     221}
     222
     223static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
    219224
    220225EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    221226{
    222     VM& vm = state->vm();
    223     auto throwScope = DECLARE_THROW_SCOPE(vm);
    224     UNUSED_PARAM(throwScope);
    225     UNUSED_PARAM(thisValue);
    226     JSValue decodedThisValue = JSValue::decode(thisValue);
    227     auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
    228     if (UNLIKELY(!castedThis)) {
    229         return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicExceptionAttr");
    230     }
     227    return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicExceptionAttrGetter>(state, thisValue, "nondeterministicExceptionAttr");
     228}
     229
     230static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
     231{
     232    UNUSED_PARAM(throwScope);
     233    UNUSED_PARAM(state);
    231234#if ENABLE(WEB_REPLAY)
    232235    JSGlobalObject* globalObject = state->lexicalGlobalObject();
     
    234237    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicExceptionAttr", AtomicString::ConstructFromLiteral);
    235238    if (cursor.isCapturing()) {
    236         String memoizedResult = castedThis->wrapped().nondeterministicExceptionAttr();
     239        String memoizedResult = thisObject->wrapped().nondeterministicExceptionAttr();
    237240        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
    238241        JSValue result = jsStringWithCache(state, memoizedResult);
    239         return JSValue::encode(result);
     242        return result;
    240243    }
    241244
     
    245248        if (input && input->convertTo<String>(memoizedResult)) {
    246249            JSValue result = jsStringWithCache(state, memoizedResult);
    247             return JSValue::encode(result);
     250            return result;
    248251        }
    249252    }
    250253#endif
    251     auto& impl = castedThis->wrapped();
     254    auto& impl = thisObject->wrapped();
    252255    JSValue result = jsStringWithCache(state, impl.nondeterministicExceptionAttr());
    253     return JSValue::encode(result);
    254 }
    255 
     256    return result;
     257}
     258
     259static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
    256260
    257261EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    258262{
    259     VM& vm = state->vm();
    260     auto throwScope = DECLARE_THROW_SCOPE(vm);
    261     UNUSED_PARAM(throwScope);
    262     UNUSED_PARAM(thisValue);
    263     JSValue decodedThisValue = JSValue::decode(thisValue);
    264     auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
    265     if (UNLIKELY(!castedThis)) {
    266         return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
    267     }
     263    return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicGetterExceptionAttrGetter>(state, thisValue, "nondeterministicGetterExceptionAttr");
     264}
     265
     266static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
     267{
     268    UNUSED_PARAM(throwScope);
     269    UNUSED_PARAM(state);
    268270    ExceptionCode ec = 0;
    269271#if ENABLE(WEB_REPLAY)
     
    272274    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicGetterExceptionAttr", AtomicString::ConstructFromLiteral);
    273275    if (cursor.isCapturing()) {
    274         String memoizedResult = castedThis->wrapped().nondeterministicGetterExceptionAttr(ec);
     276        String memoizedResult = thisObject->wrapped().nondeterministicGetterExceptionAttr(ec);
    275277        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, ec);
    276278        JSValue result = jsStringWithCache(state, memoizedResult);
    277279        setDOMException(state, throwScope, ec);
    278         return JSValue::encode(result);
     280        return result;
    279281    }
    280282
     
    285287            JSValue result = jsStringWithCache(state, memoizedResult);
    286288            setDOMException(state, throwScope, input->exceptionCode());
    287             return JSValue::encode(result);
     289            return result;
    288290        }
    289291    }
    290292#endif
    291     auto& impl = castedThis->wrapped();
     293    auto& impl = thisObject->wrapped();
    292294    JSValue result = jsStringWithCache(state, impl.nondeterministicGetterExceptionAttr(ec));
    293295    setDOMException(state, throwScope, ec);
    294     return JSValue::encode(result);
    295 }
    296 
     296    return result;
     297}
     298
     299static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
    297300
    298301EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    299302{
    300     VM& vm = state->vm();
    301     auto throwScope = DECLARE_THROW_SCOPE(vm);
    302     UNUSED_PARAM(throwScope);
    303     UNUSED_PARAM(thisValue);
    304     JSValue decodedThisValue = JSValue::decode(thisValue);
    305     auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
    306     if (UNLIKELY(!castedThis)) {
    307         return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
    308     }
     303    return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicSetterExceptionAttrGetter>(state, thisValue, "nondeterministicSetterExceptionAttr");
     304}
     305
     306static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
     307{
     308    UNUSED_PARAM(throwScope);
     309    UNUSED_PARAM(state);
    309310#if ENABLE(WEB_REPLAY)
    310311    JSGlobalObject* globalObject = state->lexicalGlobalObject();
     
    312313    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicSetterExceptionAttr", AtomicString::ConstructFromLiteral);
    313314    if (cursor.isCapturing()) {
    314         String memoizedResult = castedThis->wrapped().nondeterministicSetterExceptionAttr();
     315        String memoizedResult = thisObject->wrapped().nondeterministicSetterExceptionAttr();
    315316        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
    316317        JSValue result = jsStringWithCache(state, memoizedResult);
    317         return JSValue::encode(result);
     318        return result;
    318319    }
    319320
     
    323324        if (input && input->convertTo<String>(memoizedResult)) {
    324325            JSValue result = jsStringWithCache(state, memoizedResult);
    325             return JSValue::encode(result);
     326            return result;
    326327        }
    327328    }
    328329#endif
    329     auto& impl = castedThis->wrapped();
     330    auto& impl = thisObject->wrapped();
    330331    JSValue result = jsStringWithCache(state, impl.nondeterministicSetterExceptionAttr());
    331     return JSValue::encode(result);
    332 }
    333 
     332    return result;
     333}
    334334
    335335EncodedJSValue jsTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h

    r206723 r206953  
    5050
    5151    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     52    static JSTestNondeterministic* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5253protected:
    5354    JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNondeterministic>&&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r206877 r206953  
    17121712}
    17131713
     1714inline JSTestObj* JSTestObj::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     1715{
     1716    return jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1717}
     1718
     1719static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     1720
    17141721EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    17151722{
    1716     VM& vm = state->vm();
    1717     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1718     UNUSED_PARAM(throwScope);
    1719     UNUSED_PARAM(thisValue);
    1720     JSValue decodedThisValue = JSValue::decode(thisValue);
    1721     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1722     if (UNLIKELY(!castedThis)) {
    1723         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyLongAttr");
    1724     }
    1725     auto& impl = castedThis->wrapped();
     1723    return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyLongAttrGetter>(state, thisValue, "readOnlyLongAttr");
     1724}
     1725
     1726static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1727{
     1728    UNUSED_PARAM(throwScope);
     1729    UNUSED_PARAM(state);
     1730    auto& impl = thisObject->wrapped();
    17261731    JSValue result = jsNumber(impl.readOnlyLongAttr());
    1727     return JSValue::encode(result);
    1728 }
    1729 
     1732    return result;
     1733}
     1734
     1735static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    17301736
    17311737EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    17321738{
    1733     VM& vm = state->vm();
    1734     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1735     UNUSED_PARAM(throwScope);
    1736     UNUSED_PARAM(thisValue);
    1737     JSValue decodedThisValue = JSValue::decode(thisValue);
    1738     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1739     if (UNLIKELY(!castedThis)) {
    1740         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyStringAttr");
    1741     }
    1742     auto& impl = castedThis->wrapped();
     1739    return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyStringAttrGetter>(state, thisValue, "readOnlyStringAttr");
     1740}
     1741
     1742static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1743{
     1744    UNUSED_PARAM(throwScope);
     1745    UNUSED_PARAM(state);
     1746    auto& impl = thisObject->wrapped();
    17431747    JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
    1744     return JSValue::encode(result);
    1745 }
    1746 
     1748    return result;
     1749}
     1750
     1751static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    17471752
    17481753EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    17491754{
    1750     VM& vm = state->vm();
    1751     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1752     UNUSED_PARAM(throwScope);
    1753     UNUSED_PARAM(thisValue);
    1754     JSValue decodedThisValue = JSValue::decode(thisValue);
    1755     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1756     if (UNLIKELY(!castedThis)) {
    1757         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyTestObjAttr");
    1758     }
    1759     auto& impl = castedThis->wrapped();
    1760     JSValue result = toJS(state, castedThis->globalObject(), impl.readOnlyTestObjAttr());
    1761     return JSValue::encode(result);
    1762 }
    1763 
    1764 
    1765 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    1766 {
    1767     VM& vm = state->vm();
    1768     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1769     UNUSED_PARAM(throwScope);
    1770     UNUSED_PARAM(thisValue);
     1755    return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyTestObjAttrGetter>(state, thisValue, "readOnlyTestObjAttr");
     1756}
     1757
     1758static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1759{
     1760    UNUSED_PARAM(throwScope);
     1761    UNUSED_PARAM(state);
     1762    auto& impl = thisObject->wrapped();
     1763    JSValue result = toJS(state, thisObject->globalObject(), impl.readOnlyTestObjAttr());
     1764    return result;
     1765}
     1766
     1767static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState*);
     1768
     1769EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue, PropertyName)
     1770{
     1771    return JSValue::encode(jsTestObjConstructorStaticReadOnlyLongAttrGetter(state));
     1772}
     1773
     1774static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState* state)
     1775{
     1776    UNUSED_PARAM(state);
    17711777    JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
    1772     return JSValue::encode(result);
    1773 }
    1774 
    1775 
    1776 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    1777 {
    1778     VM& vm = state->vm();
    1779     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1780     UNUSED_PARAM(throwScope);
    1781     UNUSED_PARAM(thisValue);
     1778    return result;
     1779}
     1780
     1781static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState*);
     1782
     1783EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue, PropertyName)
     1784{
     1785    return JSValue::encode(jsTestObjConstructorStaticStringAttrGetter(state));
     1786}
     1787
     1788static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState* state)
     1789{
     1790    UNUSED_PARAM(state);
    17821791    JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
    1783     return JSValue::encode(result);
    1784 }
    1785 
     1792    return result;
     1793}
     1794
     1795static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    17861796
    17871797EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
    17881798{
    1789     VM& vm = state->vm();
    1790     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1791     UNUSED_PARAM(throwScope);
    1792     UNUSED_PARAM(thisValue);
    1793     JSValue decodedThisValue = JSValue::decode(thisValue);
    1794     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1795     if (UNLIKELY(!castedThis)) {
    1796         return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObj");
    1797     }
    1798     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
    1799 }
    1800 
     1799    return BindingCaller<JSTestObj>::attribute<jsTestObjConstructorTestSubObjGetter>(state, thisValue, "TestSubObj");
     1800}
     1801
     1802static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1803{
     1804    UNUSED_PARAM(throwScope);
     1805    UNUSED_PARAM(state);
     1806    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
     1807}
     1808
     1809static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18011810
    18021811EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18031812{
    1804     VM& vm = state->vm();
    1805     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1806     UNUSED_PARAM(throwScope);
    1807     UNUSED_PARAM(thisValue);
    1808     JSValue decodedThisValue = JSValue::decode(thisValue);
    1809     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1810     if (UNLIKELY(!castedThis)) {
    1811         return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
    1812     }
    1813     if (UNLIKELY(!castedThis->wrapped().frame()))
    1814         return JSValue::encode(jsUndefined());
    1815     Settings& settings = castedThis->wrapped().frame()->settings();
     1813    return BindingCaller<JSTestObj>::attribute<jsTestObjTestSubObjEnabledBySettingConstructorGetter>(state, thisValue, "TestSubObjEnabledBySetting");
     1814}
     1815
     1816static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1817{
     1818    UNUSED_PARAM(throwScope);
     1819    UNUSED_PARAM(state);
     1820    if (UNLIKELY(!thisObject->wrapped().frame()))
     1821        return jsUndefined();
     1822    Settings& settings = thisObject->wrapped().frame()->settings();
    18161823    if (!settings.testSettingEnabled())
    1817         return JSValue::encode(jsUndefined());
    1818     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
    1819 }
    1820 
     1824        return jsUndefined();
     1825    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
     1826}
     1827
     1828static inline JSValue jsTestObjEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18211829
    18221830EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18231831{
    1824     VM& vm = state->vm();
    1825     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1826     UNUSED_PARAM(throwScope);
    1827     UNUSED_PARAM(thisValue);
    1828     JSValue decodedThisValue = JSValue::decode(thisValue);
    1829     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1830     if (UNLIKELY(!castedThis)) {
    1831         return throwGetterTypeError(*state, throwScope, "TestObject", "enumAttr");
    1832     }
    1833     auto& impl = castedThis->wrapped();
     1832    return BindingCaller<JSTestObj>::attribute<jsTestObjEnumAttrGetter>(state, thisValue, "enumAttr");
     1833}
     1834
     1835static inline JSValue jsTestObjEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1836{
     1837    UNUSED_PARAM(throwScope);
     1838    UNUSED_PARAM(state);
     1839    auto& impl = thisObject->wrapped();
    18341840    JSValue result = jsStringWithCache(state, impl.enumAttr());
    1835     return JSValue::encode(result);
    1836 }
    1837 
     1841    return result;
     1842}
     1843
     1844static inline JSValue jsTestObjByteAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18381845
    18391846EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18401847{
    1841     VM& vm = state->vm();
    1842     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1843     UNUSED_PARAM(throwScope);
    1844     UNUSED_PARAM(thisValue);
    1845     JSValue decodedThisValue = JSValue::decode(thisValue);
    1846     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1847     if (UNLIKELY(!castedThis)) {
    1848         return throwGetterTypeError(*state, throwScope, "TestObject", "byteAttr");
    1849     }
    1850     auto& impl = castedThis->wrapped();
     1848    return BindingCaller<JSTestObj>::attribute<jsTestObjByteAttrGetter>(state, thisValue, "byteAttr");
     1849}
     1850
     1851static inline JSValue jsTestObjByteAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1852{
     1853    UNUSED_PARAM(throwScope);
     1854    UNUSED_PARAM(state);
     1855    auto& impl = thisObject->wrapped();
    18511856    JSValue result = jsNumber(impl.byteAttr());
    1852     return JSValue::encode(result);
    1853 }
    1854 
     1857    return result;
     1858}
     1859
     1860static inline JSValue jsTestObjOctetAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18551861
    18561862EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18571863{
    1858     VM& vm = state->vm();
    1859     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1860     UNUSED_PARAM(throwScope);
    1861     UNUSED_PARAM(thisValue);
    1862     JSValue decodedThisValue = JSValue::decode(thisValue);
    1863     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1864     if (UNLIKELY(!castedThis)) {
    1865         return throwGetterTypeError(*state, throwScope, "TestObject", "octetAttr");
    1866     }
    1867     auto& impl = castedThis->wrapped();
     1864    return BindingCaller<JSTestObj>::attribute<jsTestObjOctetAttrGetter>(state, thisValue, "octetAttr");
     1865}
     1866
     1867static inline JSValue jsTestObjOctetAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1868{
     1869    UNUSED_PARAM(throwScope);
     1870    UNUSED_PARAM(state);
     1871    auto& impl = thisObject->wrapped();
    18681872    JSValue result = jsNumber(impl.octetAttr());
    1869     return JSValue::encode(result);
    1870 }
    1871 
     1873    return result;
     1874}
     1875
     1876static inline JSValue jsTestObjShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18721877
    18731878EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18741879{
    1875     VM& vm = state->vm();
    1876     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1877     UNUSED_PARAM(throwScope);
    1878     UNUSED_PARAM(thisValue);
    1879     JSValue decodedThisValue = JSValue::decode(thisValue);
    1880     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1881     if (UNLIKELY(!castedThis)) {
    1882         return throwGetterTypeError(*state, throwScope, "TestObject", "shortAttr");
    1883     }
    1884     auto& impl = castedThis->wrapped();
     1880    return BindingCaller<JSTestObj>::attribute<jsTestObjShortAttrGetter>(state, thisValue, "shortAttr");
     1881}
     1882
     1883static inline JSValue jsTestObjShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1884{
     1885    UNUSED_PARAM(throwScope);
     1886    UNUSED_PARAM(state);
     1887    auto& impl = thisObject->wrapped();
    18851888    JSValue result = jsNumber(impl.shortAttr());
    1886     return JSValue::encode(result);
    1887 }
    1888 
     1889    return result;
     1890}
     1891
     1892static inline JSValue jsTestObjClampedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    18891893
    18901894EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    18911895{
    1892     VM& vm = state->vm();
    1893     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1894     UNUSED_PARAM(throwScope);
    1895     UNUSED_PARAM(thisValue);
    1896     JSValue decodedThisValue = JSValue::decode(thisValue);
    1897     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1898     if (UNLIKELY(!castedThis)) {
    1899         return throwGetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
    1900     }
    1901     auto& impl = castedThis->wrapped();
     1896    return BindingCaller<JSTestObj>::attribute<jsTestObjClampedShortAttrGetter>(state, thisValue, "clampedShortAttr");
     1897}
     1898
     1899static inline JSValue jsTestObjClampedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1900{
     1901    UNUSED_PARAM(throwScope);
     1902    UNUSED_PARAM(state);
     1903    auto& impl = thisObject->wrapped();
    19021904    JSValue result = jsNumber(impl.clampedShortAttr());
    1903     return JSValue::encode(result);
    1904 }
    1905 
     1905    return result;
     1906}
     1907
     1908static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19061909
    19071910EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19081911{
    1909     VM& vm = state->vm();
    1910     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1911     UNUSED_PARAM(throwScope);
    1912     UNUSED_PARAM(thisValue);
    1913     JSValue decodedThisValue = JSValue::decode(thisValue);
    1914     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1915     if (UNLIKELY(!castedThis)) {
    1916         return throwGetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
    1917     }
    1918     auto& impl = castedThis->wrapped();
     1912    return BindingCaller<JSTestObj>::attribute<jsTestObjEnforceRangeShortAttrGetter>(state, thisValue, "enforceRangeShortAttr");
     1913}
     1914
     1915static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1916{
     1917    UNUSED_PARAM(throwScope);
     1918    UNUSED_PARAM(state);
     1919    auto& impl = thisObject->wrapped();
    19191920    JSValue result = jsNumber(impl.enforceRangeShortAttr());
    1920     return JSValue::encode(result);
    1921 }
    1922 
     1921    return result;
     1922}
     1923
     1924static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19231925
    19241926EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19251927{
    1926     VM& vm = state->vm();
    1927     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1928     UNUSED_PARAM(throwScope);
    1929     UNUSED_PARAM(thisValue);
    1930     JSValue decodedThisValue = JSValue::decode(thisValue);
    1931     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1932     if (UNLIKELY(!castedThis)) {
    1933         return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
    1934     }
    1935     auto& impl = castedThis->wrapped();
     1928    return BindingCaller<JSTestObj>::attribute<jsTestObjUnsignedShortAttrGetter>(state, thisValue, "unsignedShortAttr");
     1929}
     1930
     1931static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1932{
     1933    UNUSED_PARAM(throwScope);
     1934    UNUSED_PARAM(state);
     1935    auto& impl = thisObject->wrapped();
    19361936    JSValue result = jsNumber(impl.unsignedShortAttr());
    1937     return JSValue::encode(result);
    1938 }
    1939 
     1937    return result;
     1938}
     1939
     1940static inline JSValue jsTestObjLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19401941
    19411942EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19421943{
    1943     VM& vm = state->vm();
    1944     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1945     UNUSED_PARAM(throwScope);
    1946     UNUSED_PARAM(thisValue);
    1947     JSValue decodedThisValue = JSValue::decode(thisValue);
    1948     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1949     if (UNLIKELY(!castedThis)) {
    1950         return throwGetterTypeError(*state, throwScope, "TestObject", "longAttr");
    1951     }
    1952     auto& impl = castedThis->wrapped();
     1944    return BindingCaller<JSTestObj>::attribute<jsTestObjLongAttrGetter>(state, thisValue, "longAttr");
     1945}
     1946
     1947static inline JSValue jsTestObjLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1948{
     1949    UNUSED_PARAM(throwScope);
     1950    UNUSED_PARAM(state);
     1951    auto& impl = thisObject->wrapped();
    19531952    JSValue result = jsNumber(impl.longAttr());
    1954     return JSValue::encode(result);
    1955 }
    1956 
     1953    return result;
     1954}
     1955
     1956static inline JSValue jsTestObjLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19571957
    19581958EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19591959{
    1960     VM& vm = state->vm();
    1961     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1962     UNUSED_PARAM(throwScope);
    1963     UNUSED_PARAM(thisValue);
    1964     JSValue decodedThisValue = JSValue::decode(thisValue);
    1965     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1966     if (UNLIKELY(!castedThis)) {
    1967         return throwGetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
    1968     }
    1969     auto& impl = castedThis->wrapped();
     1960    return BindingCaller<JSTestObj>::attribute<jsTestObjLongLongAttrGetter>(state, thisValue, "longLongAttr");
     1961}
     1962
     1963static inline JSValue jsTestObjLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1964{
     1965    UNUSED_PARAM(throwScope);
     1966    UNUSED_PARAM(state);
     1967    auto& impl = thisObject->wrapped();
    19701968    JSValue result = jsNumber(impl.longLongAttr());
    1971     return JSValue::encode(result);
    1972 }
    1973 
     1969    return result;
     1970}
     1971
     1972static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19741973
    19751974EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19761975{
    1977     VM& vm = state->vm();
    1978     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1979     UNUSED_PARAM(throwScope);
    1980     UNUSED_PARAM(thisValue);
    1981     JSValue decodedThisValue = JSValue::decode(thisValue);
    1982     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    1983     if (UNLIKELY(!castedThis)) {
    1984         return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
    1985     }
    1986     auto& impl = castedThis->wrapped();
     1976    return BindingCaller<JSTestObj>::attribute<jsTestObjUnsignedLongLongAttrGetter>(state, thisValue, "unsignedLongLongAttr");
     1977}
     1978
     1979static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1980{
     1981    UNUSED_PARAM(throwScope);
     1982    UNUSED_PARAM(state);
     1983    auto& impl = thisObject->wrapped();
    19871984    JSValue result = jsNumber(impl.unsignedLongLongAttr());
    1988     return JSValue::encode(result);
    1989 }
    1990 
     1985    return result;
     1986}
     1987
     1988static inline JSValue jsTestObjStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    19911989
    19921990EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    19931991{
    1994     VM& vm = state->vm();
    1995     auto throwScope = DECLARE_THROW_SCOPE(vm);
    1996     UNUSED_PARAM(throwScope);
    1997     UNUSED_PARAM(thisValue);
    1998     JSValue decodedThisValue = JSValue::decode(thisValue);
    1999     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2000     if (UNLIKELY(!castedThis)) {
    2001         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttr");
    2002     }
    2003     auto& impl = castedThis->wrapped();
     1992    return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrGetter>(state, thisValue, "stringAttr");
     1993}
     1994
     1995static inline JSValue jsTestObjStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     1996{
     1997    UNUSED_PARAM(throwScope);
     1998    UNUSED_PARAM(state);
     1999    auto& impl = thisObject->wrapped();
    20042000    JSValue result = jsStringWithCache(state, impl.stringAttr());
    2005     return JSValue::encode(result);
    2006 }
    2007 
     2001    return result;
     2002}
     2003
     2004static inline JSValue jsTestObjUsvstringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20082005
    20092006EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20102007{
    2011     VM& vm = state->vm();
    2012     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2013     UNUSED_PARAM(throwScope);
    2014     UNUSED_PARAM(thisValue);
    2015     JSValue decodedThisValue = JSValue::decode(thisValue);
    2016     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2017     if (UNLIKELY(!castedThis)) {
    2018         return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
    2019     }
    2020     auto& impl = castedThis->wrapped();
     2008    return BindingCaller<JSTestObj>::attribute<jsTestObjUsvstringAttrGetter>(state, thisValue, "usvstringAttr");
     2009}
     2010
     2011static inline JSValue jsTestObjUsvstringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2012{
     2013    UNUSED_PARAM(throwScope);
     2014    UNUSED_PARAM(state);
     2015    auto& impl = thisObject->wrapped();
    20212016    JSValue result = jsStringWithCache(state, impl.usvstringAttr());
    2022     return JSValue::encode(result);
    2023 }
    2024 
     2017    return result;
     2018}
     2019
     2020static inline JSValue jsTestObjTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20252021
    20262022EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20272023{
    2028     VM& vm = state->vm();
    2029     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2030     UNUSED_PARAM(throwScope);
    2031     UNUSED_PARAM(thisValue);
    2032     JSValue decodedThisValue = JSValue::decode(thisValue);
    2033     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2034     if (UNLIKELY(!castedThis)) {
    2035         return throwGetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
    2036     }
    2037     auto& impl = castedThis->wrapped();
    2038     JSValue result = toJS(state, castedThis->globalObject(), impl.testObjAttr());
    2039     return JSValue::encode(result);
    2040 }
    2041 
     2024    return BindingCaller<JSTestObj>::attribute<jsTestObjTestObjAttrGetter>(state, thisValue, "testObjAttr");
     2025}
     2026
     2027static inline JSValue jsTestObjTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2028{
     2029    UNUSED_PARAM(throwScope);
     2030    UNUSED_PARAM(state);
     2031    auto& impl = thisObject->wrapped();
     2032    JSValue result = toJS(state, thisObject->globalObject(), impl.testObjAttr());
     2033    return result;
     2034}
     2035
     2036static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20422037
    20432038EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20442039{
    2045     VM& vm = state->vm();
    2046     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2047     UNUSED_PARAM(throwScope);
    2048     UNUSED_PARAM(thisValue);
    2049     JSValue decodedThisValue = JSValue::decode(thisValue);
    2050     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2051     if (UNLIKELY(!castedThis)) {
    2052         return throwGetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
    2053     }
    2054     auto& impl = castedThis->wrapped();
    2055     JSValue result = toJS(state, castedThis->globalObject(), impl.testNullableObjAttr());
    2056     return JSValue::encode(result);
    2057 }
    2058 
     2040    return BindingCaller<JSTestObj>::attribute<jsTestObjTestNullableObjAttrGetter>(state, thisValue, "testNullableObjAttr");
     2041}
     2042
     2043static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2044{
     2045    UNUSED_PARAM(throwScope);
     2046    UNUSED_PARAM(state);
     2047    auto& impl = thisObject->wrapped();
     2048    JSValue result = toJS(state, thisObject->globalObject(), impl.testNullableObjAttr());
     2049    return result;
     2050}
     2051
     2052static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20592053
    20602054EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20612055{
    2062     VM& vm = state->vm();
    2063     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2064     UNUSED_PARAM(throwScope);
    2065     UNUSED_PARAM(thisValue);
    2066     JSValue decodedThisValue = JSValue::decode(thisValue);
    2067     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2068     if (UNLIKELY(!castedThis)) {
    2069         return JSValue::encode(jsUndefined());
    2070     }
    2071     auto& impl = castedThis->wrapped();
    2072     JSValue result = toJS(state, castedThis->globalObject(), impl.lenientTestObjAttr());
    2073     return JSValue::encode(result);
    2074 }
    2075 
     2056    return BindingCaller<JSTestObj>::attribute<jsTestObjLenientTestObjAttrGetter, CastedThisErrorBehavior::ReturnEarly>(state, thisValue, "lenientTestObjAttr");
     2057}
     2058
     2059static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2060{
     2061    UNUSED_PARAM(throwScope);
     2062    UNUSED_PARAM(state);
     2063    auto& impl = thisObject->wrapped();
     2064    JSValue result = toJS(state, thisObject->globalObject(), impl.lenientTestObjAttr());
     2065    return result;
     2066}
     2067
     2068static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20762069
    20772070EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20782071{
    2079     VM& vm = state->vm();
    2080     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2081     UNUSED_PARAM(throwScope);
    2082     UNUSED_PARAM(thisValue);
    2083     JSValue decodedThisValue = JSValue::decode(thisValue);
    2084     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2085     if (UNLIKELY(!castedThis)) {
    2086         return throwGetterTypeError(*state, throwScope, "TestObject", "unforgeableAttr");
    2087     }
    2088     auto& impl = castedThis->wrapped();
     2072    return BindingCaller<JSTestObj>::attribute<jsTestObjUnforgeableAttrGetter>(state, thisValue, "unforgeableAttr");
     2073}
     2074
     2075static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2076{
     2077    UNUSED_PARAM(throwScope);
     2078    UNUSED_PARAM(state);
     2079    auto& impl = thisObject->wrapped();
    20892080    JSValue result = jsStringWithCache(state, impl.unforgeableAttr());
    2090     return JSValue::encode(result);
    2091 }
    2092 
     2081    return result;
     2082}
     2083
     2084static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    20932085
    20942086EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
    20952087{
    2096     VM& vm = state->vm();
    2097     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2098     UNUSED_PARAM(throwScope);
    2099     UNUSED_PARAM(thisValue);
    2100     JSValue decodedThisValue = JSValue::decode(thisValue);
    2101     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2102     if (UNLIKELY(!castedThis)) {
    2103         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
    2104     }
    2105     auto& impl = castedThis->wrapped();
     2088    return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrTreatingNullAsEmptyStringGetter>(state, thisValue, "stringAttrTreatingNullAsEmptyString");
     2089}
     2090
     2091static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2092{
     2093    UNUSED_PARAM(throwScope);
     2094    UNUSED_PARAM(state);
     2095    auto& impl = thisObject->wrapped();
    21062096    JSValue result = jsStringWithCache(state, impl.stringAttrTreatingNullAsEmptyString());
    2107     return JSValue::encode(result);
    2108 }
    2109 
     2097    return result;
     2098}
     2099
     2100static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21102101
    21112102EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21122103{
    2113     VM& vm = state->vm();
    2114     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2115     UNUSED_PARAM(throwScope);
    2116     UNUSED_PARAM(thisValue);
    2117     JSValue decodedThisValue = JSValue::decode(thisValue);
    2118     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2119     if (UNLIKELY(!castedThis)) {
    2120         return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
    2121     }
    2122     auto& impl = castedThis->wrapped();
     2104    return BindingCaller<JSTestObj>::attribute<jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter>(state, thisValue, "usvstringAttrTreatingNullAsEmptyString");
     2105}
     2106
     2107static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2108{
     2109    UNUSED_PARAM(throwScope);
     2110    UNUSED_PARAM(state);
     2111    auto& impl = thisObject->wrapped();
    21232112    JSValue result = jsStringWithCache(state, impl.usvstringAttrTreatingNullAsEmptyString());
    2124     return JSValue::encode(result);
    2125 }
    2126 
     2113    return result;
     2114}
     2115
     2116static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21272117
    21282118EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21292119{
    2130     VM& vm = state->vm();
    2131     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2132     UNUSED_PARAM(throwScope);
    2133     UNUSED_PARAM(thisValue);
    2134     JSValue decodedThisValue = JSValue::decode(thisValue);
    2135     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2136     if (UNLIKELY(!castedThis)) {
    2137         return throwGetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
    2138     }
    2139     auto& impl = castedThis->wrapped();
     2120    return BindingCaller<JSTestObj>::attribute<jsTestObjImplementationEnumAttrGetter>(state, thisValue, "implementationEnumAttr");
     2121}
     2122
     2123static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2124{
     2125    UNUSED_PARAM(throwScope);
     2126    UNUSED_PARAM(state);
     2127    auto& impl = thisObject->wrapped();
    21402128    JSValue result = jsStringWithCache(state, impl.implementationEnumAttr());
    2141     return JSValue::encode(result);
    2142 }
    2143 
     2129    return result;
     2130}
     2131
     2132static inline JSValue jsTestObjXMLObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21442133
    21452134EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21462135{
    2147     VM& vm = state->vm();
    2148     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2149     UNUSED_PARAM(throwScope);
    2150     UNUSED_PARAM(thisValue);
    2151     JSValue decodedThisValue = JSValue::decode(thisValue);
    2152     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2153     if (UNLIKELY(!castedThis)) {
    2154         return throwGetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
    2155     }
    2156     auto& impl = castedThis->wrapped();
    2157     JSValue result = toJS(state, castedThis->globalObject(), impl.xmlObjAttr());
    2158     return JSValue::encode(result);
    2159 }
    2160 
     2136    return BindingCaller<JSTestObj>::attribute<jsTestObjXMLObjAttrGetter>(state, thisValue, "XMLObjAttr");
     2137}
     2138
     2139static inline JSValue jsTestObjXMLObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2140{
     2141    UNUSED_PARAM(throwScope);
     2142    UNUSED_PARAM(state);
     2143    auto& impl = thisObject->wrapped();
     2144    JSValue result = toJS(state, thisObject->globalObject(), impl.xmlObjAttr());
     2145    return result;
     2146}
     2147
     2148static inline JSValue jsTestObjCreateGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21612149
    21622150EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21632151{
    2164     VM& vm = state->vm();
    2165     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2166     UNUSED_PARAM(throwScope);
    2167     UNUSED_PARAM(thisValue);
    2168     JSValue decodedThisValue = JSValue::decode(thisValue);
    2169     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2170     if (UNLIKELY(!castedThis)) {
    2171         return throwGetterTypeError(*state, throwScope, "TestObject", "create");
    2172     }
    2173     auto& impl = castedThis->wrapped();
     2152    return BindingCaller<JSTestObj>::attribute<jsTestObjCreateGetter>(state, thisValue, "create");
     2153}
     2154
     2155static inline JSValue jsTestObjCreateGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2156{
     2157    UNUSED_PARAM(throwScope);
     2158    UNUSED_PARAM(state);
     2159    auto& impl = thisObject->wrapped();
    21742160    JSValue result = jsBoolean(impl.isCreate());
    2175     return JSValue::encode(result);
    2176 }
    2177 
     2161    return result;
     2162}
     2163
     2164static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21782165
    21792166EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21802167{
    2181     VM& vm = state->vm();
    2182     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2183     UNUSED_PARAM(throwScope);
    2184     UNUSED_PARAM(thisValue);
    2185     JSValue decodedThisValue = JSValue::decode(thisValue);
    2186     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2187     if (UNLIKELY(!castedThis)) {
    2188         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
    2189     }
    2190     auto& impl = castedThis->wrapped();
     2168    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedStringAttrGetter>(state, thisValue, "reflectedStringAttr");
     2169}
     2170
     2171static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2172{
     2173    UNUSED_PARAM(throwScope);
     2174    UNUSED_PARAM(state);
     2175    auto& impl = thisObject->wrapped();
    21912176    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr));
    2192     return JSValue::encode(result);
    2193 }
    2194 
     2177    return result;
     2178}
     2179
     2180static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    21952181
    21962182EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    21972183{
    2198     VM& vm = state->vm();
    2199     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2200     UNUSED_PARAM(throwScope);
    2201     UNUSED_PARAM(thisValue);
    2202     JSValue decodedThisValue = JSValue::decode(thisValue);
    2203     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2204     if (UNLIKELY(!castedThis)) {
    2205         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
    2206     }
    2207     auto& impl = castedThis->wrapped();
     2184    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUSVStringAttrGetter>(state, thisValue, "reflectedUSVStringAttr");
     2185}
     2186
     2187static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2188{
     2189    UNUSED_PARAM(throwScope);
     2190    UNUSED_PARAM(state);
     2191    auto& impl = thisObject->wrapped();
    22082192    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr));
    2209     return JSValue::encode(result);
    2210 }
    2211 
     2193    return result;
     2194}
     2195
     2196static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22122197
    22132198EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22142199{
    2215     VM& vm = state->vm();
    2216     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2217     UNUSED_PARAM(throwScope);
    2218     UNUSED_PARAM(thisValue);
    2219     JSValue decodedThisValue = JSValue::decode(thisValue);
    2220     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2221     if (UNLIKELY(!castedThis)) {
    2222         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
    2223     }
    2224     auto& impl = castedThis->wrapped();
     2200    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedIntegralAttrGetter>(state, thisValue, "reflectedIntegralAttr");
     2201}
     2202
     2203static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2204{
     2205    UNUSED_PARAM(throwScope);
     2206    UNUSED_PARAM(state);
     2207    auto& impl = thisObject->wrapped();
    22252208    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
    2226     return JSValue::encode(result);
    2227 }
    2228 
     2209    return result;
     2210}
     2211
     2212static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22292213
    22302214EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22312215{
    2232     VM& vm = state->vm();
    2233     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2234     UNUSED_PARAM(throwScope);
    2235     UNUSED_PARAM(thisValue);
    2236     JSValue decodedThisValue = JSValue::decode(thisValue);
    2237     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2238     if (UNLIKELY(!castedThis)) {
    2239         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
    2240     }
    2241     auto& impl = castedThis->wrapped();
     2216    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUnsignedIntegralAttrGetter>(state, thisValue, "reflectedUnsignedIntegralAttr");
     2217}
     2218
     2219static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2220{
     2221    UNUSED_PARAM(throwScope);
     2222    UNUSED_PARAM(state);
     2223    auto& impl = thisObject->wrapped();
    22422224    JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
    2243     return JSValue::encode(result);
    2244 }
    2245 
     2225    return result;
     2226}
     2227
     2228static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22462229
    22472230EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22482231{
    2249     VM& vm = state->vm();
    2250     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2251     UNUSED_PARAM(throwScope);
    2252     UNUSED_PARAM(thisValue);
    2253     JSValue decodedThisValue = JSValue::decode(thisValue);
    2254     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2255     if (UNLIKELY(!castedThis)) {
    2256         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
    2257     }
    2258     auto& impl = castedThis->wrapped();
     2232    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedBooleanAttrGetter>(state, thisValue, "reflectedBooleanAttr");
     2233}
     2234
     2235static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2236{
     2237    UNUSED_PARAM(throwScope);
     2238    UNUSED_PARAM(state);
     2239    auto& impl = thisObject->wrapped();
    22592240    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedbooleanattrAttr));
    2260     return JSValue::encode(result);
    2261 }
    2262 
     2241    return result;
     2242}
     2243
     2244static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22632245
    22642246EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22652247{
    2266     VM& vm = state->vm();
    2267     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2268     UNUSED_PARAM(throwScope);
    2269     UNUSED_PARAM(thisValue);
    2270     JSValue decodedThisValue = JSValue::decode(thisValue);
    2271     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2272     if (UNLIKELY(!castedThis)) {
    2273         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
    2274     }
    2275     auto& impl = castedThis->wrapped();
     2248    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedURLAttrGetter>(state, thisValue, "reflectedURLAttr");
     2249}
     2250
     2251static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2252{
     2253    UNUSED_PARAM(throwScope);
     2254    UNUSED_PARAM(state);
     2255    auto& impl = thisObject->wrapped();
    22762256    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
    2277     return JSValue::encode(result);
    2278 }
    2279 
     2257    return result;
     2258}
     2259
     2260static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22802261
    22812262EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22822263{
    2283     VM& vm = state->vm();
    2284     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2285     UNUSED_PARAM(throwScope);
    2286     UNUSED_PARAM(thisValue);
    2287     JSValue decodedThisValue = JSValue::decode(thisValue);
    2288     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2289     if (UNLIKELY(!castedThis)) {
    2290         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVURLAttr");
    2291     }
    2292     auto& impl = castedThis->wrapped();
     2264    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUSVURLAttrGetter>(state, thisValue, "reflectedUSVURLAttr");
     2265}
     2266
     2267static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2268{
     2269    UNUSED_PARAM(throwScope);
     2270    UNUSED_PARAM(state);
     2271    auto& impl = thisObject->wrapped();
    22932272    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedusvurlattrAttr));
    2294     return JSValue::encode(result);
    2295 }
    2296 
     2273    return result;
     2274}
     2275
     2276static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    22972277
    22982278EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    22992279{
    2300     VM& vm = state->vm();
    2301     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2302     UNUSED_PARAM(throwScope);
    2303     UNUSED_PARAM(thisValue);
    2304     JSValue decodedThisValue = JSValue::decode(thisValue);
    2305     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2306     if (UNLIKELY(!castedThis)) {
    2307         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
    2308     }
    2309     auto& impl = castedThis->wrapped();
     2280    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedStringAttrGetter>(state, thisValue, "reflectedStringAttr");
     2281}
     2282
     2283static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2284{
     2285    UNUSED_PARAM(throwScope);
     2286    UNUSED_PARAM(state);
     2287    auto& impl = thisObject->wrapped();
    23102288    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr));
    2311     return JSValue::encode(result);
    2312 }
    2313 
     2289    return result;
     2290}
     2291
     2292static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    23142293
    23152294EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    23162295{
    2317     VM& vm = state->vm();
    2318     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2319     UNUSED_PARAM(throwScope);
    2320     UNUSED_PARAM(thisValue);
    2321     JSValue decodedThisValue = JSValue::decode(thisValue);
    2322     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2323     if (UNLIKELY(!castedThis)) {
    2324         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomIntegralAttr");
    2325     }
    2326     auto& impl = castedThis->wrapped();
     2296    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomIntegralAttrGetter>(state, thisValue, "reflectedCustomIntegralAttr");
     2297}
     2298
     2299static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2300{
     2301    UNUSED_PARAM(throwScope);
     2302    UNUSED_PARAM(state);
     2303    auto& impl = thisObject->wrapped();
    23272304    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
    2328     return JSValue::encode(result);
    2329 }
    2330 
     2305    return result;
     2306}
     2307
     2308static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    23312309
    23322310EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    23332311{
    2334     VM& vm = state->vm();
    2335     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2336     UNUSED_PARAM(throwScope);
    2337     UNUSED_PARAM(thisValue);
    2338     JSValue decodedThisValue = JSValue::decode(thisValue);
    2339     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2340     if (UNLIKELY(!castedThis)) {
    2341         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomBooleanAttr");
    2342     }
    2343     auto& impl = castedThis->wrapped();
     2312    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomBooleanAttrGetter>(state, thisValue, "reflectedCustomBooleanAttr");
     2313}
     2314
     2315static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2316{
     2317    UNUSED_PARAM(throwScope);
     2318    UNUSED_PARAM(state);
     2319    auto& impl = thisObject->wrapped();
    23442320    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::customContentBooleanAttrAttr));
    2345     return JSValue::encode(result);
    2346 }
    2347 
     2321    return result;
     2322}
     2323
     2324static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    23482325
    23492326EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    23502327{
    2351     VM& vm = state->vm();
    2352     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2353     UNUSED_PARAM(throwScope);
    2354     UNUSED_PARAM(thisValue);
    2355     JSValue decodedThisValue = JSValue::decode(thisValue);
    2356     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2357     if (UNLIKELY(!castedThis)) {
    2358         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomURLAttr");
    2359     }
    2360     auto& impl = castedThis->wrapped();
     2328    return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomURLAttrGetter>(state, thisValue, "reflectedCustomURLAttr");
     2329}
     2330
     2331static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2332{
     2333    UNUSED_PARAM(throwScope);
     2334    UNUSED_PARAM(state);
     2335    auto& impl = thisObject->wrapped();
    23612336    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
    2362     return JSValue::encode(result);
    2363 }
    2364 
     2337    return result;
     2338}
    23652339
    23662340#if ENABLE(TEST_FEATURE)
     2341static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2342
    23672343EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    23682344{
    2369     VM& vm = state->vm();
    2370     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2371     UNUSED_PARAM(throwScope);
    2372     UNUSED_PARAM(thisValue);
    2373     JSValue decodedThisValue = JSValue::decode(thisValue);
    2374     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2375     if (UNLIKELY(!castedThis)) {
    2376         return throwGetterTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeAttribute");
    2377     }
    2378     auto& impl = castedThis->wrapped();
     2345    return BindingCaller<JSTestObj>::attribute<jsTestObjEnabledAtRuntimeAttributeGetter>(state, thisValue, "enabledAtRuntimeAttribute");
     2346}
     2347
     2348static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2349{
     2350    UNUSED_PARAM(throwScope);
     2351    UNUSED_PARAM(state);
     2352    auto& impl = thisObject->wrapped();
    23792353    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
    2380     return JSValue::encode(result);
    2381 }
    2382 
    2383 #endif
     2354    return result;
     2355}
     2356
     2357#endif
     2358
     2359static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    23842360
    23852361EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    23862362{
    2387     VM& vm = state->vm();
    2388     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2389     UNUSED_PARAM(throwScope);
    2390     UNUSED_PARAM(thisValue);
    2391     JSValue decodedThisValue = JSValue::decode(thisValue);
    2392     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2393     if (UNLIKELY(!castedThis)) {
    2394         return throwGetterTypeError(*state, throwScope, "TestObject", "typedArrayAttr");
    2395     }
    2396     auto& impl = castedThis->wrapped();
    2397     JSValue result = toJS(state, castedThis->globalObject(), impl.typedArrayAttr());
    2398     return JSValue::encode(result);
    2399 }
    2400 
     2363    return BindingCaller<JSTestObj>::attribute<jsTestObjTypedArrayAttrGetter>(state, thisValue, "typedArrayAttr");
     2364}
     2365
     2366static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2367{
     2368    UNUSED_PARAM(throwScope);
     2369    UNUSED_PARAM(state);
     2370    auto& impl = thisObject->wrapped();
     2371    JSValue result = toJS(state, thisObject->globalObject(), impl.typedArrayAttr());
     2372    return result;
     2373}
     2374
     2375static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24012376
    24022377EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24032378{
    2404     VM& vm = state->vm();
    2405     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2406     UNUSED_PARAM(throwScope);
    2407     UNUSED_PARAM(thisValue);
    2408     JSValue decodedThisValue = JSValue::decode(thisValue);
    2409     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2410     if (UNLIKELY(!castedThis)) {
    2411         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterException");
    2412     }
     2379    return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithGetterExceptionGetter>(state, thisValue, "attrWithGetterException");
     2380}
     2381
     2382static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2383{
     2384    UNUSED_PARAM(throwScope);
     2385    UNUSED_PARAM(state);
    24132386    ExceptionCode ec = 0;
    2414     auto& impl = castedThis->wrapped();
     2387    auto& impl = thisObject->wrapped();
    24152388    JSValue result = jsNumber(impl.attrWithGetterException(ec));
    24162389    setDOMException(state, throwScope, ec);
    2417     return JSValue::encode(result);
    2418 }
    2419 
     2390    return result;
     2391}
     2392
     2393static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24202394
    24212395EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24222396{
    2423     VM& vm = state->vm();
    2424     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2425     UNUSED_PARAM(throwScope);
    2426     UNUSED_PARAM(thisValue);
    2427     JSValue decodedThisValue = JSValue::decode(thisValue);
    2428     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2429     if (UNLIKELY(!castedThis)) {
    2430         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterExceptionWithMessage");
    2431     }
     2397    return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithGetterExceptionWithMessageGetter>(state, thisValue, "attrWithGetterExceptionWithMessage");
     2398}
     2399
     2400static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2401{
     2402    UNUSED_PARAM(throwScope);
     2403    UNUSED_PARAM(state);
    24322404    ExceptionCodeWithMessage ec;
    2433     auto& impl = castedThis->wrapped();
     2405    auto& impl = thisObject->wrapped();
    24342406    JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
    24352407    setDOMException(state, throwScope, ec);
    2436     return JSValue::encode(result);
    2437 }
    2438 
     2408    return result;
     2409}
     2410
     2411static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24392412
    24402413EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24412414{
    2442     VM& vm = state->vm();
    2443     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2444     UNUSED_PARAM(throwScope);
    2445     UNUSED_PARAM(thisValue);
    2446     JSValue decodedThisValue = JSValue::decode(thisValue);
    2447     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2448     if (UNLIKELY(!castedThis)) {
    2449         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterException");
    2450     }
    2451     auto& impl = castedThis->wrapped();
     2415    return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithSetterExceptionGetter>(state, thisValue, "attrWithSetterException");
     2416}
     2417
     2418static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2419{
     2420    UNUSED_PARAM(throwScope);
     2421    UNUSED_PARAM(state);
     2422    auto& impl = thisObject->wrapped();
    24522423    JSValue result = jsNumber(impl.attrWithSetterException());
    2453     return JSValue::encode(result);
    2454 }
    2455 
     2424    return result;
     2425}
     2426
     2427static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24562428
    24572429EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24582430{
    2459     VM& vm = state->vm();
    2460     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2461     UNUSED_PARAM(throwScope);
    2462     UNUSED_PARAM(thisValue);
    2463     JSValue decodedThisValue = JSValue::decode(thisValue);
    2464     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2465     if (UNLIKELY(!castedThis)) {
    2466         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterExceptionWithMessage");
    2467     }
    2468     auto& impl = castedThis->wrapped();
     2431    return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithSetterExceptionWithMessageGetter>(state, thisValue, "attrWithSetterExceptionWithMessage");
     2432}
     2433
     2434static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2435{
     2436    UNUSED_PARAM(throwScope);
     2437    UNUSED_PARAM(state);
     2438    auto& impl = thisObject->wrapped();
    24692439    JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
    2470     return JSValue::encode(result);
    2471 }
    2472 
     2440    return result;
     2441}
     2442
     2443static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24732444
    24742445EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24752446{
    2476     VM& vm = state->vm();
    2477     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2478     UNUSED_PARAM(throwScope);
    2479     UNUSED_PARAM(thisValue);
    2480     JSValue decodedThisValue = JSValue::decode(thisValue);
    2481     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2482     if (UNLIKELY(!castedThis)) {
    2483         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithGetterException");
    2484     }
     2447    return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrWithGetterExceptionGetter>(state, thisValue, "stringAttrWithGetterException");
     2448}
     2449
     2450static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2451{
     2452    UNUSED_PARAM(throwScope);
     2453    UNUSED_PARAM(state);
    24852454    ExceptionCode ec = 0;
    2486     auto& impl = castedThis->wrapped();
     2455    auto& impl = thisObject->wrapped();
    24872456    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
    24882457    setDOMException(state, throwScope, ec);
    2489     return JSValue::encode(result);
    2490 }
    2491 
     2458    return result;
     2459}
     2460
     2461static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    24922462
    24932463EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    24942464{
    2495     VM& vm = state->vm();
    2496     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2497     UNUSED_PARAM(throwScope);
    2498     UNUSED_PARAM(thisValue);
    2499     JSValue decodedThisValue = JSValue::decode(thisValue);
    2500     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2501     if (UNLIKELY(!castedThis)) {
    2502         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithSetterException");
    2503     }
    2504     auto& impl = castedThis->wrapped();
     2465    return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrWithSetterExceptionGetter>(state, thisValue, "stringAttrWithSetterException");
     2466}
     2467
     2468static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2469{
     2470    UNUSED_PARAM(throwScope);
     2471    UNUSED_PARAM(state);
     2472    auto& impl = thisObject->wrapped();
    25052473    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
    2506     return JSValue::encode(result);
    2507 }
    2508 
     2474    return result;
     2475}
     2476
     2477static inline JSValue jsTestObjCustomAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25092478
    25102479EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25112480{
    2512     VM& vm = state->vm();
    2513     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2514     UNUSED_PARAM(throwScope);
    2515     UNUSED_PARAM(thisValue);
    2516     JSValue decodedThisValue = JSValue::decode(thisValue);
    2517     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2518     if (UNLIKELY(!castedThis)) {
    2519         return throwGetterTypeError(*state, throwScope, "TestObject", "customAttr");
    2520     }
    2521     return JSValue::encode(castedThis->customAttr(*state));
    2522 }
    2523 
     2481    return BindingCaller<JSTestObj>::attribute<jsTestObjCustomAttrGetter>(state, thisValue, "customAttr");
     2482}
     2483
     2484static inline JSValue jsTestObjCustomAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2485{
     2486    UNUSED_PARAM(throwScope);
     2487    UNUSED_PARAM(state);
     2488    return thisObject->customAttr(*state);
     2489}
     2490
     2491static inline JSValue jsTestObjOnfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25242492
    25252493EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25262494{
    2527     VM& vm = state->vm();
    2528     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2529     UNUSED_PARAM(throwScope);
    2530     UNUSED_PARAM(thisValue);
    2531     JSValue decodedThisValue = JSValue::decode(thisValue);
    2532     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2533     if (UNLIKELY(!castedThis)) {
    2534         return throwGetterTypeError(*state, throwScope, "TestObject", "onfoo");
    2535     }
    2536     UNUSED_PARAM(state);
    2537     return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
    2538 }
    2539 
     2495    return BindingCaller<JSTestObj>::attribute<jsTestObjOnfooGetter>(state, thisValue, "onfoo");
     2496}
     2497
     2498static inline JSValue jsTestObjOnfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2499{
     2500    UNUSED_PARAM(throwScope);
     2501    UNUSED_PARAM(state);
     2502    return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
     2503}
     2504
     2505static inline JSValue jsTestObjOnwebkitfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25402506
    25412507EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25422508{
    2543     VM& vm = state->vm();
    2544     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2545     UNUSED_PARAM(throwScope);
    2546     UNUSED_PARAM(thisValue);
    2547     JSValue decodedThisValue = JSValue::decode(thisValue);
    2548     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2549     if (UNLIKELY(!castedThis)) {
    2550         return throwGetterTypeError(*state, throwScope, "TestObject", "onwebkitfoo");
    2551     }
    2552     UNUSED_PARAM(state);
    2553     return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
    2554 }
    2555 
     2509    return BindingCaller<JSTestObj>::attribute<jsTestObjOnwebkitfooGetter>(state, thisValue, "onwebkitfoo");
     2510}
     2511
     2512static inline JSValue jsTestObjOnwebkitfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2513{
     2514    UNUSED_PARAM(throwScope);
     2515    UNUSED_PARAM(state);
     2516    return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
     2517}
     2518
     2519static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25562520
    25572521EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25582522{
    2559     VM& vm = state->vm();
    2560     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2561     UNUSED_PARAM(throwScope);
    2562     UNUSED_PARAM(thisValue);
    2563     JSValue decodedThisValue = JSValue::decode(thisValue);
    2564     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2565     if (UNLIKELY(!castedThis)) {
    2566         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttribute");
    2567     }
    2568     auto& impl = castedThis->wrapped();
     2523    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptStateAttributeGetter>(state, thisValue, "withScriptStateAttribute");
     2524}
     2525
     2526static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2527{
     2528    UNUSED_PARAM(throwScope);
     2529    UNUSED_PARAM(state);
     2530    auto& impl = thisObject->wrapped();
    25692531    JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
    2570     return JSValue::encode(result);
    2571 }
    2572 
     2532    return result;
     2533}
     2534
     2535static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25732536
    25742537EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25752538{
    2576     VM& vm = state->vm();
    2577     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2578     UNUSED_PARAM(throwScope);
    2579     UNUSED_PARAM(thisValue);
    2580     JSValue decodedThisValue = JSValue::decode(thisValue);
    2581     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2582     if (UNLIKELY(!castedThis)) {
    2583         return throwGetterTypeError(*state, throwScope, "TestObject", "withCallWithAndSetterCallWithAttribute");
    2584     }
    2585     auto& impl = castedThis->wrapped();
     2539    return BindingCaller<JSTestObj>::attribute<jsTestObjWithCallWithAndSetterCallWithAttributeGetter>(state, thisValue, "withCallWithAndSetterCallWithAttribute");
     2540}
     2541
     2542static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2543{
     2544    UNUSED_PARAM(throwScope);
     2545    UNUSED_PARAM(state);
     2546    auto& impl = thisObject->wrapped();
    25862547    JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
    2587     return JSValue::encode(result);
    2588 }
    2589 
     2548    return result;
     2549}
     2550
     2551static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    25902552
    25912553EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    25922554{
    2593     VM& vm = state->vm();
    2594     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2595     UNUSED_PARAM(throwScope);
    2596     UNUSED_PARAM(thisValue);
    2597     JSValue decodedThisValue = JSValue::decode(thisValue);
    2598     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2599     if (UNLIKELY(!castedThis)) {
    2600         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttribute");
    2601     }
     2555    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAttributeGetter>(state, thisValue, "withScriptExecutionContextAttribute");
     2556}
     2557
     2558static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2559{
     2560    UNUSED_PARAM(throwScope);
     2561    UNUSED_PARAM(state);
    26022562    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
    26032563    if (!context)
    2604         return JSValue::encode(jsUndefined());
    2605     auto& impl = castedThis->wrapped();
    2606     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttribute(*context));
    2607     return JSValue::encode(result);
    2608 }
    2609 
     2564        return jsUndefined();
     2565    auto& impl = thisObject->wrapped();
     2566    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttribute(*context));
     2567    return result;
     2568}
     2569
     2570static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    26102571
    26112572EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
    26122573{
    2613     VM& vm = state->vm();
    2614     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2615     UNUSED_PARAM(throwScope);
    2616     UNUSED_PARAM(thisValue);
    2617     JSValue decodedThisValue = JSValue::decode(thisValue);
    2618     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2619     if (UNLIKELY(!castedThis)) {
    2620         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttributeRaises");
    2621     }
     2574    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptStateAttributeRaisesGetter>(state, thisValue, "withScriptStateAttributeRaises");
     2575}
     2576
     2577static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2578{
     2579    UNUSED_PARAM(throwScope);
     2580    UNUSED_PARAM(state);
    26222581    ExceptionCode ec = 0;
    2623     auto& impl = castedThis->wrapped();
    2624     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
     2582    auto& impl = thisObject->wrapped();
     2583    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
    26252584    setDOMException(state, throwScope, ec);
    2626     return JSValue::encode(result);
    2627 }
    2628 
     2585    return result;
     2586}
     2587
     2588static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    26292589
    26302590EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
    26312591{
    2632     VM& vm = state->vm();
    2633     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2634     UNUSED_PARAM(throwScope);
    2635     UNUSED_PARAM(thisValue);
    2636     JSValue decodedThisValue = JSValue::decode(thisValue);
    2637     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2638     if (UNLIKELY(!castedThis)) {
    2639         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttributeRaises");
    2640     }
     2592    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAttributeRaisesGetter>(state, thisValue, "withScriptExecutionContextAttributeRaises");
     2593}
     2594
     2595static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2596{
     2597    UNUSED_PARAM(throwScope);
     2598    UNUSED_PARAM(state);
    26412599    ExceptionCode ec = 0;
    26422600    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
    26432601    if (!context)
    2644         return JSValue::encode(jsUndefined());
    2645     auto& impl = castedThis->wrapped();
    2646     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
     2602        return jsUndefined();
     2603    auto& impl = thisObject->wrapped();
     2604    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
    26472605    setDOMException(state, throwScope, ec);
    2648     return JSValue::encode(result);
    2649 }
    2650 
     2606    return result;
     2607}
     2608
     2609static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    26512610
    26522611EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    26532612{
    2654     VM& vm = state->vm();
    2655     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2656     UNUSED_PARAM(throwScope);
    2657     UNUSED_PARAM(thisValue);
    2658     JSValue decodedThisValue = JSValue::decode(thisValue);
    2659     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2660     if (UNLIKELY(!castedThis)) {
    2661         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttribute");
    2662     }
     2613    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateAttribute");
     2614}
     2615
     2616static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2617{
     2618    UNUSED_PARAM(throwScope);
     2619    UNUSED_PARAM(state);
    26632620    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
    26642621    if (!context)
    2665         return JSValue::encode(jsUndefined());
    2666     auto& impl = castedThis->wrapped();
    2667     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
    2668     return JSValue::encode(result);
    2669 }
    2670 
     2622        return jsUndefined();
     2623    auto& impl = thisObject->wrapped();
     2624    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
     2625    return result;
     2626}
     2627
     2628static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    26712629
    26722630EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
    26732631{
    2674     VM& vm = state->vm();
    2675     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2676     UNUSED_PARAM(throwScope);
    2677     UNUSED_PARAM(thisValue);
    2678     JSValue decodedThisValue = JSValue::decode(thisValue);
    2679     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2680     if (UNLIKELY(!castedThis)) {
    2681         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttributeRaises");
    2682     }
     2632    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateAttributeRaises");
     2633}
     2634
     2635static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2636{
     2637    UNUSED_PARAM(throwScope);
     2638    UNUSED_PARAM(state);
    26832639    ExceptionCode ec = 0;
    26842640    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
    26852641    if (!context)
    2686         return JSValue::encode(jsUndefined());
    2687     auto& impl = castedThis->wrapped();
    2688     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
     2642        return jsUndefined();
     2643    auto& impl = thisObject->wrapped();
     2644    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
    26892645    setDOMException(state, throwScope, ec);
    2690     return JSValue::encode(result);
    2691 }
    2692 
     2646    return result;
     2647}
     2648
     2649static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    26932650
    26942651EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    26952652{
    2696     VM& vm = state->vm();
    2697     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2698     UNUSED_PARAM(throwScope);
    2699     UNUSED_PARAM(thisValue);
    2700     JSValue decodedThisValue = JSValue::decode(thisValue);
    2701     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2702     if (UNLIKELY(!castedThis)) {
    2703         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
    2704     }
     2653    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
     2654}
     2655
     2656static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2657{
     2658    UNUSED_PARAM(throwScope);
     2659    UNUSED_PARAM(state);
    27052660    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
    27062661    if (!context)
    2707         return JSValue::encode(jsUndefined());
    2708     auto& impl = castedThis->wrapped();
    2709     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
    2710     return JSValue::encode(result);
    2711 }
    2712 
     2662        return jsUndefined();
     2663    auto& impl = thisObject->wrapped();
     2664    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
     2665    return result;
     2666}
     2667
     2668static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    27132669
    27142670EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    27152671{
    2716     VM& vm = state->vm();
    2717     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2718     UNUSED_PARAM(throwScope);
    2719     UNUSED_PARAM(thisValue);
    2720     JSValue decodedThisValue = JSValue::decode(thisValue);
    2721     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2722     if (UNLIKELY(!castedThis)) {
    2723         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStackAttribute");
    2724     }
    2725     auto& impl = castedThis->wrapped();
    2726     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
    2727     return JSValue::encode(result);
    2728 }
    2729 
     2672    return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptArgumentsAndCallStackAttributeGetter>(state, thisValue, "withScriptArgumentsAndCallStackAttribute");
     2673}
     2674
     2675static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2676{
     2677    UNUSED_PARAM(throwScope);
     2678    UNUSED_PARAM(state);
     2679    auto& impl = thisObject->wrapped();
     2680    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
     2681    return result;
     2682}
    27302683
    27312684#if ENABLE(Condition1)
     2685static inline JSValue jsTestObjConditionalAttr1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2686
    27322687EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
    27332688{
    2734     VM& vm = state->vm();
    2735     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2736     UNUSED_PARAM(throwScope);
    2737     UNUSED_PARAM(thisValue);
    2738     JSValue decodedThisValue = JSValue::decode(thisValue);
    2739     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2740     if (UNLIKELY(!castedThis)) {
    2741         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr1");
    2742     }
    2743     auto& impl = castedThis->wrapped();
     2689    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr1Getter>(state, thisValue, "conditionalAttr1");
     2690}
     2691
     2692static inline JSValue jsTestObjConditionalAttr1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2693{
     2694    UNUSED_PARAM(throwScope);
     2695    UNUSED_PARAM(state);
     2696    auto& impl = thisObject->wrapped();
    27442697    JSValue result = jsNumber(impl.conditionalAttr1());
    2745     return JSValue::encode(result);
     2698    return result;
    27462699}
    27472700
     
    27492702
    27502703#if ENABLE(Condition1) && ENABLE(Condition2)
     2704static inline JSValue jsTestObjConditionalAttr2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2705
    27512706EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
    27522707{
    2753     VM& vm = state->vm();
    2754     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2755     UNUSED_PARAM(throwScope);
    2756     UNUSED_PARAM(thisValue);
    2757     JSValue decodedThisValue = JSValue::decode(thisValue);
    2758     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2759     if (UNLIKELY(!castedThis)) {
    2760         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr2");
    2761     }
    2762     auto& impl = castedThis->wrapped();
     2708    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr2Getter>(state, thisValue, "conditionalAttr2");
     2709}
     2710
     2711static inline JSValue jsTestObjConditionalAttr2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2712{
     2713    UNUSED_PARAM(throwScope);
     2714    UNUSED_PARAM(state);
     2715    auto& impl = thisObject->wrapped();
    27632716    JSValue result = jsNumber(impl.conditionalAttr2());
    2764     return JSValue::encode(result);
     2717    return result;
    27652718}
    27662719
     
    27682721
    27692722#if ENABLE(Condition1) || ENABLE(Condition2)
     2723static inline JSValue jsTestObjConditionalAttr3Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2724
    27702725EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
    27712726{
    2772     VM& vm = state->vm();
    2773     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2774     UNUSED_PARAM(throwScope);
    2775     UNUSED_PARAM(thisValue);
    2776     JSValue decodedThisValue = JSValue::decode(thisValue);
    2777     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2778     if (UNLIKELY(!castedThis)) {
    2779         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr3");
    2780     }
    2781     auto& impl = castedThis->wrapped();
     2727    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr3Getter>(state, thisValue, "conditionalAttr3");
     2728}
     2729
     2730static inline JSValue jsTestObjConditionalAttr3Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2731{
     2732    UNUSED_PARAM(throwScope);
     2733    UNUSED_PARAM(state);
     2734    auto& impl = thisObject->wrapped();
    27822735    JSValue result = jsNumber(impl.conditionalAttr3());
    2783     return JSValue::encode(result);
     2736    return result;
    27842737}
    27852738
     
    27872740
    27882741#if ENABLE(Condition1)
     2742static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2743
    27892744EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
    27902745{
    2791     VM& vm = state->vm();
    2792     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2793     UNUSED_PARAM(throwScope);
    2794     UNUSED_PARAM(thisValue);
    2795     JSValue decodedThisValue = JSValue::decode(thisValue);
    2796     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2797     if (UNLIKELY(!castedThis)) {
    2798         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr4");
    2799     }
    2800     return JSValue::encode(JSTestObjectA::getConstructor(state->vm(), castedThis->globalObject()));
     2746    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr4ConstructorGetter>(state, thisValue, "conditionalAttr4");
     2747}
     2748
     2749static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2750{
     2751    UNUSED_PARAM(throwScope);
     2752    UNUSED_PARAM(state);
     2753    return JSTestObjectA::getConstructor(state->vm(), thisObject->globalObject());
    28012754}
    28022755
     
    28042757
    28052758#if ENABLE(Condition1) && ENABLE(Condition2)
     2759static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2760
    28062761EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28072762{
    2808     VM& vm = state->vm();
    2809     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2810     UNUSED_PARAM(throwScope);
    2811     UNUSED_PARAM(thisValue);
    2812     JSValue decodedThisValue = JSValue::decode(thisValue);
    2813     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2814     if (UNLIKELY(!castedThis)) {
    2815         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr5");
    2816     }
    2817     return JSValue::encode(JSTestObjectB::getConstructor(state->vm(), castedThis->globalObject()));
     2763    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr5ConstructorGetter>(state, thisValue, "conditionalAttr5");
     2764}
     2765
     2766static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2767{
     2768    UNUSED_PARAM(throwScope);
     2769    UNUSED_PARAM(state);
     2770    return JSTestObjectB::getConstructor(state->vm(), thisObject->globalObject());
    28182771}
    28192772
     
    28212774
    28222775#if ENABLE(Condition1) || ENABLE(Condition2)
     2776static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
     2777
    28232778EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28242779{
    2825     VM& vm = state->vm();
    2826     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2827     UNUSED_PARAM(throwScope);
    2828     UNUSED_PARAM(thisValue);
    2829     JSValue decodedThisValue = JSValue::decode(thisValue);
    2830     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2831     if (UNLIKELY(!castedThis)) {
    2832         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr6");
    2833     }
    2834     return JSValue::encode(JSTestObjectC::getConstructor(state->vm(), castedThis->globalObject()));
    2835 }
    2836 
    2837 #endif
     2780    return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr6ConstructorGetter>(state, thisValue, "conditionalAttr6");
     2781}
     2782
     2783static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2784{
     2785    UNUSED_PARAM(throwScope);
     2786    UNUSED_PARAM(state);
     2787    return JSTestObjectC::getConstructor(state->vm(), thisObject->globalObject());
     2788}
     2789
     2790#endif
     2791
     2792static inline JSValue jsTestObjCachedAttribute1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    28382793
    28392794EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28402795{
    2841     VM& vm = state->vm();
    2842     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2843     UNUSED_PARAM(throwScope);
    2844     UNUSED_PARAM(thisValue);
    2845     JSValue decodedThisValue = JSValue::decode(thisValue);
    2846     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2847     if (UNLIKELY(!castedThis)) {
    2848         return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute1");
    2849     }
    2850     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
    2851         return JSValue::encode(cachedValue);
    2852     auto& impl = castedThis->wrapped();
     2796    return BindingCaller<JSTestObj>::attribute<jsTestObjCachedAttribute1Getter>(state, thisValue, "cachedAttribute1");
     2797}
     2798
     2799static inline JSValue jsTestObjCachedAttribute1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2800{
     2801    UNUSED_PARAM(throwScope);
     2802    UNUSED_PARAM(state);
     2803    if (JSValue cachedValue = thisObject->m_cachedAttribute1.get())
     2804        return cachedValue;
     2805    auto& impl = thisObject->wrapped();
    28532806    JSValue result = impl.cachedAttribute1();
    2854     castedThis->m_cachedAttribute1.set(state->vm(), castedThis, result);
    2855     return JSValue::encode(result);
    2856 }
    2857 
     2807    thisObject->m_cachedAttribute1.set(state->vm(), thisObject, result);
     2808    return result;
     2809}
     2810
     2811static inline JSValue jsTestObjCachedAttribute2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    28582812
    28592813EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28602814{
    2861     VM& vm = state->vm();
    2862     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2863     UNUSED_PARAM(throwScope);
    2864     UNUSED_PARAM(thisValue);
    2865     JSValue decodedThisValue = JSValue::decode(thisValue);
    2866     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2867     if (UNLIKELY(!castedThis)) {
    2868         return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute2");
    2869     }
    2870     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
    2871         return JSValue::encode(cachedValue);
    2872     auto& impl = castedThis->wrapped();
     2815    return BindingCaller<JSTestObj>::attribute<jsTestObjCachedAttribute2Getter>(state, thisValue, "cachedAttribute2");
     2816}
     2817
     2818static inline JSValue jsTestObjCachedAttribute2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2819{
     2820    UNUSED_PARAM(throwScope);
     2821    UNUSED_PARAM(state);
     2822    if (JSValue cachedValue = thisObject->m_cachedAttribute2.get())
     2823        return cachedValue;
     2824    auto& impl = thisObject->wrapped();
    28732825    JSValue result = impl.cachedAttribute2();
    2874     castedThis->m_cachedAttribute2.set(state->vm(), castedThis, result);
    2875     return JSValue::encode(result);
    2876 }
    2877 
     2826    thisObject->m_cachedAttribute2.set(state->vm(), thisObject, result);
     2827    return result;
     2828}
     2829
     2830static inline JSValue jsTestObjAnyAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    28782831
    28792832EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28802833{
    2881     VM& vm = state->vm();
    2882     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2883     UNUSED_PARAM(throwScope);
    2884     UNUSED_PARAM(thisValue);
    2885     JSValue decodedThisValue = JSValue::decode(thisValue);
    2886     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2887     if (UNLIKELY(!castedThis)) {
    2888         return throwGetterTypeError(*state, throwScope, "TestObject", "anyAttribute");
    2889     }
    2890     auto& impl = castedThis->wrapped();
     2834    return BindingCaller<JSTestObj>::attribute<jsTestObjAnyAttributeGetter>(state, thisValue, "anyAttribute");
     2835}
     2836
     2837static inline JSValue jsTestObjAnyAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2838{
     2839    UNUSED_PARAM(throwScope);
     2840    UNUSED_PARAM(state);
     2841    auto& impl = thisObject->wrapped();
    28912842    JSValue result = impl.anyAttribute();
    2892     return JSValue::encode(result);
    2893 }
    2894 
     2843    return result;
     2844}
     2845
     2846static inline JSValue jsTestObjContentDocumentGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    28952847
    28962848EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName)
    28972849{
    2898     VM& vm = state->vm();
    2899     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2900     UNUSED_PARAM(throwScope);
    2901     UNUSED_PARAM(thisValue);
    2902     JSValue decodedThisValue = JSValue::decode(thisValue);
    2903     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2904     if (UNLIKELY(!castedThis)) {
    2905         return throwGetterTypeError(*state, throwScope, "TestObject", "contentDocument");
    2906     }
    2907     auto& impl = castedThis->wrapped();
    2908     return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis->globalObject(), impl.contentDocument()) : jsNull());
    2909 }
    2910 
     2850    return BindingCaller<JSTestObj>::attribute<jsTestObjContentDocumentGetter>(state, thisValue, "contentDocument");
     2851}
     2852
     2853static inline JSValue jsTestObjContentDocumentGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2854{
     2855    UNUSED_PARAM(throwScope);
     2856    UNUSED_PARAM(state);
     2857    auto& impl = thisObject->wrapped();
     2858    return shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, thisObject->globalObject(), impl.contentDocument()) : jsNull();
     2859}
     2860
     2861static inline JSValue jsTestObjMutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29112862
    29122863EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29132864{
    2914     VM& vm = state->vm();
    2915     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2916     UNUSED_PARAM(throwScope);
    2917     UNUSED_PARAM(thisValue);
    2918     JSValue decodedThisValue = JSValue::decode(thisValue);
    2919     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2920     if (UNLIKELY(!castedThis)) {
    2921         return throwGetterTypeError(*state, throwScope, "TestObject", "mutablePoint");
    2922     }
    2923     auto& impl = castedThis->wrapped();
    2924     JSValue result = toJS(state, castedThis->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
    2925     return JSValue::encode(result);
    2926 }
    2927 
     2865    return BindingCaller<JSTestObj>::attribute<jsTestObjMutablePointGetter>(state, thisValue, "mutablePoint");
     2866}
     2867
     2868static inline JSValue jsTestObjMutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2869{
     2870    UNUSED_PARAM(throwScope);
     2871    UNUSED_PARAM(state);
     2872    auto& impl = thisObject->wrapped();
     2873    JSValue result = toJS(state, thisObject->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
     2874    return result;
     2875}
     2876
     2877static inline JSValue jsTestObjImmutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29282878
    29292879EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29302880{
    2931     VM& vm = state->vm();
    2932     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2933     UNUSED_PARAM(throwScope);
    2934     UNUSED_PARAM(thisValue);
    2935     JSValue decodedThisValue = JSValue::decode(thisValue);
    2936     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2937     if (UNLIKELY(!castedThis)) {
    2938         return throwGetterTypeError(*state, throwScope, "TestObject", "immutablePoint");
    2939     }
    2940     auto& impl = castedThis->wrapped();
    2941     JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
    2942     return JSValue::encode(result);
    2943 }
    2944 
     2881    return BindingCaller<JSTestObj>::attribute<jsTestObjImmutablePointGetter>(state, thisValue, "immutablePoint");
     2882}
     2883
     2884static inline JSValue jsTestObjImmutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2885{
     2886    UNUSED_PARAM(throwScope);
     2887    UNUSED_PARAM(state);
     2888    auto& impl = thisObject->wrapped();
     2889    JSValue result = toJS(state, thisObject->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
     2890    return result;
     2891}
     2892
     2893static inline JSValue jsTestObjStrawberryGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29452894
    29462895EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29472896{
    2948     VM& vm = state->vm();
    2949     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2950     UNUSED_PARAM(throwScope);
    2951     UNUSED_PARAM(thisValue);
    2952     JSValue decodedThisValue = JSValue::decode(thisValue);
    2953     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2954     if (UNLIKELY(!castedThis)) {
    2955         return throwGetterTypeError(*state, throwScope, "TestObject", "strawberry");
    2956     }
    2957     auto& impl = castedThis->wrapped();
     2897    return BindingCaller<JSTestObj>::attribute<jsTestObjStrawberryGetter>(state, thisValue, "strawberry");
     2898}
     2899
     2900static inline JSValue jsTestObjStrawberryGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2901{
     2902    UNUSED_PARAM(throwScope);
     2903    UNUSED_PARAM(state);
     2904    auto& impl = thisObject->wrapped();
    29582905    JSValue result = jsNumber(impl.blueberry());
    2959     return JSValue::encode(result);
    2960 }
    2961 
     2906    return result;
     2907}
     2908
     2909static inline JSValue jsTestObjDescriptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29622910
    29632911EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29642912{
    2965     VM& vm = state->vm();
    2966     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2967     UNUSED_PARAM(throwScope);
    2968     UNUSED_PARAM(thisValue);
    2969     JSValue decodedThisValue = JSValue::decode(thisValue);
    2970     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2971     if (UNLIKELY(!castedThis)) {
    2972         return throwGetterTypeError(*state, throwScope, "TestObject", "description");
    2973     }
    2974     auto& impl = castedThis->wrapped();
     2913    return BindingCaller<JSTestObj>::attribute<jsTestObjDescriptionGetter>(state, thisValue, "description");
     2914}
     2915
     2916static inline JSValue jsTestObjDescriptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2917{
     2918    UNUSED_PARAM(throwScope);
     2919    UNUSED_PARAM(state);
     2920    auto& impl = thisObject->wrapped();
    29752921    JSValue result = jsNumber(impl.description());
    2976     return JSValue::encode(result);
    2977 }
    2978 
     2922    return result;
     2923}
     2924
     2925static inline JSValue jsTestObjIdGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29792926
    29802927EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29812928{
    2982     VM& vm = state->vm();
    2983     auto throwScope = DECLARE_THROW_SCOPE(vm);
    2984     UNUSED_PARAM(throwScope);
    2985     UNUSED_PARAM(thisValue);
    2986     JSValue decodedThisValue = JSValue::decode(thisValue);
    2987     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    2988     if (UNLIKELY(!castedThis)) {
    2989         return throwGetterTypeError(*state, throwScope, "TestObject", "id");
    2990     }
    2991     auto& impl = castedThis->wrapped();
     2929    return BindingCaller<JSTestObj>::attribute<jsTestObjIdGetter>(state, thisValue, "id");
     2930}
     2931
     2932static inline JSValue jsTestObjIdGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2933{
     2934    UNUSED_PARAM(throwScope);
     2935    UNUSED_PARAM(state);
     2936    auto& impl = thisObject->wrapped();
    29922937    JSValue result = jsNumber(impl.id());
    2993     return JSValue::encode(result);
    2994 }
    2995 
     2938    return result;
     2939}
     2940
     2941static inline JSValue jsTestObjHashGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    29962942
    29972943EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
    29982944{
    2999     VM& vm = state->vm();
    3000     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3001     UNUSED_PARAM(throwScope);
    3002     UNUSED_PARAM(thisValue);
    3003     JSValue decodedThisValue = JSValue::decode(thisValue);
    3004     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3005     if (UNLIKELY(!castedThis)) {
    3006         return throwGetterTypeError(*state, throwScope, "TestObject", "hash");
    3007     }
    3008     auto& impl = castedThis->wrapped();
     2945    return BindingCaller<JSTestObj>::attribute<jsTestObjHashGetter>(state, thisValue, "hash");
     2946}
     2947
     2948static inline JSValue jsTestObjHashGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2949{
     2950    UNUSED_PARAM(throwScope);
     2951    UNUSED_PARAM(state);
     2952    auto& impl = thisObject->wrapped();
    30092953    JSValue result = jsStringWithCache(state, impl.hash());
    3010     return JSValue::encode(result);
    3011 }
    3012 
     2954    return result;
     2955}
     2956
     2957static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30132958
    30142959EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    30152960{
    3016     VM& vm = state->vm();
    3017     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3018     UNUSED_PARAM(throwScope);
    3019     UNUSED_PARAM(thisValue);
    3020     JSValue decodedThisValue = JSValue::decode(thisValue);
    3021     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3022     if (UNLIKELY(!castedThis)) {
    3023         return throwGetterTypeError(*state, throwScope, "TestObject", "replaceableAttribute");
    3024     }
    3025     auto& impl = castedThis->wrapped();
     2961    return BindingCaller<JSTestObj>::attribute<jsTestObjReplaceableAttributeGetter>(state, thisValue, "replaceableAttribute");
     2962}
     2963
     2964static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2965{
     2966    UNUSED_PARAM(throwScope);
     2967    UNUSED_PARAM(state);
     2968    auto& impl = thisObject->wrapped();
    30262969    JSValue result = jsNumber(impl.replaceableAttribute());
    3027     return JSValue::encode(result);
    3028 }
    3029 
     2970    return result;
     2971}
     2972
     2973static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30302974
    30312975EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    30322976{
    3033     VM& vm = state->vm();
    3034     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3035     UNUSED_PARAM(throwScope);
    3036     UNUSED_PARAM(thisValue);
    3037     JSValue decodedThisValue = JSValue::decode(thisValue);
    3038     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3039     if (UNLIKELY(!castedThis)) {
    3040         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableDoubleAttribute");
    3041     }
    3042     auto& impl = castedThis->wrapped();
     2977    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableDoubleAttributeGetter>(state, thisValue, "nullableDoubleAttribute");
     2978}
     2979
     2980static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2981{
     2982    UNUSED_PARAM(throwScope);
     2983    UNUSED_PARAM(state);
     2984    auto& impl = thisObject->wrapped();
    30432985    JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
    3044     return JSValue::encode(result);
    3045 }
    3046 
     2986    return result;
     2987}
     2988
     2989static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30472990
    30482991EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    30492992{
    3050     VM& vm = state->vm();
    3051     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3052     UNUSED_PARAM(throwScope);
    3053     UNUSED_PARAM(thisValue);
    3054     JSValue decodedThisValue = JSValue::decode(thisValue);
    3055     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3056     if (UNLIKELY(!castedThis)) {
    3057         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongAttribute");
    3058     }
    3059     auto& impl = castedThis->wrapped();
     2993    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableLongAttributeGetter>(state, thisValue, "nullableLongAttribute");
     2994}
     2995
     2996static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     2997{
     2998    UNUSED_PARAM(throwScope);
     2999    UNUSED_PARAM(state);
     3000    auto& impl = thisObject->wrapped();
    30603001    JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
    3061     return JSValue::encode(result);
    3062 }
    3063 
     3002    return result;
     3003}
     3004
     3005static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30643006
    30653007EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    30663008{
    3067     VM& vm = state->vm();
    3068     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3069     UNUSED_PARAM(throwScope);
    3070     UNUSED_PARAM(thisValue);
    3071     JSValue decodedThisValue = JSValue::decode(thisValue);
    3072     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3073     if (UNLIKELY(!castedThis)) {
    3074         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableBooleanAttribute");
    3075     }
    3076     auto& impl = castedThis->wrapped();
     3009    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableBooleanAttributeGetter>(state, thisValue, "nullableBooleanAttribute");
     3010}
     3011
     3012static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3013{
     3014    UNUSED_PARAM(throwScope);
     3015    UNUSED_PARAM(state);
     3016    auto& impl = thisObject->wrapped();
    30773017    JSValue result = jsBoolean(impl.nullableBooleanAttribute());
    3078     return JSValue::encode(result);
    3079 }
    3080 
     3018    return result;
     3019}
     3020
     3021static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30813022
    30823023EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    30833024{
    3084     VM& vm = state->vm();
    3085     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3086     UNUSED_PARAM(throwScope);
    3087     UNUSED_PARAM(thisValue);
    3088     JSValue decodedThisValue = JSValue::decode(thisValue);
    3089     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3090     if (UNLIKELY(!castedThis)) {
    3091         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringAttribute");
    3092     }
    3093     auto& impl = castedThis->wrapped();
     3025    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringAttributeGetter>(state, thisValue, "nullableStringAttribute");
     3026}
     3027
     3028static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3029{
     3030    UNUSED_PARAM(throwScope);
     3031    UNUSED_PARAM(state);
     3032    auto& impl = thisObject->wrapped();
    30943033    JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
    3095     return JSValue::encode(result);
    3096 }
    3097 
     3034    return result;
     3035}
     3036
     3037static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    30983038
    30993039EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31003040{
    3101     VM& vm = state->vm();
    3102     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3103     UNUSED_PARAM(throwScope);
    3104     UNUSED_PARAM(thisValue);
    3105     JSValue decodedThisValue = JSValue::decode(thisValue);
    3106     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3107     if (UNLIKELY(!castedThis)) {
    3108         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongSettableAttribute");
    3109     }
    3110     auto& impl = castedThis->wrapped();
     3041    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableLongSettableAttributeGetter>(state, thisValue, "nullableLongSettableAttribute");
     3042}
     3043
     3044static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3045{
     3046    UNUSED_PARAM(throwScope);
     3047    UNUSED_PARAM(state);
     3048    auto& impl = thisObject->wrapped();
    31113049    JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
    3112     return JSValue::encode(result);
    3113 }
    3114 
     3050    return result;
     3051}
     3052
     3053static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    31153054
    31163055EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31173056{
    3118     VM& vm = state->vm();
    3119     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3120     UNUSED_PARAM(throwScope);
    3121     UNUSED_PARAM(thisValue);
    3122     JSValue decodedThisValue = JSValue::decode(thisValue);
    3123     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3124     if (UNLIKELY(!castedThis)) {
    3125         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringSettableAttribute");
    3126     }
    3127     auto& impl = castedThis->wrapped();
     3057    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringSettableAttributeGetter>(state, thisValue, "nullableStringSettableAttribute");
     3058}
     3059
     3060static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3061{
     3062    UNUSED_PARAM(throwScope);
     3063    UNUSED_PARAM(state);
     3064    auto& impl = thisObject->wrapped();
    31283065    JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
    3129     return JSValue::encode(result);
    3130 }
    3131 
     3066    return result;
     3067}
     3068
     3069static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    31323070
    31333071EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31343072{
    3135     VM& vm = state->vm();
    3136     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3137     UNUSED_PARAM(throwScope);
    3138     UNUSED_PARAM(thisValue);
    3139     JSValue decodedThisValue = JSValue::decode(thisValue);
    3140     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3141     if (UNLIKELY(!castedThis)) {
    3142         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableUSVStringSettableAttribute");
    3143     }
    3144     auto& impl = castedThis->wrapped();
     3073    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableUSVStringSettableAttributeGetter>(state, thisValue, "nullableUSVStringSettableAttribute");
     3074}
     3075
     3076static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3077{
     3078    UNUSED_PARAM(throwScope);
     3079    UNUSED_PARAM(state);
     3080    auto& impl = thisObject->wrapped();
    31453081    JSValue result = jsStringOrNull(state, impl.nullableUSVStringSettableAttribute());
    3146     return JSValue::encode(result);
    3147 }
    3148 
     3082    return result;
     3083}
     3084
     3085static inline JSValue jsTestObjNullableStringValueGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    31493086
    31503087EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31513088{
    3152     VM& vm = state->vm();
    3153     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3154     UNUSED_PARAM(throwScope);
    3155     UNUSED_PARAM(thisValue);
    3156     JSValue decodedThisValue = JSValue::decode(thisValue);
    3157     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3158     if (UNLIKELY(!castedThis)) {
    3159         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringValue");
    3160     }
     3089    return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringValueGetter>(state, thisValue, "nullableStringValue");
     3090}
     3091
     3092static inline JSValue jsTestObjNullableStringValueGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3093{
     3094    UNUSED_PARAM(throwScope);
     3095    UNUSED_PARAM(state);
    31613096    ExceptionCode ec = 0;
    3162     auto& impl = castedThis->wrapped();
     3097    auto& impl = thisObject->wrapped();
    31633098    JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
    31643099    setDOMException(state, throwScope, ec);
    3165     return JSValue::encode(result);
    3166 }
    3167 
     3100    return result;
     3101}
     3102
     3103static inline JSValue jsTestObjAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    31683104
    31693105EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31703106{
    3171     VM& vm = state->vm();
    3172     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3173     UNUSED_PARAM(throwScope);
    3174     UNUSED_PARAM(thisValue);
    3175     JSValue decodedThisValue = JSValue::decode(thisValue);
    3176     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3177     if (UNLIKELY(!castedThis)) {
    3178         return throwGetterTypeError(*state, throwScope, "TestObject", "attribute");
    3179     }
    3180     auto& impl = castedThis->wrapped();
     3107    return BindingCaller<JSTestObj>::attribute<jsTestObjAttributeGetter>(state, thisValue, "attribute");
     3108}
     3109
     3110static inline JSValue jsTestObjAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3111{
     3112    UNUSED_PARAM(throwScope);
     3113    UNUSED_PARAM(state);
     3114    auto& impl = thisObject->wrapped();
    31813115    JSValue result = jsStringWithCache(state, impl.attribute());
    3182     return JSValue::encode(result);
    3183 }
    3184 
     3116    return result;
     3117}
     3118
     3119static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    31853120
    31863121EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJSValue thisValue, PropertyName)
    31873122{
    3188     VM& vm = state->vm();
    3189     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3190     UNUSED_PARAM(throwScope);
    3191     UNUSED_PARAM(thisValue);
    3192     JSValue decodedThisValue = JSValue::decode(thisValue);
    3193     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3194     if (UNLIKELY(!castedThis)) {
    3195         return throwGetterTypeError(*state, throwScope, "TestObject", "attributeWithReservedEnumType");
    3196     }
    3197     auto& impl = castedThis->wrapped();
     3123    return BindingCaller<JSTestObj>::attribute<jsTestObjAttributeWithReservedEnumTypeGetter>(state, thisValue, "attributeWithReservedEnumType");
     3124}
     3125
     3126static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3127{
     3128    UNUSED_PARAM(throwScope);
     3129    UNUSED_PARAM(state);
     3130    auto& impl = thisObject->wrapped();
    31983131    JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
    3199     return JSValue::encode(result);
    3200 }
    3201 
     3132    return result;
     3133}
     3134
     3135static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    32023136
    32033137EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    32043138{
    3205     VM& vm = state->vm();
    3206     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3207     UNUSED_PARAM(throwScope);
    3208     UNUSED_PARAM(thisValue);
    3209     JSValue decodedThisValue = JSValue::decode(thisValue);
    3210     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3211     if (UNLIKELY(!castedThis)) {
    3212         return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsAttribute");
    3213     }
    3214     auto& impl = castedThis->wrapped();
    3215     JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsAttribute());
    3216     return JSValue::encode(result);
    3217 }
    3218 
     3139    return BindingCaller<JSTestObj>::attribute<jsTestObjPutForwardsAttributeGetter>(state, thisValue, "putForwardsAttribute");
     3140}
     3141
     3142static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3143{
     3144    UNUSED_PARAM(throwScope);
     3145    UNUSED_PARAM(state);
     3146    auto& impl = thisObject->wrapped();
     3147    JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsAttribute());
     3148    return result;
     3149}
     3150
     3151static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    32193152
    32203153EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    32213154{
    3222     VM& vm = state->vm();
    3223     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3224     UNUSED_PARAM(throwScope);
    3225     UNUSED_PARAM(thisValue);
    3226     JSValue decodedThisValue = JSValue::decode(thisValue);
    3227     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3228     if (UNLIKELY(!castedThis)) {
    3229         return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsNullableAttribute");
    3230     }
    3231     auto& impl = castedThis->wrapped();
    3232     JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsNullableAttribute());
    3233     return JSValue::encode(result);
    3234 }
    3235 
     3155    return BindingCaller<JSTestObj>::attribute<jsTestObjPutForwardsNullableAttributeGetter>(state, thisValue, "putForwardsNullableAttribute");
     3156}
     3157
     3158static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3159{
     3160    UNUSED_PARAM(throwScope);
     3161    UNUSED_PARAM(state);
     3162    auto& impl = thisObject->wrapped();
     3163    JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsNullableAttribute());
     3164    return result;
     3165}
     3166
     3167static inline JSValue jsTestObjStringifierAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
    32363168
    32373169EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
    32383170{
    3239     VM& vm = state->vm();
    3240     auto throwScope = DECLARE_THROW_SCOPE(vm);
    3241     UNUSED_PARAM(throwScope);
    3242     UNUSED_PARAM(thisValue);
    3243     JSValue decodedThisValue = JSValue::decode(thisValue);
    3244     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
    3245     if (UNLIKELY(!castedThis)) {
    3246         return throwGetterTypeError(*state, throwScope, "TestObject", "stringifierAttribute");
    3247     }
    3248     auto& impl = castedThis->wrapped();
     3171    return BindingCaller<JSTestObj>::attribute<jsTestObjStringifierAttributeGetter>(state, thisValue, "stringifierAttribute");
     3172}
     3173
     3174static inline JSValue jsTestObjStringifierAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
     3175{
     3176    UNUSED_PARAM(throwScope);
     3177    UNUSED_PARAM(state);
     3178    auto& impl = thisObject->wrapped();
    32493179    JSValue result = jsStringWithCache(state, impl.stringifierAttribute());
    3250     return JSValue::encode(result);
    3251 }
    3252 
     3180    return result;
     3181}
    32533182
    32543183EncodedJSValue jsTestObjConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r206812 r206953  
    5454    static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());
    5555    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     56    static JSTestObj* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5657    mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1;
    5758    mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute2;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r206723 r206953  
    133133}
    134134
     135inline JSTestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     136{
     137    return jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     138}
     139
     140static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
     141
    135142EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    136143{
    137     VM& vm = state->vm();
    138     auto throwScope = DECLARE_THROW_SCOPE(vm);
    139     UNUSED_PARAM(throwScope);
    140     UNUSED_PARAM(thisValue);
    141     JSValue decodedThisValue = JSValue::decode(thisValue);
    142     auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
    143     if (UNLIKELY(!castedThis)) {
    144         return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "value");
    145     }
    146     auto& impl = castedThis->wrapped();
    147     JSValue result = impl.value() ? impl.value()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
    148     return JSValue::encode(result);
    149 }
    150 
     144    return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceValueGetter>(state, thisValue, "value");
     145}
     146
     147static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
     148{
     149    UNUSED_PARAM(throwScope);
     150    UNUSED_PARAM(state);
     151    auto& impl = thisObject->wrapped();
     152    JSValue result = impl.value() ? impl.value()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
     153    return result;
     154}
     155
     156static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
    151157
    152158EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    153159{
    154     VM& vm = state->vm();
    155     auto throwScope = DECLARE_THROW_SCOPE(vm);
    156     UNUSED_PARAM(throwScope);
    157     UNUSED_PARAM(thisValue);
    158     JSValue decodedThisValue = JSValue::decode(thisValue);
    159     auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
    160     if (UNLIKELY(!castedThis)) {
    161         return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "readonlyValue");
    162     }
    163     auto& impl = castedThis->wrapped();
    164     JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
    165     return JSValue::encode(result);
    166 }
    167 
     160    return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceReadonlyValueGetter>(state, thisValue, "readonlyValue");
     161}
     162
     163static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
     164{
     165    UNUSED_PARAM(throwScope);
     166    UNUSED_PARAM(state);
     167    auto& impl = thisObject->wrapped();
     168    JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
     169    return result;
     170}
     171
     172static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
    168173
    169174EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    170175{
    171     VM& vm = state->vm();
    172     auto throwScope = DECLARE_THROW_SCOPE(vm);
    173     UNUSED_PARAM(throwScope);
    174     UNUSED_PARAM(thisValue);
    175     JSValue decodedThisValue = JSValue::decode(thisValue);
    176     auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
    177     if (UNLIKELY(!castedThis)) {
    178         return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedValue");
    179     }
    180     if (JSValue cachedValue = castedThis->m_cachedValue.get())
    181         return JSValue::encode(cachedValue);
    182     auto& impl = castedThis->wrapped();
    183     JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
    184     castedThis->m_cachedValue.set(state->vm(), castedThis, result);
    185     return JSValue::encode(result);
    186 }
    187 
     176    return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceCachedValueGetter>(state, thisValue, "cachedValue");
     177}
     178
     179static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
     180{
     181    UNUSED_PARAM(throwScope);
     182    UNUSED_PARAM(state);
     183    if (JSValue cachedValue = thisObject->m_cachedValue.get())
     184        return cachedValue;
     185    auto& impl = thisObject->wrapped();
     186    JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
     187    thisObject->m_cachedValue.set(state->vm(), thisObject, result);
     188    return result;
     189}
     190
     191static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
    188192
    189193EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* state, EncodedJSValue thisValue, PropertyName)
    190194{
    191     VM& vm = state->vm();
    192     auto throwScope = DECLARE_THROW_SCOPE(vm);
    193     UNUSED_PARAM(throwScope);
    194     UNUSED_PARAM(thisValue);
    195     JSValue decodedThisValue = JSValue::decode(thisValue);
    196     auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
    197     if (UNLIKELY(!castedThis)) {
    198         return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "ports");
    199     }
    200     auto& impl = castedThis->wrapped();
    201     JSValue result = jsArray(state, castedThis->globalObject(), impl.ports());
    202     return JSValue::encode(result);
    203 }
    204 
     195    return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfacePortsGetter>(state, thisValue, "ports");
     196}
     197
     198static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
     199{
     200    UNUSED_PARAM(throwScope);
     201    UNUSED_PARAM(state);
     202    auto& impl = thisObject->wrapped();
     203    JSValue result = jsArray(state, thisObject->globalObject(), impl.ports());
     204    return result;
     205}
     206
     207static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
    205208
    206209EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    207210{
    208     VM& vm = state->vm();
    209     auto throwScope = DECLARE_THROW_SCOPE(vm);
    210     UNUSED_PARAM(throwScope);
    211     UNUSED_PARAM(thisValue);
    212     JSValue decodedThisValue = JSValue::decode(thisValue);
    213     auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
    214     if (UNLIKELY(!castedThis)) {
    215         return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedReadonlyValue");
    216     }
    217     if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
    218         return JSValue::encode(cachedValue);
    219     auto& impl = castedThis->wrapped();
    220     JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
    221     castedThis->m_cachedReadonlyValue.set(state->vm(), castedThis, result);
    222     return JSValue::encode(result);
    223 }
    224 
     211    return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter>(state, thisValue, "cachedReadonlyValue");
     212}
     213
     214static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
     215{
     216    UNUSED_PARAM(throwScope);
     217    UNUSED_PARAM(state);
     218    if (JSValue cachedValue = thisObject->m_cachedReadonlyValue.get())
     219        return cachedValue;
     220    auto& impl = thisObject->wrapped();
     221    JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
     222    thisObject->m_cachedReadonlyValue.set(state->vm(), thisObject, result);
     223    return result;
     224}
    225225
    226226EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h

    r206723 r206953  
    5252
    5353    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     54    static JSTestSerializedScriptValueInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5455    mutable JSC::WriteBarrier<JSC::Unknown> m_cachedValue;
    5556    mutable JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r206723 r206953  
    211211}
    212212
     213inline JSTestTypedefs* JSTestTypedefs::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     214{
     215    return jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     216}
     217
     218static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
     219
    213220EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
    214221{
    215     VM& vm = state->vm();
    216     auto throwScope = DECLARE_THROW_SCOPE(vm);
    217     UNUSED_PARAM(throwScope);
    218     UNUSED_PARAM(thisValue);
    219     JSValue decodedThisValue = JSValue::decode(thisValue);
    220     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    221     if (UNLIKELY(!castedThis)) {
    222         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "unsignedLongLongAttr");
    223     }
    224     auto& impl = castedThis->wrapped();
     222    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsUnsignedLongLongAttrGetter>(state, thisValue, "unsignedLongLongAttr");
     223}
     224
     225static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     226{
     227    UNUSED_PARAM(throwScope);
     228    UNUSED_PARAM(state);
     229    auto& impl = thisObject->wrapped();
    225230    JSValue result = jsNumber(impl.unsignedLongLongAttr());
    226     return JSValue::encode(result);
    227 }
    228 
     231    return result;
     232}
     233
     234static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    229235
    230236EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
    231237{
    232     VM& vm = state->vm();
    233     auto throwScope = DECLARE_THROW_SCOPE(vm);
    234     UNUSED_PARAM(throwScope);
    235     UNUSED_PARAM(thisValue);
    236     JSValue decodedThisValue = JSValue::decode(thisValue);
    237     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    238     if (UNLIKELY(!castedThis)) {
    239         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "immutableSerializedScriptValue");
    240     }
    241     auto& impl = castedThis->wrapped();
    242     JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
    243     return JSValue::encode(result);
    244 }
    245 
     238    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsImmutableSerializedScriptValueGetter>(state, thisValue, "immutableSerializedScriptValue");
     239}
     240
     241static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     242{
     243    UNUSED_PARAM(throwScope);
     244    UNUSED_PARAM(state);
     245    auto& impl = thisObject->wrapped();
     246    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
     247    return result;
     248}
     249
     250static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    246251
    247252EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
    248253{
    249     VM& vm = state->vm();
    250     auto throwScope = DECLARE_THROW_SCOPE(vm);
    251     UNUSED_PARAM(throwScope);
    252     UNUSED_PARAM(thisValue);
    253     JSValue decodedThisValue = JSValue::decode(thisValue);
    254     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    255     if (UNLIKELY(!castedThis)) {
    256         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "TestSubObj");
    257     }
    258     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
    259 }
    260 
     254    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsConstructorTestSubObjGetter>(state, thisValue, "TestSubObj");
     255}
     256
     257static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     258{
     259    UNUSED_PARAM(throwScope);
     260    UNUSED_PARAM(state);
     261    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
     262}
     263
     264static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    261265
    262266EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    263267{
    264     VM& vm = state->vm();
    265     auto throwScope = DECLARE_THROW_SCOPE(vm);
    266     UNUSED_PARAM(throwScope);
    267     UNUSED_PARAM(thisValue);
    268     JSValue decodedThisValue = JSValue::decode(thisValue);
    269     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    270     if (UNLIKELY(!castedThis)) {
    271         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithGetterException");
    272     }
     268    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttrWithGetterExceptionGetter>(state, thisValue, "attrWithGetterException");
     269}
     270
     271static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     272{
     273    UNUSED_PARAM(throwScope);
     274    UNUSED_PARAM(state);
    273275    ExceptionCode ec = 0;
    274     auto& impl = castedThis->wrapped();
     276    auto& impl = thisObject->wrapped();
    275277    JSValue result = jsNumber(impl.attrWithGetterException(ec));
    276278    setDOMException(state, throwScope, ec);
    277     return JSValue::encode(result);
    278 }
    279 
     279    return result;
     280}
     281
     282static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    280283
    281284EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    282285{
    283     VM& vm = state->vm();
    284     auto throwScope = DECLARE_THROW_SCOPE(vm);
    285     UNUSED_PARAM(throwScope);
    286     UNUSED_PARAM(thisValue);
    287     JSValue decodedThisValue = JSValue::decode(thisValue);
    288     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    289     if (UNLIKELY(!castedThis)) {
    290         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithSetterException");
    291     }
    292     auto& impl = castedThis->wrapped();
     286    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttrWithSetterExceptionGetter>(state, thisValue, "attrWithSetterException");
     287}
     288
     289static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     290{
     291    UNUSED_PARAM(throwScope);
     292    UNUSED_PARAM(state);
     293    auto& impl = thisObject->wrapped();
    293294    JSValue result = jsNumber(impl.attrWithSetterException());
    294     return JSValue::encode(result);
    295 }
    296 
     295    return result;
     296}
     297
     298static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    297299
    298300EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    299301{
    300     VM& vm = state->vm();
    301     auto throwScope = DECLARE_THROW_SCOPE(vm);
    302     UNUSED_PARAM(throwScope);
    303     UNUSED_PARAM(thisValue);
    304     JSValue decodedThisValue = JSValue::decode(thisValue);
    305     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    306     if (UNLIKELY(!castedThis)) {
    307         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithGetterException");
    308     }
     302    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsStringAttrWithGetterExceptionGetter>(state, thisValue, "stringAttrWithGetterException");
     303}
     304
     305static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     306{
     307    UNUSED_PARAM(throwScope);
     308    UNUSED_PARAM(state);
    309309    ExceptionCode ec = 0;
    310     auto& impl = castedThis->wrapped();
     310    auto& impl = thisObject->wrapped();
    311311    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
    312312    setDOMException(state, throwScope, ec);
    313     return JSValue::encode(result);
    314 }
    315 
     313    return result;
     314}
     315
     316static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
    316317
    317318EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
    318319{
    319     VM& vm = state->vm();
    320     auto throwScope = DECLARE_THROW_SCOPE(vm);
    321     UNUSED_PARAM(throwScope);
    322     UNUSED_PARAM(thisValue);
    323     JSValue decodedThisValue = JSValue::decode(thisValue);
    324     auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
    325     if (UNLIKELY(!castedThis)) {
    326         return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithSetterException");
    327     }
    328     auto& impl = castedThis->wrapped();
     320    return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsStringAttrWithSetterExceptionGetter>(state, thisValue, "stringAttrWithSetterException");
     321}
     322
     323static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
     324{
     325    UNUSED_PARAM(throwScope);
     326    UNUSED_PARAM(state);
     327    auto& impl = thisObject->wrapped();
    329328    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
    330     return JSValue::encode(result);
    331 }
    332 
     329    return result;
     330}
    333331
    334332EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h

    r206723 r206953  
    5050
    5151    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     52    static JSTestTypedefs* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5253public:
    5354    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp

    r206723 r206953  
    133133}
    134134
     135inline JSattribute* JSattribute::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
     136{
     137    return jsDynamicCast<JSattribute*>(JSValue::decode(thisValue));
     138}
     139
     140static inline JSValue jsattributeReadonlyGetter(ExecState*, JSattribute*, ThrowScope& throwScope);
     141
    135142EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, PropertyName)
    136143{
    137     VM& vm = state->vm();
    138     auto throwScope = DECLARE_THROW_SCOPE(vm);
     144    return BindingCaller<JSattribute>::attribute<jsattributeReadonlyGetter>(state, thisValue, "readonly");
     145}
     146
     147static inline JSValue jsattributeReadonlyGetter(ExecState* state, JSattribute* thisObject, ThrowScope& throwScope)
     148{
    139149    UNUSED_PARAM(throwScope);
    140     UNUSED_PARAM(thisValue);
    141     JSValue decodedThisValue = JSValue::decode(thisValue);
    142     auto* castedThis = jsDynamicCast<JSattribute*>(decodedThisValue);
    143     if (UNLIKELY(!castedThis)) {
    144         return throwGetterTypeError(*state, throwScope, "attribute", "readonly");
    145     }
    146     auto& impl = castedThis->wrapped();
     150    UNUSED_PARAM(state);
     151    auto& impl = thisObject->wrapped();
    147152    JSValue result = jsStringWithCache(state, impl.readonly());
    148     return JSValue::encode(result);
    149 }
    150 
     153    return result;
     154}
    151155
    152156EncodedJSValue jsattributeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h

    r206723 r206953  
    5151
    5252    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     53    static JSattribute* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
    5354public:
    5455    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
Note: See TracChangeset for help on using the changeset viewer.