| Differences between
and this patch
- a/Source/WebCore/ChangeLog +75 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2016-09-26  Alejandro G. Castro  <alex@igalia.com>
2
3
        Add WebIDL special operation support: serializer
4
        https://bugs.webkit.org/show_bug.cgi?id=156293
5
6
        Reviewed by Darin Adler.
7
8
        Added support for the serializer special operation for WebIDLs,
9
        current implementation adds support for:
10
          - just the keyword: serializer; It will return all the
11
            attributes of in an object.
12
          - map of entries with the attributes: serializer = {attribute1,
13
            attribute2, ...}
14
15
        It creates a toJSON method that returns the serialized value
16
        converted into an ECMAScript value. For more information check the
17
        definition of the operation:
18
19
        http://heycam.github.io/webidl/#idl-serializers
20
21
        We have modified current code that generates the getter function
22
        for attributes in two parts so that we can reuse the part
23
        extracting the value for the serializer.
24
25
        Used the support to add new API for RTCIceCandidate and
26
        RTCSessionDescription.
27
28
        Updated the tests expectations of the bindings.
29
30
        Tests: bindings/scripts/test/TestNode.idl
31
               bindings/scripts/test/TestObj.idl
32
               fast/mediastream/RTCIceCandidate.html
33
               fast/mediastream/RTCSessionDescription.html
34
35
        * Modules/mediastream/RTCIceCandidate.idl: Added the serializer
36
        operation.
37
        * Modules/mediastream/RTCSessionDescription.idl: Added the
38
        serializer operation.
39
        * bindings/scripts/CodeGeneratorJS.pm:
40
        (GenerateImplementation): Splitted the code of the attribute
41
        getter in two functions, one getting the value and the other
42
        handling the call from the API. This way we can reuse the code for
43
        the serializer. Also added the calls to the serializer
44
        code generator.
45
        (GenerateSerializerFunction): Added, generates the toJSON function
46
        adding all the serializable->attributes value to an object as
47
        defined in the spec.
48
        * bindings/scripts/IDLParser.pm: Modified the serializer parser
49
        that was unused to support the WebIDL spec parts. Added a new
50
        domSerializable type to store the list of attributes in the
51
        possible map.
52
        (parseSerializer): Modified the function to follow the
53
        semicolon rule in the spec, now the serializer line must have a
54
        semicolon like any other line.
55
        (parseSerializerRest): The function now has to get the attributes
56
        list from the pattern parsing function and add them to the
57
        domSerializable item.
58
        (parseSerializationPattern): Now this function returns the list of
59
        attributes in the serializable map or list if we have one.
60
        (parseSerializationAttributes): Added, this function replaces the
61
        Map and List functions, the currently supported parts are similar
62
        for both situations.
63
        (applyMemberList): Added the serializable item to the interface
64
        variable and populate the serializable in case there is not a
65
        defined map.
66
        (parseSerializationPatternMap): Replaced with
67
        parseSerializationAttributes.
68
        (parseSerializationPatternList): Ditto.
69
        * bindings/scripts/test/JS/JSTestNode.cpp: Modified the expected result.
70
        (WebCore::jsTestNodePrototypeFunctionToJSON):
71
        * bindings/scripts/test/JS/JSTestObj.cpp: Modified the expected result.
72
        (WebCore::jsTestObjPrototypeFunctionToJSON):
73
        * bindings/scripts/test/TestNode.idl: Added the serializer test.
74
        * bindings/scripts/test/TestObj.idl: Added serializer map test.
75
1
2016-09-26  Joonghun Park  <jh718.park@samsung.com>
76
2016-09-26  Joonghun Park  <jh718.park@samsung.com>
2
77
3
        [EFL] Fix debug build break since r204205. Unreviewed
78
        [EFL] Fix debug build break since r204205. Unreviewed
- a/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl +2 lines
Lines 39-43 a/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl_sec1
39
    readonly attribute DOMString candidate;
39
    readonly attribute DOMString candidate;
40
    readonly attribute DOMString? sdpMid;
40
    readonly attribute DOMString? sdpMid;
41
    readonly attribute unsigned short? sdpMLineIndex;
41
    readonly attribute unsigned short? sdpMLineIndex;
42
43
    serializer = {candidate, sdpMid, sdpMLineIndex};
42
};
44
};
43
45
- a/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl +2 lines
Lines 38-43 a/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl_sec1
38
] interface RTCSessionDescription {
38
] interface RTCSessionDescription {
39
    [SetterRaisesException] readonly attribute RTCSdpType type;
39
    [SetterRaisesException] readonly attribute RTCSdpType type;
40
    readonly attribute DOMString sdp;
40
    readonly attribute DOMString sdp;
41
42
    serializer = {type, sdp};
41
};
43
};
42
44
43
enum RTCSdpType {
45
enum RTCSdpType {
- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm -42 / +112 lines
Lines 2297-2302 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec1
2297
    my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface);
2297
    my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface);
2298
    my $eventTarget = $codeGenerator->InheritsInterface($interface, "EventTarget") && $interface->name ne "EventTarget";
2298
    my $eventTarget = $codeGenerator->InheritsInterface($interface, "EventTarget") && $interface->name ne "EventTarget";
2299
    my $needsVisitChildren = InstanceNeedsVisitChildren($interface);
2299
    my $needsVisitChildren = InstanceNeedsVisitChildren($interface);
2300
    my $serializerFunctionName = "toJSON";
2301
    my $serializerNativeFunctionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($serializerFunctionName);
2300
2302
2301
    my $namedGetterFunction = GetNamedGetterFunction($interface);
2303
    my $namedGetterFunction = GetNamedGetterFunction($interface);
2302
    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
2304
    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
Lines 2387-2392 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec2
2387
        push(@implContent, "\n");
2389
        push(@implContent, "\n");
2388
    }
2390
    }
2389
2391
2392
    push(@implContent, "EncodedJSValue JSC_HOST_CALL ${serializerNativeFunctionName}(ExecState*);\n\n") if $interface->serializable;
2393
2390
    GeneratePrototypeDeclaration(\@implContent, $className, $interface) if !HeaderNeedsPrototypeDeclaration($interface);
2394
    GeneratePrototypeDeclaration(\@implContent, $className, $interface) if !HeaderNeedsPrototypeDeclaration($interface);
2391
2395
2392
    GenerateConstructorDeclaration(\@implContent, $className, $interface) if NeedsConstructorProperty($interface);
2396
    GenerateConstructorDeclaration(\@implContent, $className, $interface) if NeedsConstructorProperty($interface);
Lines 2545-2550 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec3
2545
2549
2546
    my $justGenerateValueArray = !IsDOMGlobalObject($interface);
2550
    my $justGenerateValueArray = !IsDOMGlobalObject($interface);
2547
2551
2552
    if ($interface->serializable) {
2553
        push(@hashKeys, $serializerFunctionName);
2554
        push(@hashValue1, $serializerNativeFunctionName);
2555
        push(@hashValue2, 0);
2556
        push(@hashSpecials, "JSC::Function");
2557
2558
        $hashSize++;
2559
    }
2560
2548
    $object->GenerateHashTable($hashName, $hashSize,
2561
    $object->GenerateHashTable($hashName, $hashSize,
2549
                               \@hashKeys, \@hashSpecials,
2562
                               \@hashKeys, \@hashSpecials,
2550
                               \@hashValue1, \@hashValue2,
2563
                               \@hashValue1, \@hashValue2,
Lines 2839-2844 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec4
2839
            my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
2852
            my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
2840
            push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
2853
            push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
2841
2854
2855
            if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
2856
                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*, ${className}*, ThrowScope& throwScope);\n\n");
2857
            } else {
2858
                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*);\n\n");
2859
            }
2860
2842
            push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
2861
            push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
2843
            push(@implContent, "{\n");
2862
            push(@implContent, "{\n");
2844
2863
Lines 2863-2869 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec5
2863
                    push(@implContent, "        return throwGetterTypeError(*state, throwScope, \"$visibleInterfaceName\", \"$name\");\n");
2882
                    push(@implContent, "        return throwGetterTypeError(*state, throwScope, \"$visibleInterfaceName\", \"$name\");\n");
2864
                }
2883
                }
2865
                push(@implContent, "    }\n");
2884
                push(@implContent, "    }\n");
2885
2886
                push(@implContent, "    return JSValue::encode(${getFunctionName}Getter(state, castedThis, throwScope));\n");
2887
                push(@implContent, "}\n\n");
2888
2889
                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state, ${className}* thisObject, ThrowScope& throwScope)\n");
2890
2891
                push(@implContent, "{\n");
2892
2893
                push(@implContent, "    UNUSED_PARAM(thisObject);\n");
2894
                push(@implContent, "    UNUSED_PARAM(throwScope);\n");
2895
2896
            } else {
2897
                push(@implContent, "    return JSValue::encode(${getFunctionName}Getter(state));\n");
2898
                push(@implContent, "}\n\n");
2899
2900
                push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state)\n");
2901
2902
                push(@implContent, "{\n");
2903
2904
2866
            }
2905
            }
2906
            push(@implContent, "    UNUSED_PARAM(state);\n");
2867
2907
2868
            my @arguments = ();
2908
            my @arguments = ();
2869
            if ($getterExceptions && !HasCustomGetter($attribute->signature->extendedAttributes)) {
2909
            if ($getterExceptions && !HasCustomGetter($attribute->signature->extendedAttributes)) {
Lines 2881-2891 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec6
2881
                    AddToImplIncludes("Frame.h");
2921
                    AddToImplIncludes("Frame.h");
2882
                    AddToImplIncludes("Settings.h");
2922
                    AddToImplIncludes("Settings.h");
2883
                    my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{"EnabledBySetting"}) . "Enabled";
2923
                    my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{"EnabledBySetting"}) . "Enabled";
2884
                    push(@implContent, "    if (UNLIKELY(!castedThis->wrapped().frame()))\n");
2924
                    push(@implContent, "    if (UNLIKELY(!thisObject->wrapped().frame()))\n");
2885
                    push(@implContent, "        return JSValue::encode(jsUndefined());\n");
2925
                    push(@implContent, "        return jsUndefined();\n");
2886
                    push(@implContent, "    Settings& settings = castedThis->wrapped().frame()->settings();\n");
2926
                    push(@implContent, "    Settings& settings = thisObject->wrapped().frame()->settings();\n");
2887
                    push(@implContent, "    if (!settings.$enable_function())\n");
2927
                    push(@implContent, "    if (!settings.$enable_function())\n");
2888
                    push(@implContent, "        return JSValue::encode(jsUndefined());\n");
2928
                    push(@implContent, "        return jsUndefined();\n");
2889
                }
2929
                }
2890
            }
2930
            }
2891
2931
Lines 2897-2907 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec7
2897
                !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"} &&
2937
                !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"} &&
2898
                !$attribute->signature->extendedAttributes->{"DoNotCheckSecurityOnGetter"}) {
2938
                !$attribute->signature->extendedAttributes->{"DoNotCheckSecurityOnGetter"}) {
2899
                if ($interfaceName eq "DOMWindow") {
2939
                if ($interfaceName eq "DOMWindow") {
2900
                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
2940
                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, thisObject->wrapped(), ThrowSecurityError))\n");
2901
                } else {
2941
                } else {
2902
                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
2942
                    push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))\n");
2903
                }
2943
                }
2904
                push(@implContent, "        return JSValue::encode(jsUndefined());\n");
2944
                push(@implContent, "        return jsUndefined();\n");
2905
            }
2945
            }
2906
2946
2907
            if ($attribute->signature->extendedAttributes->{"Nondeterministic"}) {
2947
            if ($attribute->signature->extendedAttributes->{"Nondeterministic"}) {
Lines 2918-2928 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec8
2918
                my $exceptionCode = $getterExceptionsWithMessage ? "ec.code" : ($getterExceptions ? "ec" : "0");
2958
                my $exceptionCode = $getterExceptionsWithMessage ? "ec.code" : ($getterExceptions ? "ec" : "0");
2919
                push(@implContent, "    static NeverDestroyed<const AtomicString> bindingName(\"$interfaceName.$name\", AtomicString::ConstructFromLiteral);\n");
2959
                push(@implContent, "    static NeverDestroyed<const AtomicString> bindingName(\"$interfaceName.$name\", AtomicString::ConstructFromLiteral);\n");
2920
                push(@implContent, "    if (cursor.isCapturing()) {\n");
2960
                push(@implContent, "    if (cursor.isCapturing()) {\n");
2921
                push(@implContent, "        $memoizedType memoizedResult = castedThis->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
2961
                push(@implContent, "        $memoizedType memoizedResult = thisObject->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
2922
                push(@implContent, "        cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, $exceptionCode);\n");
2962
                push(@implContent, "        cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, $exceptionCode);\n");
2923
                push(@implContent, "        JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
2963
                push(@implContent, "        JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
2924
                push(@implContent, "        setDOMException(state, throwScope, ec);\n") if $getterExceptions;
2964
                push(@implContent, "        setDOMException(state, throwScope, ec);\n") if $getterExceptions;
2925
                push(@implContent, "        return JSValue::encode(result);\n");
2965
                push(@implContent, "        return result;\n");
2926
                push(@implContent, "    }\n");
2966
                push(@implContent, "    }\n");
2927
                push(@implContent, "\n");
2967
                push(@implContent, "\n");
2928
                push(@implContent, "    if (cursor.isReplaying()) {\n");
2968
                push(@implContent, "    if (cursor.isReplaying()) {\n");
Lines 2930-2989 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec9
2930
                push(@implContent, "        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
2970
                push(@implContent, "        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
2931
                push(@implContent, "        if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
2971
                push(@implContent, "        if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
2932
                # FIXME: the generated code should report an error if an input cannot be fetched or converted.
2972
                # FIXME: the generated code should report an error if an input cannot be fetched or converted.
2933
                push(@implContent, "            JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
2973
                push(@implContent, "            JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
2934
                push(@implContent, "            setDOMException(state, throwScope, input->exceptionCode());\n") if $getterExceptions;
2974
                push(@implContent, "            setDOMException(state, throwScope, input->exceptionCode());\n") if $getterExceptions;
2935
                push(@implContent, "            return JSValue::encode(result);\n");
2975
                push(@implContent, "            return result;\n");
2936
                push(@implContent, "        }\n");
2976
                push(@implContent, "        }\n");
2937
                push(@implContent, "    }\n");
2977
                push(@implContent, "    }\n");
2938
                push(@implContent, "#endif\n");
2978
                push(@implContent, "#endif\n");
2939
            } # attribute Nondeterministic
2979
            } # attribute Nondeterministic
2940
2980
2941
            if (HasCustomGetter($attribute->signature->extendedAttributes)) {
2981
            if (HasCustomGetter($attribute->signature->extendedAttributes)) {
2942
                push(@implContent, "    return JSValue::encode(castedThis->$implGetterFunctionName(*state));\n");
2982
                push(@implContent, "    return thisObject->$implGetterFunctionName(*state);\n");
2943
            } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
2983
            } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
2944
                $implIncludes{"JSDOMBinding.h"} = 1;
2984
                $implIncludes{"JSDOMBinding.h"} = 1;
2945
                push(@implContent, "    auto& impl = castedThis->wrapped();\n");
2985
                push(@implContent, "    auto& impl = thisObject->wrapped();\n");
2946
                push(@implContent, "    return JSValue::encode(shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
2986
                push(@implContent, "    return shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "thisObject") . " : jsNull();\n");
2947
            } elsif ($type eq "EventHandler") {
2987
            } elsif ($type eq "EventHandler") {
2948
                $implIncludes{"EventNames.h"} = 1;
2988
                $implIncludes{"EventNames.h"} = 1;
2949
                my $getter = $attribute->signature->extendedAttributes->{"WindowEventHandler"} ? "windowEventHandlerAttribute"
2989
                my $getter = $attribute->signature->extendedAttributes->{"WindowEventHandler"} ? "windowEventHandlerAttribute"
2950
                    : $attribute->signature->extendedAttributes->{"DocumentEventHandler"} ? "documentEventHandlerAttribute"
2990
                    : $attribute->signature->extendedAttributes->{"DocumentEventHandler"} ? "documentEventHandlerAttribute"
2951
                    : "eventHandlerAttribute";
2991
                    : "eventHandlerAttribute";
2952
                my $eventName = EventHandlerAttributeEventName($attribute);
2992
                my $eventName = EventHandlerAttributeEventName($attribute);
2953
                push(@implContent, "    UNUSED_PARAM(state);\n");
2993
                push(@implContent, "    return $getter(thisObject->wrapped(), $eventName);\n");
2954
                push(@implContent, "    return JSValue::encode($getter(castedThis->wrapped(), $eventName));\n");
2955
            } elsif ($attribute->signature->type =~ /Constructor$/) {
2994
            } elsif ($attribute->signature->type =~ /Constructor$/) {
2956
                my $constructorType = $attribute->signature->type;
2995
                my $constructorType = $attribute->signature->type;
2957
                $constructorType =~ s/Constructor$//;
2996
                $constructorType =~ s/Constructor$//;
2958
                # When Constructor attribute is used by DOMWindow.idl, it's correct to pass castedThis as the global object
2997
                # When Constructor attribute is used by DOMWindow.idl, it's correct to pass thisObject as the global object
2959
                # When JSDOMWrappers have a back-pointer to the globalObject we can pass castedThis->globalObject()
2998
                # When JSDOMWrappers have a back-pointer to the globalObject we can pass thisObject->globalObject()
2960
                if ($interfaceName eq "DOMWindow") {
2999
                if ($interfaceName eq "DOMWindow") {
2961
                    my $named = ($constructorType =~ /Named$/) ? "Named" : "";
3000
                    my $named = ($constructorType =~ /Named$/) ? "Named" : "";
2962
                    $constructorType =~ s/Named$//;
3001
                    $constructorType =~ s/Named$//;
2963
                    push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::get${named}Constructor(state->vm(), castedThis));\n");
3002
                    push(@implContent, "    return JS" . $constructorType . "::get${named}Constructor(state->vm(), thisObject);\n");
2964
                } else {
3003
                } else {
2965
                    AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
3004
                    AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
2966
                    push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::getConstructor(state->vm(), castedThis->globalObject()));\n");
3005
                    push(@implContent, "    return JS" . $constructorType . "::getConstructor(state->vm(), thisObject->globalObject());\n");
2967
                }
3006
                }
2968
            } elsif (!$attribute->signature->extendedAttributes->{"GetterRaisesException"} && !$attribute->signature->extendedAttributes->{"GetterRaisesExceptionWithMessage"}) {
3007
            } elsif (!$attribute->signature->extendedAttributes->{"GetterRaisesException"} && !$attribute->signature->extendedAttributes->{"GetterRaisesExceptionWithMessage"}) {
2969
                my $cacheIndex = 0;
3008
                my $cacheIndex = 0;
2970
                if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
3009
                if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
2971
                    $cacheIndex = $currentCachedAttribute;
3010
                    $cacheIndex = $currentCachedAttribute;
2972
                    $currentCachedAttribute++;
3011
                    $currentCachedAttribute++;
2973
                    push(@implContent, "    if (JSValue cachedValue = castedThis->m_" . $attribute->signature->name . ".get())\n");
3012
                    push(@implContent, "    if (JSValue cachedValue = thisObject->m_" . $attribute->signature->name . ".get())\n");
2974
                    push(@implContent, "        return JSValue::encode(cachedValue);\n");
3013
                    push(@implContent, "        return cachedValue;\n");
2975
                }
3014
                }
2976
3015
2977
                my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "JSValue::encode(jsUndefined())");
3016
                my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()");
2978
3017
2979
                if ($svgListPropertyType) {
3018
                if ($svgListPropertyType) {
2980
                    push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $interface, "castedThis->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
3019
                    push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $interface, "thisObject->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
2981
                } elsif ($svgPropertyOrListPropertyType) {
3020
                } elsif ($svgPropertyOrListPropertyType) {
2982
                    push(@implContent, "    $svgPropertyOrListPropertyType& impl = castedThis->wrapped().propertyReference();\n");
3021
                    push(@implContent, "    $svgPropertyOrListPropertyType& impl = thisObject->wrapped().propertyReference();\n");
2983
                    if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
3022
                    if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
2984
                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "castedThis") . ";\n");
3023
                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "thisObject") . ";\n");
2985
                    } else {
3024
                    } else {
2986
                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
3025
                        push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
2987
3026
2988
                    }
3027
                    }
2989
                } else {
3028
                } else {
Lines 3000-3039 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec10
3000
                    }
3039
                    }
3001
3040
3002
                    unshift(@arguments, @callWithArgs);
3041
                    unshift(@arguments, @callWithArgs);
3003
                    my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
3042
                    my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "thisObject");
3004
                    push(@implContent, "    auto& impl = castedThis->wrapped();\n") if !$attribute->isStatic;
3043
                    push(@implContent, "    auto& impl = thisObject->wrapped();\n") if !$attribute->isStatic;
3005
                    if ($codeGenerator->IsSVGAnimatedType($type)) {
3044
                    if ($codeGenerator->IsSVGAnimatedType($type)) {
3006
                        push(@implContent, "    auto obj = $jsType;\n");
3045
                        push(@implContent, "    auto obj = $jsType;\n");
3007
                        push(@implContent, "    JSValue result = toJS(state, castedThis->globalObject(), obj.get());\n");
3046
                        push(@implContent, "    JSValue result = toJS(state, thisObject->globalObject(), obj.get());\n");
3008
                    } else {
3047
                    } else {
3009
                        push(@implContent, "    JSValue result = $jsType;\n");
3048
                        push(@implContent, "    JSValue result = $jsType;\n");
3010
                    }
3049
                    }
3011
                }
3050
                }
3012
3051
3013
                push(@implContent, "    castedThis->m_" . $attribute->signature->name . ".set(state->vm(), castedThis, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"});
3052
                push(@implContent, "    thisObject->m_" . $attribute->signature->name . ".set(state->vm(), thisObject, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"});
3014
                push(@implContent, "    return JSValue::encode(result);\n");
3053
                push(@implContent, "    return result;\n");
3015
3054
3016
            } else {
3055
            } else {
3017
                unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "JSValue::encode(jsUndefined())"));
3056
                unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()"));
3018
3057
3019
                if ($svgPropertyOrListPropertyType) {
3058
                if ($svgPropertyOrListPropertyType) {
3020
                    push(@implContent, "    $svgPropertyOrListPropertyType impl(*castedThis->wrapped());\n");
3059
                    push(@implContent, "    $svgPropertyOrListPropertyType impl(*thisObject->wrapped());\n");
3021
                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
3060
                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
3022
                } else {
3061
                } else {
3023
                    push(@implContent, "    auto& impl = castedThis->wrapped();\n");
3062
                    push(@implContent, "    auto& impl = thisObject->wrapped();\n");
3024
                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
3063
                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
3025
                }
3064
                }
3026
3065
3027
                push(@implContent, "    setDOMException(state, throwScope, ec);\n");
3066
                push(@implContent, "    setDOMException(state, throwScope, ec);\n");
3028
3067
3029
                push(@implContent, "    return JSValue::encode(result);\n");
3068
                push(@implContent, "    return result;\n");
3030
            }
3069
            }
3031
3070
3032
            push(@implContent, "}\n\n");
3071
            push(@implContent, "}\n\n");
3033
3072
3034
            push(@implContent, "#endif\n") if $attributeConditionalString;
3073
            push(@implContent, "#endif\n\n") if $attributeConditionalString;
3035
3036
            push(@implContent, "\n");
3037
        }
3074
        }
3038
3075
3039
        if (NeedsConstructorProperty($interface)) {
3076
        if (NeedsConstructorProperty($interface)) {
Lines 3533-3538 END a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec11
3533
3570
3534
    }
3571
    }
3535
3572
3573
    GenerateSerializerFunction($interface, $interfaceName, $className, $serializerFunctionName, $serializerNativeFunctionName) if $interface->serializable;
3574
3536
    if ($interface->iterable) {
3575
    if ($interface->iterable) {
3537
        GenerateImplementationIterableFunctions($interface);
3576
        GenerateImplementationIterableFunctions($interface);
3538
    }
3577
    }
Lines 3758-3763 END a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec12
3758
    push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
3797
    push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
3759
}
3798
}
3760
3799
3800
sub GenerateSerializerFunction
3801
{
3802
    my ($interface, $interfaceName, $className, $serializerFunctionName, $serializerNativeFunctionName) = @_;
3803
3804
    AddToImplIncludes("ObjectConstructor.h");
3805
    push(@implContent, "EncodedJSValue JSC_HOST_CALL ${serializerNativeFunctionName}(ExecState* state)\n");
3806
    push(@implContent, "{\n");
3807
    push(@implContent, "    ASSERT(state);\n");
3808
    push(@implContent, "    auto castedThis = jsDynamicCast<JS$interfaceName*>(state->thisValue());\n");
3809
    push(@implContent, "    VM& vm = state->vm();\n");
3810
    push(@implContent, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
3811
    push(@implContent, "    if (UNLIKELY(!castedThis)){\n");
3812
    push(@implContent, "        return throwThisTypeError(*state, throwScope, \"$interfaceName\", \"$serializerFunctionName\");\n");
3813
    push(@implContent, "    }\n");
3814
    push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n\n") unless $interfaceName eq "EventTarget";
3815
    push(@implContent, "    auto* result = constructEmptyObject(state);\n");
3816
    foreach my $attribute (@{$interface->attributes}) {
3817
        my $name = $attribute->signature->name;
3818
        if (grep $_ eq $name, @{$interface->serializable->attributes}) {
3819
            my $getFunctionName = GetAttributeGetterName($interface, $className, $attribute);
3820
            if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
3821
                push(@implContent, "    result->putDirect(vm, Identifier::fromString(&vm, \"${name}\"), ${getFunctionName}Getter(state, castedThis, throwScope));\n");
3822
            } else {
3823
                push(@implContent, "    result->putDirect(vm, Identifier::fromString(&vm, \"${name}\"), ${getFunctionName}Getter(state));\n");
3824
            }
3825
        }
3826
    }
3827
    push(@implContent, "    return JSValue::encode(result);\n");
3828
    push(@implContent, "}\n\n");
3829
}
3830
3761
sub GenerateFunctionCastedThis
3831
sub GenerateFunctionCastedThis
3762
{
3832
{
3763
    my ($interface, $className, $function, $shouldRejectPromise) = @_;
3833
    my ($interface, $className, $function, $shouldRejectPromise) = @_;
- a/Source/WebCore/bindings/scripts/IDLParser.pm -37 / +53 lines
Lines 60-65 struct( domInterface => { a/Source/WebCore/bindings/scripts/IDLParser.pm_sec1
60
    isCallback => '$', # Used for callback interfaces
60
    isCallback => '$', # Used for callback interfaces
61
    isPartial => '$', # Used for partial interfaces
61
    isPartial => '$', # Used for partial interfaces
62
    iterable => '$', # Used for iterable interfaces
62
    iterable => '$', # Used for iterable interfaces
63
    serializable => '$', # Used for serializable interfaces
63
});
64
});
64
65
65
# Used to represent domInterface contents (name of method, signature)
66
# Used to represent domInterface contents (name of method, signature)
Lines 375-380 my $nextAttributeOrOperationRest_1 = '^(\(|ByteString|DOMString|USVString|Date|a a/Source/WebCore/bindings/scripts/IDLParser.pm_sec2
375
my $nextUnsignedIntegerType_1 = '^(long|short)$';
376
my $nextUnsignedIntegerType_1 = '^(long|short)$';
376
my $nextDefaultValue_1 = '^(-|Infinity|NaN|false|null|true)$';
377
my $nextDefaultValue_1 = '^(-|Infinity|NaN|false|null|true)$';
377
378
379
# Used to represent serializable interface
380
struct( domSerializable => {
381
    attributes => '@', # List of attributes to serialize
382
});
378
383
379
sub parseDefinitions
384
sub parseDefinitions
380
{
385
{
Lines 1056-1062 sub parseSerializer a/Source/WebCore/bindings/scripts/IDLParser.pm_sec3
1056
    my $next = $self->nextToken();
1061
    my $next = $self->nextToken();
1057
    if ($next->value() eq "serializer") {
1062
    if ($next->value() eq "serializer") {
1058
        $self->assertTokenValue($self->getToken(), "serializer", __LINE__);
1063
        $self->assertTokenValue($self->getToken(), "serializer", __LINE__);
1059
        return $self->parseSerializerRest($extendedAttributeList);
1064
        my $next = $self->nextToken();
1065
        my $newDataNode;
1066
        if ($next->value() ne ";") {
1067
            $newDataNode = $self->parseSerializerRest($extendedAttributeList);
1068
            my $next = $self->nextToken();
1069
        } else {
1070
            $newDataNode = domSerializable->new();
1071
        }
1072
        $self->assertTokenValue($self->getToken(), ";", __LINE__);
1073
        return $newDataNode;
1060
    }
1074
    }
1061
    $self->assertUnexpectedToken($next->value(), __LINE__);
1075
    $self->assertUnexpectedToken($next->value(), __LINE__);
1062
}
1076
}
Lines 1069-1075 sub parseSerializerRest a/Source/WebCore/bindings/scripts/IDLParser.pm_sec4
1069
    my $next = $self->nextToken();
1083
    my $next = $self->nextToken();
1070
    if ($next->value() eq "=") {
1084
    if ($next->value() eq "=") {
1071
        $self->assertTokenValue($self->getToken(), "=", __LINE__);
1085
        $self->assertTokenValue($self->getToken(), "=", __LINE__);
1072
        return $self->parseSerializationPattern($extendedAttributeList);
1086
        my $attributes = $self->parseSerializationPattern();
1087
        my $newDataNode = domSerializable->new();
1088
        $newDataNode->attributes($attributes);
1089
        return $newDataNode;
1073
    }
1090
    }
1074
    if ($next->type() == IdentifierToken || $next->value() eq "(") {
1091
    if ($next->type() == IdentifierToken || $next->value() eq "(") {
1075
        return $self->parseOperationRest($extendedAttributeList);
1092
        return $self->parseOperationRest($extendedAttributeList);
Lines 1079-1137 sub parseSerializerRest a/Source/WebCore/bindings/scripts/IDLParser.pm_sec5
1079
sub parseSerializationPattern
1096
sub parseSerializationPattern
1080
{
1097
{
1081
    my $self = shift;
1098
    my $self = shift;
1082
    my $extendedAttributeList = shift;
1083
1099
1084
    my $next = $self->nextToken();
1100
    my $next = $self->nextToken();
1085
    if ($next->value() eq "{") {
1101
    if ($next->value() eq "{") {
1086
        $self->assertTokenValue($self->getToken(), "{", __LINE__);
1102
        $self->assertTokenValue($self->getToken(), "{", __LINE__);
1087
        $self->parseSerializationPatternMap();
1103
        my $attributes = $self->parseSerializationAttributes();
1088
        $self->assertTokenValue($self->getToken(), "}", __LINE__);
1104
        $self->assertTokenValue($self->getToken(), "}", __LINE__);
1089
        return;
1105
        return \@{$attributes};
1090
    }
1106
    }
1091
    if ($next->value() eq "[") {
1107
    if ($next->value() eq "[") {
1092
        $self->assertTokenValue($self->getToken(), "[", __LINE__);
1108
        die "Serialization of lists pattern is not currently supported.";
1093
        $self->parseSerializationPatternList();
1094
        $self->assertTokenValue($self->getToken(), "]", __LINE__);
1095
        return;
1096
    }
1109
    }
1097
    if ($next->type() == IdentifierToken) {
1110
    if ($next->type() == IdentifierToken) {
1098
        $self->assertTokenType($self->getToken(), IdentifierToken);
1111
        my @attributes = ();
1099
        return;
1112
        my $token = $self->getToken();
1113
        $self->assertTokenType($token, IdentifierToken);
1114
        push(@attributes, $token->value());
1115
        return \@attributes;
1100
    }
1116
    }
1101
    $self->assertUnexpectedToken($next->value(), __LINE__);
1117
    $self->assertUnexpectedToken($next->value(), __LINE__);
1102
}
1118
}
1103
1119
1104
sub parseSerializationPatternMap
1120
sub parseSerializationAttributes
1105
{
1121
{
1106
    my $self = shift;
1122
    my $self = shift;
1107
    my $next = $self->nextToken();
1123
    my $token = $self->getToken();
1108
    if ($next->value() eq "getter") {
1124
1109
        $self->assertTokenValue($self->getToken(), "getter", __LINE__);
1125
    if ($token->value() eq "getter") {
1110
        return;
1126
        die "Serializer getter keyword is not currently supported.";
1111
    }
1112
    if ($next->value() eq "inherit") {
1113
        $self->assertTokenValue($self->getToken(), "inherit", __LINE__);
1114
        $self->parseIdentifiers();
1115
        return;
1116
    }
1117
    if ($next->type() == IdentifierToken) {
1118
        $self->assertTokenType($self->getToken(), IdentifierToken);
1119
        $self->parseIdentifiers();
1120
    }
1121
}
1122
1127
1123
sub parseSerializationPatternList
1124
{
1125
    my $self = shift;
1126
    my $next = $self->nextToken();
1127
    if ($next->value() eq "getter") {
1128
        $self->assertTokenValue($self->getToken(), "getter", __LINE__);
1129
        return;
1130
    }
1128
    }
1131
    if ($next->type() == IdentifierToken) {
1129
    if ($token->value() eq "inherit") {
1132
        $self->assertTokenType($self->getToken(), IdentifierToken);
1130
        die "Serializer inherit keyword is not currently supported.";
1133
        $self->parseIdentifiers();
1134
    }
1131
    }
1132
1133
    my @attributes = ();
1134
    $self->assertTokenType($token, IdentifierToken);
1135
    push(@attributes, $token->value());
1136
    push(@attributes, @{$self->parseIdentifiers()});
1137
    return \@attributes;
1135
}
1138
}
1136
1139
1137
sub parseIdentifierList
1140
sub parseIdentifierList
Lines 2267-2272 sub applyMemberList a/Source/WebCore/bindings/scripts/IDLParser.pm_sec6
2267
            }
2270
            }
2268
            next;
2271
            next;
2269
        }
2272
        }
2273
        if (ref($item) eq "domSerializable") {
2274
            $interface->serializable($item);
2275
            next;
2276
        }
2277
    }
2278
2279
    if ($interface->serializable) {
2280
        my $numSerializerAttributes = @{$interface->serializable->attributes};
2281
        if ($numSerializerAttributes == 0) {
2282
            foreach my $attribute (@{$interface->attributes}) {
2283
                push(@{$interface->serializable->attributes}, $attribute->signature->name);
2284
            }
2285
        }
2270
    }
2286
    }
2271
}
2287
}
2272
2288
- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp -5 / +14 lines
Lines 140-145 void JSTestActiveDOMObject::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp_sec1
140
    thisObject->JSTestActiveDOMObject::~JSTestActiveDOMObject();
140
    thisObject->JSTestActiveDOMObject::~JSTestActiveDOMObject();
141
}
141
}
142
142
143
static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState*, JSTestActiveDOMObject*, ThrowScope& throwScope);
144
143
EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
145
EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
144
{
146
{
145
    VM& vm = state->vm();
147
    VM& vm = state->vm();
Lines 151-163 EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, EncodedJSValu a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp_sec2
151
    if (UNLIKELY(!castedThis)) {
153
    if (UNLIKELY(!castedThis)) {
152
        return throwGetterTypeError(*state, throwScope, "TestActiveDOMObject", "excitingAttr");
154
        return throwGetterTypeError(*state, throwScope, "TestActiveDOMObject", "excitingAttr");
153
    }
155
    }
154
    if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))
156
    return JSValue::encode(jsTestActiveDOMObjectExcitingAttrGetter(state, castedThis, throwScope));
155
        return JSValue::encode(jsUndefined());
156
    auto& impl = castedThis->wrapped();
157
    JSValue result = jsNumber(impl.excitingAttr());
158
    return JSValue::encode(result);
159
}
157
}
160
158
159
static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState* state, JSTestActiveDOMObject* thisObject, ThrowScope& throwScope)
160
{
161
    UNUSED_PARAM(thisObject);
162
    UNUSED_PARAM(throwScope);
163
    UNUSED_PARAM(state);
164
    if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))
165
        return jsUndefined();
166
    auto& impl = thisObject->wrapped();
167
    JSValue result = jsNumber(impl.excitingAttr());
168
    return result;
169
}
161
170
162
EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
171
EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
163
{
172
{
- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp -7 / +35 lines
Lines 178-183 void JSTestEventConstructor::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp_sec1
178
    thisObject->JSTestEventConstructor::~JSTestEventConstructor();
178
    thisObject->JSTestEventConstructor::~JSTestEventConstructor();
179
}
179
}
180
180
181
static inline JSValue jsTestEventConstructorAttr1Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
182
181
EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
183
EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
182
{
184
{
183
    VM& vm = state->vm();
185
    VM& vm = state->vm();
Lines 189-199 EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, EncodedJSValue this a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp_sec2
189
    if (UNLIKELY(!castedThis)) {
191
    if (UNLIKELY(!castedThis)) {
190
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr1");
192
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr1");
191
    }
193
    }
192
    auto& impl = castedThis->wrapped();
194
    return JSValue::encode(jsTestEventConstructorAttr1Getter(state, castedThis, throwScope));
195
}
196
197
static inline JSValue jsTestEventConstructorAttr1Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
198
{
199
    UNUSED_PARAM(thisObject);
200
    UNUSED_PARAM(throwScope);
201
    UNUSED_PARAM(state);
202
    auto& impl = thisObject->wrapped();
193
    JSValue result = jsStringWithCache(state, impl.attr1());
203
    JSValue result = jsStringWithCache(state, impl.attr1());
194
    return JSValue::encode(result);
204
    return result;
195
}
205
}
196
206
207
static inline JSValue jsTestEventConstructorAttr2Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
197
208
198
EncodedJSValue jsTestEventConstructorAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
209
EncodedJSValue jsTestEventConstructorAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
199
{
210
{
Lines 206-218 EncodedJSValue jsTestEventConstructorAttr2(ExecState* state, EncodedJSValue this a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp_sec3
206
    if (UNLIKELY(!castedThis)) {
217
    if (UNLIKELY(!castedThis)) {
207
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr2");
218
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr2");
208
    }
219
    }
209
    auto& impl = castedThis->wrapped();
220
    return JSValue::encode(jsTestEventConstructorAttr2Getter(state, castedThis, throwScope));
210
    JSValue result = jsStringWithCache(state, impl.attr2());
211
    return JSValue::encode(result);
212
}
221
}
213
222
223
static inline JSValue jsTestEventConstructorAttr2Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
224
{
225
    UNUSED_PARAM(thisObject);
226
    UNUSED_PARAM(throwScope);
227
    UNUSED_PARAM(state);
228
    auto& impl = thisObject->wrapped();
229
    JSValue result = jsStringWithCache(state, impl.attr2());
230
    return result;
231
}
214
232
215
#if ENABLE(SPECIAL_EVENT)
233
#if ENABLE(SPECIAL_EVENT)
234
static inline JSValue jsTestEventConstructorAttr3Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
235
216
EncodedJSValue jsTestEventConstructorAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
236
EncodedJSValue jsTestEventConstructorAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
217
{
237
{
218
    VM& vm = state->vm();
238
    VM& vm = state->vm();
Lines 224-232 EncodedJSValue jsTestEventConstructorAttr3(ExecState* state, EncodedJSValue this a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp_sec4
224
    if (UNLIKELY(!castedThis)) {
244
    if (UNLIKELY(!castedThis)) {
225
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr3");
245
        return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr3");
226
    }
246
    }
227
    auto& impl = castedThis->wrapped();
247
    return JSValue::encode(jsTestEventConstructorAttr3Getter(state, castedThis, throwScope));
248
}
249
250
static inline JSValue jsTestEventConstructorAttr3Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
251
{
252
    UNUSED_PARAM(thisObject);
253
    UNUSED_PARAM(throwScope);
254
    UNUSED_PARAM(state);
255
    auto& impl = thisObject->wrapped();
228
    JSValue result = jsStringWithCache(state, impl.attr3());
256
    JSValue result = jsStringWithCache(state, impl.attr3());
229
    return JSValue::encode(result);
257
    return result;
230
}
258
}
231
259
232
#endif
260
#endif
- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp -3 / +12 lines
Lines 132-137 void JSTestException::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp_sec1
132
    thisObject->JSTestException::~JSTestException();
132
    thisObject->JSTestException::~JSTestException();
133
}
133
}
134
134
135
static inline JSValue jsTestExceptionNameGetter(ExecState*, JSTestException*, ThrowScope& throwScope);
136
135
EncodedJSValue jsTestExceptionName(ExecState* state, EncodedJSValue thisValue, PropertyName)
137
EncodedJSValue jsTestExceptionName(ExecState* state, EncodedJSValue thisValue, PropertyName)
136
{
138
{
137
    VM& vm = state->vm();
139
    VM& vm = state->vm();
Lines 143-153 EncodedJSValue jsTestExceptionName(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp_sec2
143
    if (UNLIKELY(!castedThis)) {
145
    if (UNLIKELY(!castedThis)) {
144
        return throwGetterTypeError(*state, throwScope, "TestException", "name");
146
        return throwGetterTypeError(*state, throwScope, "TestException", "name");
145
    }
147
    }
146
    auto& impl = castedThis->wrapped();
148
    return JSValue::encode(jsTestExceptionNameGetter(state, castedThis, throwScope));
147
    JSValue result = jsStringWithCache(state, impl.name());
148
    return JSValue::encode(result);
149
}
149
}
150
150
151
static inline JSValue jsTestExceptionNameGetter(ExecState* state, JSTestException* thisObject, ThrowScope& throwScope)
152
{
153
    UNUSED_PARAM(thisObject);
154
    UNUSED_PARAM(throwScope);
155
    UNUSED_PARAM(state);
156
    auto& impl = thisObject->wrapped();
157
    JSValue result = jsStringWithCache(state, impl.name());
158
    return result;
159
}
151
160
152
EncodedJSValue jsTestExceptionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
161
EncodedJSValue jsTestExceptionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
153
{
162
{
- a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp -9 / +47 lines
Lines 177-182 void JSTestGlobalObject::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp_sec1
177
    thisObject->JSTestGlobalObject::~JSTestGlobalObject();
177
    thisObject->JSTestGlobalObject::~JSTestGlobalObject();
178
}
178
}
179
179
180
static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
181
180
EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
182
EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
181
{
183
{
182
    VM& vm = state->vm();
184
    VM& vm = state->vm();
Lines 188-198 EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSVal a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp_sec2
188
    if (UNLIKELY(!castedThis)) {
190
    if (UNLIKELY(!castedThis)) {
189
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "regularAttribute");
191
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "regularAttribute");
190
    }
192
    }
191
    auto& impl = castedThis->wrapped();
193
    return JSValue::encode(jsTestGlobalObjectRegularAttributeGetter(state, castedThis, throwScope));
194
}
195
196
static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
197
{
198
    UNUSED_PARAM(thisObject);
199
    UNUSED_PARAM(throwScope);
200
    UNUSED_PARAM(state);
201
    auto& impl = thisObject->wrapped();
192
    JSValue result = jsStringWithCache(state, impl.regularAttribute());
202
    JSValue result = jsStringWithCache(state, impl.regularAttribute());
193
    return JSValue::encode(result);
203
    return result;
194
}
204
}
195
205
206
static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
196
207
197
EncodedJSValue jsTestGlobalObjectPublicAndPrivateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
208
EncodedJSValue jsTestGlobalObjectPublicAndPrivateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
198
{
209
{
Lines 205-217 EncodedJSValue jsTestGlobalObjectPublicAndPrivateAttribute(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp_sec3
205
    if (UNLIKELY(!castedThis)) {
216
    if (UNLIKELY(!castedThis)) {
206
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateAttribute");
217
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateAttribute");
207
    }
218
    }
208
    auto& impl = castedThis->wrapped();
219
    return JSValue::encode(jsTestGlobalObjectPublicAndPrivateAttributeGetter(state, castedThis, throwScope));
209
    JSValue result = jsStringWithCache(state, impl.publicAndPrivateAttribute());
210
    return JSValue::encode(result);
211
}
220
}
212
221
222
static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
223
{
224
    UNUSED_PARAM(thisObject);
225
    UNUSED_PARAM(throwScope);
226
    UNUSED_PARAM(state);
227
    auto& impl = thisObject->wrapped();
228
    JSValue result = jsStringWithCache(state, impl.publicAndPrivateAttribute());
229
    return result;
230
}
213
231
214
#if ENABLE(TEST_FEATURE)
232
#if ENABLE(TEST_FEATURE)
233
static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
234
215
EncodedJSValue jsTestGlobalObjectPublicAndPrivateConditionalAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
235
EncodedJSValue jsTestGlobalObjectPublicAndPrivateConditionalAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
216
{
236
{
217
    VM& vm = state->vm();
237
    VM& vm = state->vm();
Lines 223-236 EncodedJSValue jsTestGlobalObjectPublicAndPrivateConditionalAttribute(ExecState* a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp_sec4
223
    if (UNLIKELY(!castedThis)) {
243
    if (UNLIKELY(!castedThis)) {
224
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateConditionalAttribute");
244
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateConditionalAttribute");
225
    }
245
    }
226
    auto& impl = castedThis->wrapped();
246
    return JSValue::encode(jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(state, castedThis, throwScope));
247
}
248
249
static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
250
{
251
    UNUSED_PARAM(thisObject);
252
    UNUSED_PARAM(throwScope);
253
    UNUSED_PARAM(state);
254
    auto& impl = thisObject->wrapped();
227
    JSValue result = jsStringWithCache(state, impl.publicAndPrivateConditionalAttribute());
255
    JSValue result = jsStringWithCache(state, impl.publicAndPrivateConditionalAttribute());
228
    return JSValue::encode(result);
256
    return result;
229
}
257
}
230
258
231
#endif
259
#endif
232
260
233
#if ENABLE(TEST_FEATURE)
261
#if ENABLE(TEST_FEATURE)
262
static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
263
234
EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
264
EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
235
{
265
{
236
    VM& vm = state->vm();
266
    VM& vm = state->vm();
Lines 242-250 EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp_sec5
242
    if (UNLIKELY(!castedThis)) {
272
    if (UNLIKELY(!castedThis)) {
243
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeAttribute");
273
        return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeAttribute");
244
    }
274
    }
245
    auto& impl = castedThis->wrapped();
275
    return JSValue::encode(jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(state, castedThis, throwScope));
276
}
277
278
static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
279
{
280
    UNUSED_PARAM(thisObject);
281
    UNUSED_PARAM(throwScope);
282
    UNUSED_PARAM(state);
283
    auto& impl = thisObject->wrapped();
246
    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
284
    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
247
    return JSValue::encode(result);
285
    return result;
248
}
286
}
249
287
250
#endif
288
#endif
- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp -20 / +132 lines
Lines 411-442 void JSTestInterface::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec1
411
}
411
}
412
412
413
#if ENABLE(Condition22) || ENABLE(Condition23)
413
#if ENABLE(Condition22) || ENABLE(Condition23)
414
static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState*);
415
414
EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
416
EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
415
{
417
{
416
    VM& vm = state->vm();
418
    VM& vm = state->vm();
417
    auto throwScope = DECLARE_THROW_SCOPE(vm);
419
    auto throwScope = DECLARE_THROW_SCOPE(vm);
418
    UNUSED_PARAM(throwScope);
420
    UNUSED_PARAM(throwScope);
419
    UNUSED_PARAM(thisValue);
421
    UNUSED_PARAM(thisValue);
422
    return JSValue::encode(jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(state));
423
}
424
425
static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState* state)
426
{
427
    UNUSED_PARAM(state);
420
    JSValue result = jsNumber(TestInterface::implementsStaticReadOnlyAttr());
428
    JSValue result = jsNumber(TestInterface::implementsStaticReadOnlyAttr());
421
    return JSValue::encode(result);
429
    return result;
422
}
430
}
423
431
424
#endif
432
#endif
425
433
426
#if ENABLE(Condition22) || ENABLE(Condition23)
434
#if ENABLE(Condition22) || ENABLE(Condition23)
435
static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState*);
436
427
EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
437
EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
428
{
438
{
429
    VM& vm = state->vm();
439
    VM& vm = state->vm();
430
    auto throwScope = DECLARE_THROW_SCOPE(vm);
440
    auto throwScope = DECLARE_THROW_SCOPE(vm);
431
    UNUSED_PARAM(throwScope);
441
    UNUSED_PARAM(throwScope);
432
    UNUSED_PARAM(thisValue);
442
    UNUSED_PARAM(thisValue);
443
    return JSValue::encode(jsTestInterfaceConstructorImplementsStaticAttrGetter(state));
444
}
445
446
static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState* state)
447
{
448
    UNUSED_PARAM(state);
433
    JSValue result = jsStringWithCache(state, TestInterface::implementsStaticAttr());
449
    JSValue result = jsStringWithCache(state, TestInterface::implementsStaticAttr());
434
    return JSValue::encode(result);
450
    return result;
435
}
451
}
436
452
437
#endif
453
#endif
438
454
439
#if ENABLE(Condition22) || ENABLE(Condition23)
455
#if ENABLE(Condition22) || ENABLE(Condition23)
456
static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
457
440
EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
458
EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
441
{
459
{
442
    VM& vm = state->vm();
460
    VM& vm = state->vm();
Lines 448-461 EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec2
448
    if (UNLIKELY(!castedThis)) {
466
    if (UNLIKELY(!castedThis)) {
449
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr1");
467
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr1");
450
    }
468
    }
451
    auto& impl = castedThis->wrapped();
469
    return JSValue::encode(jsTestInterfaceImplementsStr1Getter(state, castedThis, throwScope));
470
}
471
472
static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
473
{
474
    UNUSED_PARAM(thisObject);
475
    UNUSED_PARAM(throwScope);
476
    UNUSED_PARAM(state);
477
    auto& impl = thisObject->wrapped();
452
    JSValue result = jsStringWithCache(state, impl.implementsStr1());
478
    JSValue result = jsStringWithCache(state, impl.implementsStr1());
453
    return JSValue::encode(result);
479
    return result;
454
}
480
}
455
481
456
#endif
482
#endif
457
483
458
#if ENABLE(Condition22) || ENABLE(Condition23)
484
#if ENABLE(Condition22) || ENABLE(Condition23)
485
static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
486
459
EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
487
EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
460
{
488
{
461
    VM& vm = state->vm();
489
    VM& vm = state->vm();
Lines 467-480 EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec3
467
    if (UNLIKELY(!castedThis)) {
495
    if (UNLIKELY(!castedThis)) {
468
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr2");
496
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr2");
469
    }
497
    }
470
    auto& impl = castedThis->wrapped();
498
    return JSValue::encode(jsTestInterfaceImplementsStr2Getter(state, castedThis, throwScope));
499
}
500
501
static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
502
{
503
    UNUSED_PARAM(thisObject);
504
    UNUSED_PARAM(throwScope);
505
    UNUSED_PARAM(state);
506
    auto& impl = thisObject->wrapped();
471
    JSValue result = jsStringWithCache(state, impl.implementsStr2());
507
    JSValue result = jsStringWithCache(state, impl.implementsStr2());
472
    return JSValue::encode(result);
508
    return result;
473
}
509
}
474
510
475
#endif
511
#endif
476
512
477
#if ENABLE(Condition22) || ENABLE(Condition23)
513
#if ENABLE(Condition22) || ENABLE(Condition23)
514
static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
515
478
EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
516
EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
479
{
517
{
480
    VM& vm = state->vm();
518
    VM& vm = state->vm();
Lines 486-497 EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec4
486
    if (UNLIKELY(!castedThis)) {
524
    if (UNLIKELY(!castedThis)) {
487
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr3");
525
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr3");
488
    }
526
    }
489
    return JSValue::encode(castedThis->implementsStr3(*state));
527
    return JSValue::encode(jsTestInterfaceImplementsStr3Getter(state, castedThis, throwScope));
528
}
529
530
static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
531
{
532
    UNUSED_PARAM(thisObject);
533
    UNUSED_PARAM(throwScope);
534
    UNUSED_PARAM(state);
535
    return thisObject->implementsStr3(*state);
490
}
536
}
491
537
492
#endif
538
#endif
493
539
494
#if ENABLE(Condition22) || ENABLE(Condition23)
540
#if ENABLE(Condition22) || ENABLE(Condition23)
541
static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
542
495
EncodedJSValue jsTestInterfaceImplementsNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
543
EncodedJSValue jsTestInterfaceImplementsNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
496
{
544
{
497
    VM& vm = state->vm();
545
    VM& vm = state->vm();
Lines 503-542 EncodedJSValue jsTestInterfaceImplementsNode(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec5
503
    if (UNLIKELY(!castedThis)) {
551
    if (UNLIKELY(!castedThis)) {
504
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsNode");
552
        return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsNode");
505
    }
553
    }
506
    auto& impl = castedThis->wrapped();
554
    return JSValue::encode(jsTestInterfaceImplementsNodeGetter(state, castedThis, throwScope));
507
    JSValue result = toJS(state, castedThis->globalObject(), impl.implementsNode());
555
}
508
    return JSValue::encode(result);
556
557
static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
558
{
559
    UNUSED_PARAM(thisObject);
560
    UNUSED_PARAM(throwScope);
561
    UNUSED_PARAM(state);
562
    auto& impl = thisObject->wrapped();
563
    JSValue result = toJS(state, thisObject->globalObject(), impl.implementsNode());
564
    return result;
509
}
565
}
510
566
511
#endif
567
#endif
512
568
513
#if ENABLE(Condition11) || ENABLE(Condition12)
569
#if ENABLE(Condition11) || ENABLE(Condition12)
570
static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState*);
571
514
EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
572
EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
515
{
573
{
516
    VM& vm = state->vm();
574
    VM& vm = state->vm();
517
    auto throwScope = DECLARE_THROW_SCOPE(vm);
575
    auto throwScope = DECLARE_THROW_SCOPE(vm);
518
    UNUSED_PARAM(throwScope);
576
    UNUSED_PARAM(throwScope);
519
    UNUSED_PARAM(thisValue);
577
    UNUSED_PARAM(thisValue);
578
    return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(state));
579
}
580
581
static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState* state)
582
{
583
    UNUSED_PARAM(state);
520
    JSValue result = jsNumber(WebCore::TestSupplemental::supplementalStaticReadOnlyAttr());
584
    JSValue result = jsNumber(WebCore::TestSupplemental::supplementalStaticReadOnlyAttr());
521
    return JSValue::encode(result);
585
    return result;
522
}
586
}
523
587
524
#endif
588
#endif
525
589
526
#if ENABLE(Condition11) || ENABLE(Condition12)
590
#if ENABLE(Condition11) || ENABLE(Condition12)
591
static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState*);
592
527
EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
593
EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
528
{
594
{
529
    VM& vm = state->vm();
595
    VM& vm = state->vm();
530
    auto throwScope = DECLARE_THROW_SCOPE(vm);
596
    auto throwScope = DECLARE_THROW_SCOPE(vm);
531
    UNUSED_PARAM(throwScope);
597
    UNUSED_PARAM(throwScope);
532
    UNUSED_PARAM(thisValue);
598
    UNUSED_PARAM(thisValue);
599
    return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticAttrGetter(state));
600
}
601
602
static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState* state)
603
{
604
    UNUSED_PARAM(state);
533
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStaticAttr());
605
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStaticAttr());
534
    return JSValue::encode(result);
606
    return result;
535
}
607
}
536
608
537
#endif
609
#endif
538
610
539
#if ENABLE(Condition11) || ENABLE(Condition12)
611
#if ENABLE(Condition11) || ENABLE(Condition12)
612
static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
613
540
EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
614
EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
541
{
615
{
542
    VM& vm = state->vm();
616
    VM& vm = state->vm();
Lines 548-561 EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec6
548
    if (UNLIKELY(!castedThis)) {
622
    if (UNLIKELY(!castedThis)) {
549
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr1");
623
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr1");
550
    }
624
    }
551
    auto& impl = castedThis->wrapped();
625
    return JSValue::encode(jsTestInterfaceSupplementalStr1Getter(state, castedThis, throwScope));
626
}
627
628
static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
629
{
630
    UNUSED_PARAM(thisObject);
631
    UNUSED_PARAM(throwScope);
632
    UNUSED_PARAM(state);
633
    auto& impl = thisObject->wrapped();
552
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(impl));
634
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(impl));
553
    return JSValue::encode(result);
635
    return result;
554
}
636
}
555
637
556
#endif
638
#endif
557
639
558
#if ENABLE(Condition11) || ENABLE(Condition12)
640
#if ENABLE(Condition11) || ENABLE(Condition12)
641
static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
642
559
EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
643
EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
560
{
644
{
561
    VM& vm = state->vm();
645
    VM& vm = state->vm();
Lines 567-580 EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec7
567
    if (UNLIKELY(!castedThis)) {
651
    if (UNLIKELY(!castedThis)) {
568
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr2");
652
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr2");
569
    }
653
    }
570
    auto& impl = castedThis->wrapped();
654
    return JSValue::encode(jsTestInterfaceSupplementalStr2Getter(state, castedThis, throwScope));
655
}
656
657
static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
658
{
659
    UNUSED_PARAM(thisObject);
660
    UNUSED_PARAM(throwScope);
661
    UNUSED_PARAM(state);
662
    auto& impl = thisObject->wrapped();
571
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(impl));
663
    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(impl));
572
    return JSValue::encode(result);
664
    return result;
573
}
665
}
574
666
575
#endif
667
#endif
576
668
577
#if ENABLE(Condition11) || ENABLE(Condition12)
669
#if ENABLE(Condition11) || ENABLE(Condition12)
670
static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
671
578
EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
672
EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
579
{
673
{
580
    VM& vm = state->vm();
674
    VM& vm = state->vm();
Lines 586-597 EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec8
586
    if (UNLIKELY(!castedThis)) {
680
    if (UNLIKELY(!castedThis)) {
587
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr3");
681
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr3");
588
    }
682
    }
589
    return JSValue::encode(castedThis->supplementalStr3(*state));
683
    return JSValue::encode(jsTestInterfaceSupplementalStr3Getter(state, castedThis, throwScope));
684
}
685
686
static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
687
{
688
    UNUSED_PARAM(thisObject);
689
    UNUSED_PARAM(throwScope);
690
    UNUSED_PARAM(state);
691
    return thisObject->supplementalStr3(*state);
590
}
692
}
591
693
592
#endif
694
#endif
593
695
594
#if ENABLE(Condition11) || ENABLE(Condition12)
696
#if ENABLE(Condition11) || ENABLE(Condition12)
697
static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
698
595
EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
699
EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
596
{
700
{
597
    VM& vm = state->vm();
701
    VM& vm = state->vm();
Lines 603-611 EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec9
603
    if (UNLIKELY(!castedThis)) {
707
    if (UNLIKELY(!castedThis)) {
604
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalNode");
708
        return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalNode");
605
    }
709
    }
606
    auto& impl = castedThis->wrapped();
710
    return JSValue::encode(jsTestInterfaceSupplementalNodeGetter(state, castedThis, throwScope));
607
    JSValue result = toJS(state, castedThis->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
711
}
608
    return JSValue::encode(result);
712
713
static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
714
{
715
    UNUSED_PARAM(thisObject);
716
    UNUSED_PARAM(throwScope);
717
    UNUSED_PARAM(state);
718
    auto& impl = thisObject->wrapped();
719
    JSValue result = toJS(state, thisObject->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
720
    return result;
609
}
721
}
610
722
611
#endif
723
#endif
- a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp -2 / +20 lines
Lines 132-137 void JSTestJSBuiltinConstructor::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp_sec1
132
    thisObject->JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor();
132
    thisObject->JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor();
133
}
133
}
134
134
135
static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
136
135
EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
137
EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
136
{
138
{
137
    VM& vm = state->vm();
139
    VM& vm = state->vm();
Lines 143-151 EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, E a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp_sec2
143
    if (UNLIKELY(!castedThis)) {
145
    if (UNLIKELY(!castedThis)) {
144
        return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeCustom");
146
        return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeCustom");
145
    }
147
    }
146
    return JSValue::encode(castedThis->testAttributeCustom(*state));
148
    return JSValue::encode(jsTestJSBuiltinConstructorTestAttributeCustomGetter(state, castedThis, throwScope));
149
}
150
151
static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
152
{
153
    UNUSED_PARAM(thisObject);
154
    UNUSED_PARAM(throwScope);
155
    UNUSED_PARAM(state);
156
    return thisObject->testAttributeCustom(*state);
147
}
157
}
148
158
159
static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
149
160
150
EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
161
EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
151
{
162
{
Lines 158-166 EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp_sec3
158
    if (UNLIKELY(!castedThis)) {
169
    if (UNLIKELY(!castedThis)) {
159
        return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeRWCustom");
170
        return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeRWCustom");
160
    }
171
    }
161
    return JSValue::encode(castedThis->testAttributeRWCustom(*state));
172
    return JSValue::encode(jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(state, castedThis, throwScope));
162
}
173
}
163
174
175
static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
176
{
177
    UNUSED_PARAM(thisObject);
178
    UNUSED_PARAM(throwScope);
179
    UNUSED_PARAM(state);
180
    return thisObject->testAttributeRWCustom(*state);
181
}
164
182
165
EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
183
EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
166
{
184
{
- a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp -3 / +32 lines
Lines 26-31 a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec1
26
#include "JSDOMConstructor.h"
26
#include "JSDOMConstructor.h"
27
#include "JSDOMIterator.h"
27
#include "JSDOMIterator.h"
28
#include "JSDOMPromise.h"
28
#include "JSDOMPromise.h"
29
#include "ObjectConstructor.h"
29
#include "RuntimeEnabledFeatures.h"
30
#include "RuntimeEnabledFeatures.h"
30
#include "URL.h"
31
#include "URL.h"
31
#include <runtime/Error.h>
32
#include <runtime/Error.h>
Lines 52-57 bool setJSTestNodeName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec2
52
JSC::EncodedJSValue jsTestNodeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
53
JSC::EncodedJSValue jsTestNodeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
53
bool setJSTestNodeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
54
bool setJSTestNodeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
54
55
56
EncodedJSValue JSC_HOST_CALL jsTestNodePrototypeFunctionToJSON(ExecState*);
57
55
class JSTestNodePrototype : public JSC::JSNonFinalObject {
58
class JSTestNodePrototype : public JSC::JSNonFinalObject {
56
public:
59
public:
57
    typedef JSC::JSNonFinalObject Base;
60
    typedef JSC::JSNonFinalObject Base;
Lines 115-120 static const HashTableValue JSTestNodePrototypeTableValues[] = a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec3
115
    { "keys", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionKeys), (intptr_t) (0) } },
118
    { "keys", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionKeys), (intptr_t) (0) } },
116
    { "values", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionValues), (intptr_t) (0) } },
119
    { "values", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionValues), (intptr_t) (0) } },
117
    { "forEach", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionForEach), (intptr_t) (1) } },
120
    { "forEach", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionForEach), (intptr_t) (1) } },
121
    { "toJSON", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNodePrototypeFunctionToJSON), (intptr_t) (0) } },
118
};
122
};
119
123
120
const ClassInfo JSTestNodePrototype::s_info = { "TestNodePrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNodePrototype) };
124
const ClassInfo JSTestNodePrototype::s_info = { "TestNodePrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNodePrototype) };
Lines 165-170 JSObject* JSTestNode::prototype(VM& vm, JSGlobalObject* globalObject) a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec4
165
    return getDOMPrototype<JSTestNode>(vm, globalObject);
169
    return getDOMPrototype<JSTestNode>(vm, globalObject);
166
}
170
}
167
171
172
static inline JSValue jsTestNodeNameGetter(ExecState*, JSTestNode*, ThrowScope& throwScope);
173
168
EncodedJSValue jsTestNodeName(ExecState* state, EncodedJSValue thisValue, PropertyName)
174
EncodedJSValue jsTestNodeName(ExecState* state, EncodedJSValue thisValue, PropertyName)
169
{
175
{
170
    VM& vm = state->vm();
176
    VM& vm = state->vm();
Lines 176-186 EncodedJSValue jsTestNodeName(ExecState* state, EncodedJSValue thisValue, Proper a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec5
176
    if (UNLIKELY(!castedThis)) {
182
    if (UNLIKELY(!castedThis)) {
177
        return throwGetterTypeError(*state, throwScope, "TestNode", "name");
183
        return throwGetterTypeError(*state, throwScope, "TestNode", "name");
178
    }
184
    }
179
    auto& impl = castedThis->wrapped();
185
    return JSValue::encode(jsTestNodeNameGetter(state, castedThis, throwScope));
180
    JSValue result = jsStringWithCache(state, impl.name());
181
    return JSValue::encode(result);
182
}
186
}
183
187
188
static inline JSValue jsTestNodeNameGetter(ExecState* state, JSTestNode* thisObject, ThrowScope& throwScope)
189
{
190
    UNUSED_PARAM(thisObject);
191
    UNUSED_PARAM(throwScope);
192
    UNUSED_PARAM(state);
193
    auto& impl = thisObject->wrapped();
194
    JSValue result = jsStringWithCache(state, impl.name());
195
    return result;
196
}
184
197
185
EncodedJSValue jsTestNodeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
198
EncodedJSValue jsTestNodeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
186
{
199
{
Lines 253-258 static inline EncodedJSValue jsTestNodePrototypeFunctionTestWorkerPromisePromise a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp_sec6
253
    return JSValue::encode(jsUndefined());
266
    return JSValue::encode(jsUndefined());
254
}
267
}
255
268
269
EncodedJSValue JSC_HOST_CALL jsTestNodePrototypeFunctionToJSON(ExecState* state)
270
{
271
    ASSERT(state);
272
    auto castedThis = jsDynamicCast<JSTestNode*>(state->thisValue());
273
    VM& vm = state->vm();
274
    auto throwScope = DECLARE_THROW_SCOPE(vm);
275
    if (UNLIKELY(!castedThis)){
276
        return throwThisTypeError(*state, throwScope, "TestNode", "toJSON");
277
    }
278
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNode::info());
279
280
    auto* result = constructEmptyObject(state);
281
    result->putDirect(vm, Identifier::fromString(&vm, "name"), jsTestNodeNameGetter(state, castedThis, throwScope));
282
    return JSValue::encode(result);
283
}
284
256
using TestNodeIterator = JSDOMIterator<JSTestNode>;
285
using TestNodeIterator = JSDOMIterator<JSTestNode>;
257
using TestNodeIteratorPrototype = JSDOMIteratorPrototype<JSTestNode>;
286
using TestNodeIteratorPrototype = JSDOMIteratorPrototype<JSTestNode>;
258
287
- a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp -26 / +71 lines
Lines 144-149 void JSTestNondeterministic::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec1
144
    thisObject->JSTestNondeterministic::~JSTestNondeterministic();
144
    thisObject->JSTestNondeterministic::~JSTestNondeterministic();
145
}
145
}
146
146
147
static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
148
147
EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
149
EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
148
{
150
{
149
    VM& vm = state->vm();
151
    VM& vm = state->vm();
Lines 155-169 EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* sta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec2
155
    if (UNLIKELY(!castedThis)) {
157
    if (UNLIKELY(!castedThis)) {
156
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicReadonlyAttr");
158
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicReadonlyAttr");
157
    }
159
    }
160
    return JSValue::encode(jsTestNondeterministicNondeterministicReadonlyAttrGetter(state, castedThis, throwScope));
161
}
162
163
static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
164
{
165
    UNUSED_PARAM(thisObject);
166
    UNUSED_PARAM(throwScope);
167
    UNUSED_PARAM(state);
158
#if ENABLE(WEB_REPLAY)
168
#if ENABLE(WEB_REPLAY)
159
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
169
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
160
    InputCursor& cursor = globalObject->inputCursor();
170
    InputCursor& cursor = globalObject->inputCursor();
161
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicReadonlyAttr", AtomicString::ConstructFromLiteral);
171
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicReadonlyAttr", AtomicString::ConstructFromLiteral);
162
    if (cursor.isCapturing()) {
172
    if (cursor.isCapturing()) {
163
        int32_t memoizedResult = castedThis->wrapped().nondeterministicReadonlyAttr();
173
        int32_t memoizedResult = thisObject->wrapped().nondeterministicReadonlyAttr();
164
        cursor.appendInput<MemoizedDOMResult<int32_t>>(bindingName.get().string(), memoizedResult, 0);
174
        cursor.appendInput<MemoizedDOMResult<int32_t>>(bindingName.get().string(), memoizedResult, 0);
165
        JSValue result = jsNumber(memoizedResult);
175
        JSValue result = jsNumber(memoizedResult);
166
        return JSValue::encode(result);
176
        return result;
167
    }
177
    }
168
178
169
    if (cursor.isReplaying()) {
179
    if (cursor.isReplaying()) {
Lines 171-185 EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* sta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec3
171
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
181
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
172
        if (input && input->convertTo<int32_t>(memoizedResult)) {
182
        if (input && input->convertTo<int32_t>(memoizedResult)) {
173
            JSValue result = jsNumber(memoizedResult);
183
            JSValue result = jsNumber(memoizedResult);
174
            return JSValue::encode(result);
184
            return result;
175
        }
185
        }
176
    }
186
    }
177
#endif
187
#endif
178
    auto& impl = castedThis->wrapped();
188
    auto& impl = thisObject->wrapped();
179
    JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
189
    JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
180
    return JSValue::encode(result);
190
    return result;
181
}
191
}
182
192
193
static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
183
194
184
EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
195
EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
185
{
196
{
Lines 192-206 EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* st a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec4
192
    if (UNLIKELY(!castedThis)) {
203
    if (UNLIKELY(!castedThis)) {
193
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicWriteableAttr");
204
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicWriteableAttr");
194
    }
205
    }
206
    return JSValue::encode(jsTestNondeterministicNondeterministicWriteableAttrGetter(state, castedThis, throwScope));
207
}
208
209
static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
210
{
211
    UNUSED_PARAM(thisObject);
212
    UNUSED_PARAM(throwScope);
213
    UNUSED_PARAM(state);
195
#if ENABLE(WEB_REPLAY)
214
#if ENABLE(WEB_REPLAY)
196
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
215
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
197
    InputCursor& cursor = globalObject->inputCursor();
216
    InputCursor& cursor = globalObject->inputCursor();
198
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicWriteableAttr", AtomicString::ConstructFromLiteral);
217
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicWriteableAttr", AtomicString::ConstructFromLiteral);
199
    if (cursor.isCapturing()) {
218
    if (cursor.isCapturing()) {
200
        String memoizedResult = castedThis->wrapped().nondeterministicWriteableAttr();
219
        String memoizedResult = thisObject->wrapped().nondeterministicWriteableAttr();
201
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
220
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
202
        JSValue result = jsStringWithCache(state, memoizedResult);
221
        JSValue result = jsStringWithCache(state, memoizedResult);
203
        return JSValue::encode(result);
222
        return result;
204
    }
223
    }
205
224
206
    if (cursor.isReplaying()) {
225
    if (cursor.isReplaying()) {
Lines 208-222 EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* st a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec5
208
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
227
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
209
        if (input && input->convertTo<String>(memoizedResult)) {
228
        if (input && input->convertTo<String>(memoizedResult)) {
210
            JSValue result = jsStringWithCache(state, memoizedResult);
229
            JSValue result = jsStringWithCache(state, memoizedResult);
211
            return JSValue::encode(result);
230
            return result;
212
        }
231
        }
213
    }
232
    }
214
#endif
233
#endif
215
    auto& impl = castedThis->wrapped();
234
    auto& impl = thisObject->wrapped();
216
    JSValue result = jsStringWithCache(state, impl.nondeterministicWriteableAttr());
235
    JSValue result = jsStringWithCache(state, impl.nondeterministicWriteableAttr());
217
    return JSValue::encode(result);
236
    return result;
218
}
237
}
219
238
239
static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
220
240
221
EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
241
EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
222
{
242
{
Lines 229-243 EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* st a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec6
229
    if (UNLIKELY(!castedThis)) {
249
    if (UNLIKELY(!castedThis)) {
230
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicExceptionAttr");
250
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicExceptionAttr");
231
    }
251
    }
252
    return JSValue::encode(jsTestNondeterministicNondeterministicExceptionAttrGetter(state, castedThis, throwScope));
253
}
254
255
static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
256
{
257
    UNUSED_PARAM(thisObject);
258
    UNUSED_PARAM(throwScope);
259
    UNUSED_PARAM(state);
232
#if ENABLE(WEB_REPLAY)
260
#if ENABLE(WEB_REPLAY)
233
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
261
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
234
    InputCursor& cursor = globalObject->inputCursor();
262
    InputCursor& cursor = globalObject->inputCursor();
235
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicExceptionAttr", AtomicString::ConstructFromLiteral);
263
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicExceptionAttr", AtomicString::ConstructFromLiteral);
236
    if (cursor.isCapturing()) {
264
    if (cursor.isCapturing()) {
237
        String memoizedResult = castedThis->wrapped().nondeterministicExceptionAttr();
265
        String memoizedResult = thisObject->wrapped().nondeterministicExceptionAttr();
238
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
266
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
239
        JSValue result = jsStringWithCache(state, memoizedResult);
267
        JSValue result = jsStringWithCache(state, memoizedResult);
240
        return JSValue::encode(result);
268
        return result;
241
    }
269
    }
242
270
243
    if (cursor.isReplaying()) {
271
    if (cursor.isReplaying()) {
Lines 245-259 EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* st a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec7
245
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
273
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
246
        if (input && input->convertTo<String>(memoizedResult)) {
274
        if (input && input->convertTo<String>(memoizedResult)) {
247
            JSValue result = jsStringWithCache(state, memoizedResult);
275
            JSValue result = jsStringWithCache(state, memoizedResult);
248
            return JSValue::encode(result);
276
            return result;
249
        }
277
        }
250
    }
278
    }
251
#endif
279
#endif
252
    auto& impl = castedThis->wrapped();
280
    auto& impl = thisObject->wrapped();
253
    JSValue result = jsStringWithCache(state, impl.nondeterministicExceptionAttr());
281
    JSValue result = jsStringWithCache(state, impl.nondeterministicExceptionAttr());
254
    return JSValue::encode(result);
282
    return result;
255
}
283
}
256
284
285
static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
257
286
258
EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
287
EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
259
{
288
{
Lines 266-282 EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecSta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec8
266
    if (UNLIKELY(!castedThis)) {
295
    if (UNLIKELY(!castedThis)) {
267
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
296
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
268
    }
297
    }
298
    return JSValue::encode(jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(state, castedThis, throwScope));
299
}
300
301
static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
302
{
303
    UNUSED_PARAM(thisObject);
304
    UNUSED_PARAM(throwScope);
305
    UNUSED_PARAM(state);
269
    ExceptionCode ec = 0;
306
    ExceptionCode ec = 0;
270
#if ENABLE(WEB_REPLAY)
307
#if ENABLE(WEB_REPLAY)
271
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
308
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
272
    InputCursor& cursor = globalObject->inputCursor();
309
    InputCursor& cursor = globalObject->inputCursor();
273
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicGetterExceptionAttr", AtomicString::ConstructFromLiteral);
310
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicGetterExceptionAttr", AtomicString::ConstructFromLiteral);
274
    if (cursor.isCapturing()) {
311
    if (cursor.isCapturing()) {
275
        String memoizedResult = castedThis->wrapped().nondeterministicGetterExceptionAttr(ec);
312
        String memoizedResult = thisObject->wrapped().nondeterministicGetterExceptionAttr(ec);
276
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, ec);
313
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, ec);
277
        JSValue result = jsStringWithCache(state, memoizedResult);
314
        JSValue result = jsStringWithCache(state, memoizedResult);
278
        setDOMException(state, throwScope, ec);
315
        setDOMException(state, throwScope, ec);
279
        return JSValue::encode(result);
316
        return result;
280
    }
317
    }
281
318
282
    if (cursor.isReplaying()) {
319
    if (cursor.isReplaying()) {
Lines 285-300 EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecSta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec9
285
        if (input && input->convertTo<String>(memoizedResult)) {
322
        if (input && input->convertTo<String>(memoizedResult)) {
286
            JSValue result = jsStringWithCache(state, memoizedResult);
323
            JSValue result = jsStringWithCache(state, memoizedResult);
287
            setDOMException(state, throwScope, input->exceptionCode());
324
            setDOMException(state, throwScope, input->exceptionCode());
288
            return JSValue::encode(result);
325
            return result;
289
        }
326
        }
290
    }
327
    }
291
#endif
328
#endif
292
    auto& impl = castedThis->wrapped();
329
    auto& impl = thisObject->wrapped();
293
    JSValue result = jsStringWithCache(state, impl.nondeterministicGetterExceptionAttr(ec));
330
    JSValue result = jsStringWithCache(state, impl.nondeterministicGetterExceptionAttr(ec));
294
    setDOMException(state, throwScope, ec);
331
    setDOMException(state, throwScope, ec);
295
    return JSValue::encode(result);
332
    return result;
296
}
333
}
297
334
335
static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
298
336
299
EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
337
EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
300
{
338
{
Lines 307-321 EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecSta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec10
307
    if (UNLIKELY(!castedThis)) {
345
    if (UNLIKELY(!castedThis)) {
308
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
346
        return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
309
    }
347
    }
348
    return JSValue::encode(jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(state, castedThis, throwScope));
349
}
350
351
static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
352
{
353
    UNUSED_PARAM(thisObject);
354
    UNUSED_PARAM(throwScope);
355
    UNUSED_PARAM(state);
310
#if ENABLE(WEB_REPLAY)
356
#if ENABLE(WEB_REPLAY)
311
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
357
    JSGlobalObject* globalObject = state->lexicalGlobalObject();
312
    InputCursor& cursor = globalObject->inputCursor();
358
    InputCursor& cursor = globalObject->inputCursor();
313
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicSetterExceptionAttr", AtomicString::ConstructFromLiteral);
359
    static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicSetterExceptionAttr", AtomicString::ConstructFromLiteral);
314
    if (cursor.isCapturing()) {
360
    if (cursor.isCapturing()) {
315
        String memoizedResult = castedThis->wrapped().nondeterministicSetterExceptionAttr();
361
        String memoizedResult = thisObject->wrapped().nondeterministicSetterExceptionAttr();
316
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
362
        cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
317
        JSValue result = jsStringWithCache(state, memoizedResult);
363
        JSValue result = jsStringWithCache(state, memoizedResult);
318
        return JSValue::encode(result);
364
        return result;
319
    }
365
    }
320
366
321
    if (cursor.isReplaying()) {
367
    if (cursor.isReplaying()) {
Lines 323-338 EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecSta a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp_sec11
323
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
369
        MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
324
        if (input && input->convertTo<String>(memoizedResult)) {
370
        if (input && input->convertTo<String>(memoizedResult)) {
325
            JSValue result = jsStringWithCache(state, memoizedResult);
371
            JSValue result = jsStringWithCache(state, memoizedResult);
326
            return JSValue::encode(result);
372
            return result;
327
        }
373
        }
328
    }
374
    }
329
#endif
375
#endif
330
    auto& impl = castedThis->wrapped();
376
    auto& impl = thisObject->wrapped();
331
    JSValue result = jsStringWithCache(state, impl.nondeterministicSetterExceptionAttr());
377
    JSValue result = jsStringWithCache(state, impl.nondeterministicSetterExceptionAttr());
332
    return JSValue::encode(result);
378
    return result;
333
}
379
}
334
380
335
336
EncodedJSValue jsTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
381
EncodedJSValue jsTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
337
{
382
{
338
    VM& vm = state->vm();
383
    VM& vm = state->vm();
- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp -202 / +1027 lines
Lines 51-56 a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec1
51
#include "JSTestObj.h"
51
#include "JSTestObj.h"
52
#include "JSTestSubObj.h"
52
#include "JSTestSubObj.h"
53
#include "JSXPathNSResolver.h"
53
#include "JSXPathNSResolver.h"
54
#include "ObjectConstructor.h"
54
#include "RuntimeEnabledFeatures.h"
55
#include "RuntimeEnabledFeatures.h"
55
#include "SVGDocument.h"
56
#include "SVGDocument.h"
56
#include "SVGPoint.h"
57
#include "SVGPoint.h"
Lines 964-969 bool setJSTestObjStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC: a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec2
964
JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
965
JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
965
bool setJSTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
966
bool setJSTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
966
967
968
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToJSON(ExecState*);
969
967
class JSTestObjPrototype : public JSC::JSNonFinalObject {
970
class JSTestObjPrototype : public JSC::JSNonFinalObject {
968
public:
971
public:
969
    typedef JSC::JSNonFinalObject Base;
972
    typedef JSC::JSNonFinalObject Base;
Lines 1404-1409 static const HashTableValue JSTestObjPrototypeTableValues[] = a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec3
1404
    { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
1407
    { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
1405
    { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
1408
    { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
1406
    { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1409
    { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1410
    { "toJSON", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionToJSON), (intptr_t) (0) } },
1407
};
1411
};
1408
1412
1409
const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
1413
const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
Lines 1489-1494 bool JSTestObj::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, un a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec4
1489
    return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
1493
    return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
1490
}
1494
}
1491
1495
1496
static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1497
1492
EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1498
EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1493
{
1499
{
1494
    VM& vm = state->vm();
1500
    VM& vm = state->vm();
Lines 1500-1510 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec5
1500
    if (UNLIKELY(!castedThis)) {
1506
    if (UNLIKELY(!castedThis)) {
1501
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyLongAttr");
1507
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyLongAttr");
1502
    }
1508
    }
1503
    auto& impl = castedThis->wrapped();
1509
    return JSValue::encode(jsTestObjReadOnlyLongAttrGetter(state, castedThis, throwScope));
1510
}
1511
1512
static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1513
{
1514
    UNUSED_PARAM(thisObject);
1515
    UNUSED_PARAM(throwScope);
1516
    UNUSED_PARAM(state);
1517
    auto& impl = thisObject->wrapped();
1504
    JSValue result = jsNumber(impl.readOnlyLongAttr());
1518
    JSValue result = jsNumber(impl.readOnlyLongAttr());
1505
    return JSValue::encode(result);
1519
    return result;
1506
}
1520
}
1507
1521
1522
static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1508
1523
1509
EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1524
EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1510
{
1525
{
Lines 1517-1527 EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue this a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec6
1517
    if (UNLIKELY(!castedThis)) {
1532
    if (UNLIKELY(!castedThis)) {
1518
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyStringAttr");
1533
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyStringAttr");
1519
    }
1534
    }
1520
    auto& impl = castedThis->wrapped();
1535
    return JSValue::encode(jsTestObjReadOnlyStringAttrGetter(state, castedThis, throwScope));
1536
}
1537
1538
static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1539
{
1540
    UNUSED_PARAM(thisObject);
1541
    UNUSED_PARAM(throwScope);
1542
    UNUSED_PARAM(state);
1543
    auto& impl = thisObject->wrapped();
1521
    JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
1544
    JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
1522
    return JSValue::encode(result);
1545
    return result;
1523
}
1546
}
1524
1547
1548
static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1525
1549
1526
EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1550
EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1527
{
1551
{
Lines 1534-1544 EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec7
1534
    if (UNLIKELY(!castedThis)) {
1558
    if (UNLIKELY(!castedThis)) {
1535
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyTestObjAttr");
1559
        return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyTestObjAttr");
1536
    }
1560
    }
1537
    auto& impl = castedThis->wrapped();
1561
    return JSValue::encode(jsTestObjReadOnlyTestObjAttrGetter(state, castedThis, throwScope));
1538
    JSValue result = toJS(state, castedThis->globalObject(), impl.readOnlyTestObjAttr());
1539
    return JSValue::encode(result);
1540
}
1562
}
1541
1563
1564
static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1565
{
1566
    UNUSED_PARAM(thisObject);
1567
    UNUSED_PARAM(throwScope);
1568
    UNUSED_PARAM(state);
1569
    auto& impl = thisObject->wrapped();
1570
    JSValue result = toJS(state, thisObject->globalObject(), impl.readOnlyTestObjAttr());
1571
    return result;
1572
}
1573
1574
static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState*);
1542
1575
1543
EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1576
EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1544
{
1577
{
Lines 1546-1555 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, Enco a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec8
1546
    auto throwScope = DECLARE_THROW_SCOPE(vm);
1579
    auto throwScope = DECLARE_THROW_SCOPE(vm);
1547
    UNUSED_PARAM(throwScope);
1580
    UNUSED_PARAM(throwScope);
1548
    UNUSED_PARAM(thisValue);
1581
    UNUSED_PARAM(thisValue);
1582
    return JSValue::encode(jsTestObjConstructorStaticReadOnlyLongAttrGetter(state));
1583
}
1584
1585
static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState* state)
1586
{
1587
    UNUSED_PARAM(state);
1549
    JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
1588
    JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
1550
    return JSValue::encode(result);
1589
    return result;
1551
}
1590
}
1552
1591
1592
static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState*);
1553
1593
1554
EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1594
EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1555
{
1595
{
Lines 1557-1566 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec9
1557
    auto throwScope = DECLARE_THROW_SCOPE(vm);
1597
    auto throwScope = DECLARE_THROW_SCOPE(vm);
1558
    UNUSED_PARAM(throwScope);
1598
    UNUSED_PARAM(throwScope);
1559
    UNUSED_PARAM(thisValue);
1599
    UNUSED_PARAM(thisValue);
1600
    return JSValue::encode(jsTestObjConstructorStaticStringAttrGetter(state));
1601
}
1602
1603
static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState* state)
1604
{
1605
    UNUSED_PARAM(state);
1560
    JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
1606
    JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
1561
    return JSValue::encode(result);
1607
    return result;
1562
}
1608
}
1563
1609
1610
static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1564
1611
1565
EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
1612
EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
1566
{
1613
{
Lines 1573-1581 EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue t a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec10
1573
    if (UNLIKELY(!castedThis)) {
1620
    if (UNLIKELY(!castedThis)) {
1574
        return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObj");
1621
        return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObj");
1575
    }
1622
    }
1576
    return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
1623
    return JSValue::encode(jsTestObjConstructorTestSubObjGetter(state, castedThis, throwScope));
1577
}
1624
}
1578
1625
1626
static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1627
{
1628
    UNUSED_PARAM(thisObject);
1629
    UNUSED_PARAM(throwScope);
1630
    UNUSED_PARAM(state);
1631
    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
1632
}
1633
1634
static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1579
1635
1580
EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1636
EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1581
{
1637
{
Lines 1588-1601 EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec11
1588
    if (UNLIKELY(!castedThis)) {
1644
    if (UNLIKELY(!castedThis)) {
1589
        return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
1645
        return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
1590
    }
1646
    }
1591
    if (UNLIKELY(!castedThis->wrapped().frame()))
1647
    return JSValue::encode(jsTestObjTestSubObjEnabledBySettingConstructorGetter(state, castedThis, throwScope));
1592
        return JSValue::encode(jsUndefined());
1648
}
1593
    Settings& settings = castedThis->wrapped().frame()->settings();
1649
1650
static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1651
{
1652
    UNUSED_PARAM(thisObject);
1653
    UNUSED_PARAM(throwScope);
1654
    UNUSED_PARAM(state);
1655
    if (UNLIKELY(!thisObject->wrapped().frame()))
1656
        return jsUndefined();
1657
    Settings& settings = thisObject->wrapped().frame()->settings();
1594
    if (!settings.testSettingEnabled())
1658
    if (!settings.testSettingEnabled())
1595
        return JSValue::encode(jsUndefined());
1659
        return jsUndefined();
1596
    return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
1660
    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
1597
}
1661
}
1598
1662
1663
static inline JSValue jsTestObjEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1599
1664
1600
EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1665
EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1601
{
1666
{
Lines 1608-1618 EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, Pro a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec12
1608
    if (UNLIKELY(!castedThis)) {
1673
    if (UNLIKELY(!castedThis)) {
1609
        return throwGetterTypeError(*state, throwScope, "TestObject", "enumAttr");
1674
        return throwGetterTypeError(*state, throwScope, "TestObject", "enumAttr");
1610
    }
1675
    }
1611
    auto& impl = castedThis->wrapped();
1676
    return JSValue::encode(jsTestObjEnumAttrGetter(state, castedThis, throwScope));
1677
}
1678
1679
static inline JSValue jsTestObjEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1680
{
1681
    UNUSED_PARAM(thisObject);
1682
    UNUSED_PARAM(throwScope);
1683
    UNUSED_PARAM(state);
1684
    auto& impl = thisObject->wrapped();
1612
    JSValue result = jsStringWithCache(state, impl.enumAttr());
1685
    JSValue result = jsStringWithCache(state, impl.enumAttr());
1613
    return JSValue::encode(result);
1686
    return result;
1614
}
1687
}
1615
1688
1689
static inline JSValue jsTestObjByteAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1616
1690
1617
EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1691
EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1618
{
1692
{
Lines 1625-1635 EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, Pro a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec13
1625
    if (UNLIKELY(!castedThis)) {
1699
    if (UNLIKELY(!castedThis)) {
1626
        return throwGetterTypeError(*state, throwScope, "TestObject", "byteAttr");
1700
        return throwGetterTypeError(*state, throwScope, "TestObject", "byteAttr");
1627
    }
1701
    }
1628
    auto& impl = castedThis->wrapped();
1702
    return JSValue::encode(jsTestObjByteAttrGetter(state, castedThis, throwScope));
1703
}
1704
1705
static inline JSValue jsTestObjByteAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1706
{
1707
    UNUSED_PARAM(thisObject);
1708
    UNUSED_PARAM(throwScope);
1709
    UNUSED_PARAM(state);
1710
    auto& impl = thisObject->wrapped();
1629
    JSValue result = jsNumber(impl.byteAttr());
1711
    JSValue result = jsNumber(impl.byteAttr());
1630
    return JSValue::encode(result);
1712
    return result;
1631
}
1713
}
1632
1714
1715
static inline JSValue jsTestObjOctetAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1633
1716
1634
EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1717
EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1635
{
1718
{
Lines 1642-1652 EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, Pr a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec14
1642
    if (UNLIKELY(!castedThis)) {
1725
    if (UNLIKELY(!castedThis)) {
1643
        return throwGetterTypeError(*state, throwScope, "TestObject", "octetAttr");
1726
        return throwGetterTypeError(*state, throwScope, "TestObject", "octetAttr");
1644
    }
1727
    }
1645
    auto& impl = castedThis->wrapped();
1728
    return JSValue::encode(jsTestObjOctetAttrGetter(state, castedThis, throwScope));
1729
}
1730
1731
static inline JSValue jsTestObjOctetAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1732
{
1733
    UNUSED_PARAM(thisObject);
1734
    UNUSED_PARAM(throwScope);
1735
    UNUSED_PARAM(state);
1736
    auto& impl = thisObject->wrapped();
1646
    JSValue result = jsNumber(impl.octetAttr());
1737
    JSValue result = jsNumber(impl.octetAttr());
1647
    return JSValue::encode(result);
1738
    return result;
1648
}
1739
}
1649
1740
1741
static inline JSValue jsTestObjShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1650
1742
1651
EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1743
EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1652
{
1744
{
Lines 1659-1669 EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, Pr a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec15
1659
    if (UNLIKELY(!castedThis)) {
1751
    if (UNLIKELY(!castedThis)) {
1660
        return throwGetterTypeError(*state, throwScope, "TestObject", "shortAttr");
1752
        return throwGetterTypeError(*state, throwScope, "TestObject", "shortAttr");
1661
    }
1753
    }
1662
    auto& impl = castedThis->wrapped();
1754
    return JSValue::encode(jsTestObjShortAttrGetter(state, castedThis, throwScope));
1755
}
1756
1757
static inline JSValue jsTestObjShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1758
{
1759
    UNUSED_PARAM(thisObject);
1760
    UNUSED_PARAM(throwScope);
1761
    UNUSED_PARAM(state);
1762
    auto& impl = thisObject->wrapped();
1663
    JSValue result = jsNumber(impl.shortAttr());
1763
    JSValue result = jsNumber(impl.shortAttr());
1664
    return JSValue::encode(result);
1764
    return result;
1665
}
1765
}
1666
1766
1767
static inline JSValue jsTestObjClampedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1667
1768
1668
EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1769
EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1669
{
1770
{
Lines 1676-1686 EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec16
1676
    if (UNLIKELY(!castedThis)) {
1777
    if (UNLIKELY(!castedThis)) {
1677
        return throwGetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
1778
        return throwGetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
1678
    }
1779
    }
1679
    auto& impl = castedThis->wrapped();
1780
    return JSValue::encode(jsTestObjClampedShortAttrGetter(state, castedThis, throwScope));
1781
}
1782
1783
static inline JSValue jsTestObjClampedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1784
{
1785
    UNUSED_PARAM(thisObject);
1786
    UNUSED_PARAM(throwScope);
1787
    UNUSED_PARAM(state);
1788
    auto& impl = thisObject->wrapped();
1680
    JSValue result = jsNumber(impl.clampedShortAttr());
1789
    JSValue result = jsNumber(impl.clampedShortAttr());
1681
    return JSValue::encode(result);
1790
    return result;
1682
}
1791
}
1683
1792
1793
static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1684
1794
1685
EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1795
EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1686
{
1796
{
Lines 1693-1703 EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue t a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec17
1693
    if (UNLIKELY(!castedThis)) {
1803
    if (UNLIKELY(!castedThis)) {
1694
        return throwGetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
1804
        return throwGetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
1695
    }
1805
    }
1696
    auto& impl = castedThis->wrapped();
1806
    return JSValue::encode(jsTestObjEnforceRangeShortAttrGetter(state, castedThis, throwScope));
1807
}
1808
1809
static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1810
{
1811
    UNUSED_PARAM(thisObject);
1812
    UNUSED_PARAM(throwScope);
1813
    UNUSED_PARAM(state);
1814
    auto& impl = thisObject->wrapped();
1697
    JSValue result = jsNumber(impl.enforceRangeShortAttr());
1815
    JSValue result = jsNumber(impl.enforceRangeShortAttr());
1698
    return JSValue::encode(result);
1816
    return result;
1699
}
1817
}
1700
1818
1819
static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1701
1820
1702
EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1821
EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1703
{
1822
{
Lines 1710-1720 EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec18
1710
    if (UNLIKELY(!castedThis)) {
1829
    if (UNLIKELY(!castedThis)) {
1711
        return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
1830
        return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
1712
    }
1831
    }
1713
    auto& impl = castedThis->wrapped();
1832
    return JSValue::encode(jsTestObjUnsignedShortAttrGetter(state, castedThis, throwScope));
1833
}
1834
1835
static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1836
{
1837
    UNUSED_PARAM(thisObject);
1838
    UNUSED_PARAM(throwScope);
1839
    UNUSED_PARAM(state);
1840
    auto& impl = thisObject->wrapped();
1714
    JSValue result = jsNumber(impl.unsignedShortAttr());
1841
    JSValue result = jsNumber(impl.unsignedShortAttr());
1715
    return JSValue::encode(result);
1842
    return result;
1716
}
1843
}
1717
1844
1845
static inline JSValue jsTestObjLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1718
1846
1719
EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1847
EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1720
{
1848
{
Lines 1727-1737 EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, Pro a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec19
1727
    if (UNLIKELY(!castedThis)) {
1855
    if (UNLIKELY(!castedThis)) {
1728
        return throwGetterTypeError(*state, throwScope, "TestObject", "longAttr");
1856
        return throwGetterTypeError(*state, throwScope, "TestObject", "longAttr");
1729
    }
1857
    }
1730
    auto& impl = castedThis->wrapped();
1858
    return JSValue::encode(jsTestObjLongAttrGetter(state, castedThis, throwScope));
1859
}
1860
1861
static inline JSValue jsTestObjLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1862
{
1863
    UNUSED_PARAM(thisObject);
1864
    UNUSED_PARAM(throwScope);
1865
    UNUSED_PARAM(state);
1866
    auto& impl = thisObject->wrapped();
1731
    JSValue result = jsNumber(impl.longAttr());
1867
    JSValue result = jsNumber(impl.longAttr());
1732
    return JSValue::encode(result);
1868
    return result;
1733
}
1869
}
1734
1870
1871
static inline JSValue jsTestObjLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1735
1872
1736
EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1873
EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1737
{
1874
{
Lines 1744-1754 EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec20
1744
    if (UNLIKELY(!castedThis)) {
1881
    if (UNLIKELY(!castedThis)) {
1745
        return throwGetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
1882
        return throwGetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
1746
    }
1883
    }
1747
    auto& impl = castedThis->wrapped();
1884
    return JSValue::encode(jsTestObjLongLongAttrGetter(state, castedThis, throwScope));
1885
}
1886
1887
static inline JSValue jsTestObjLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1888
{
1889
    UNUSED_PARAM(thisObject);
1890
    UNUSED_PARAM(throwScope);
1891
    UNUSED_PARAM(state);
1892
    auto& impl = thisObject->wrapped();
1748
    JSValue result = jsNumber(impl.longLongAttr());
1893
    JSValue result = jsNumber(impl.longLongAttr());
1749
    return JSValue::encode(result);
1894
    return result;
1750
}
1895
}
1751
1896
1897
static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1752
1898
1753
EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1899
EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1754
{
1900
{
Lines 1761-1771 EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec21
1761
    if (UNLIKELY(!castedThis)) {
1907
    if (UNLIKELY(!castedThis)) {
1762
        return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
1908
        return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
1763
    }
1909
    }
1764
    auto& impl = castedThis->wrapped();
1910
    return JSValue::encode(jsTestObjUnsignedLongLongAttrGetter(state, castedThis, throwScope));
1911
}
1912
1913
static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1914
{
1915
    UNUSED_PARAM(thisObject);
1916
    UNUSED_PARAM(throwScope);
1917
    UNUSED_PARAM(state);
1918
    auto& impl = thisObject->wrapped();
1765
    JSValue result = jsNumber(impl.unsignedLongLongAttr());
1919
    JSValue result = jsNumber(impl.unsignedLongLongAttr());
1766
    return JSValue::encode(result);
1920
    return result;
1767
}
1921
}
1768
1922
1923
static inline JSValue jsTestObjStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1769
1924
1770
EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1925
EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1771
{
1926
{
Lines 1778-1788 EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec22
1778
    if (UNLIKELY(!castedThis)) {
1933
    if (UNLIKELY(!castedThis)) {
1779
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttr");
1934
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttr");
1780
    }
1935
    }
1781
    auto& impl = castedThis->wrapped();
1936
    return JSValue::encode(jsTestObjStringAttrGetter(state, castedThis, throwScope));
1937
}
1938
1939
static inline JSValue jsTestObjStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1940
{
1941
    UNUSED_PARAM(thisObject);
1942
    UNUSED_PARAM(throwScope);
1943
    UNUSED_PARAM(state);
1944
    auto& impl = thisObject->wrapped();
1782
    JSValue result = jsStringWithCache(state, impl.stringAttr());
1945
    JSValue result = jsStringWithCache(state, impl.stringAttr());
1783
    return JSValue::encode(result);
1946
    return result;
1784
}
1947
}
1785
1948
1949
static inline JSValue jsTestObjUsvstringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1786
1950
1787
EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1951
EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1788
{
1952
{
Lines 1795-1805 EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec23
1795
    if (UNLIKELY(!castedThis)) {
1959
    if (UNLIKELY(!castedThis)) {
1796
        return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
1960
        return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
1797
    }
1961
    }
1798
    auto& impl = castedThis->wrapped();
1962
    return JSValue::encode(jsTestObjUsvstringAttrGetter(state, castedThis, throwScope));
1963
}
1964
1965
static inline JSValue jsTestObjUsvstringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1966
{
1967
    UNUSED_PARAM(thisObject);
1968
    UNUSED_PARAM(throwScope);
1969
    UNUSED_PARAM(state);
1970
    auto& impl = thisObject->wrapped();
1799
    JSValue result = jsStringWithCache(state, impl.usvstringAttr());
1971
    JSValue result = jsStringWithCache(state, impl.usvstringAttr());
1800
    return JSValue::encode(result);
1972
    return result;
1801
}
1973
}
1802
1974
1975
static inline JSValue jsTestObjTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1803
1976
1804
EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1977
EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1805
{
1978
{
Lines 1812-1822 EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec24
1812
    if (UNLIKELY(!castedThis)) {
1985
    if (UNLIKELY(!castedThis)) {
1813
        return throwGetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
1986
        return throwGetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
1814
    }
1987
    }
1815
    auto& impl = castedThis->wrapped();
1988
    return JSValue::encode(jsTestObjTestObjAttrGetter(state, castedThis, throwScope));
1816
    JSValue result = toJS(state, castedThis->globalObject(), impl.testObjAttr());
1989
}
1817
    return JSValue::encode(result);
1990
1991
static inline JSValue jsTestObjTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
1992
{
1993
    UNUSED_PARAM(thisObject);
1994
    UNUSED_PARAM(throwScope);
1995
    UNUSED_PARAM(state);
1996
    auto& impl = thisObject->wrapped();
1997
    JSValue result = toJS(state, thisObject->globalObject(), impl.testObjAttr());
1998
    return result;
1818
}
1999
}
1819
2000
2001
static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1820
2002
1821
EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2003
EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1822
{
2004
{
Lines 1829-1839 EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec25
1829
    if (UNLIKELY(!castedThis)) {
2011
    if (UNLIKELY(!castedThis)) {
1830
        return throwGetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
2012
        return throwGetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
1831
    }
2013
    }
1832
    auto& impl = castedThis->wrapped();
2014
    return JSValue::encode(jsTestObjTestNullableObjAttrGetter(state, castedThis, throwScope));
1833
    JSValue result = toJS(state, castedThis->globalObject(), impl.testNullableObjAttr());
1834
    return JSValue::encode(result);
1835
}
2015
}
1836
2016
2017
static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2018
{
2019
    UNUSED_PARAM(thisObject);
2020
    UNUSED_PARAM(throwScope);
2021
    UNUSED_PARAM(state);
2022
    auto& impl = thisObject->wrapped();
2023
    JSValue result = toJS(state, thisObject->globalObject(), impl.testNullableObjAttr());
2024
    return result;
2025
}
2026
2027
static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1837
2028
1838
EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2029
EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1839
{
2030
{
Lines 1846-1856 EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue this a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec26
1846
    if (UNLIKELY(!castedThis)) {
2037
    if (UNLIKELY(!castedThis)) {
1847
        return JSValue::encode(jsUndefined());
2038
        return JSValue::encode(jsUndefined());
1848
    }
2039
    }
1849
    auto& impl = castedThis->wrapped();
2040
    return JSValue::encode(jsTestObjLenientTestObjAttrGetter(state, castedThis, throwScope));
1850
    JSValue result = toJS(state, castedThis->globalObject(), impl.lenientTestObjAttr());
2041
}
1851
    return JSValue::encode(result);
2042
2043
static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2044
{
2045
    UNUSED_PARAM(thisObject);
2046
    UNUSED_PARAM(throwScope);
2047
    UNUSED_PARAM(state);
2048
    auto& impl = thisObject->wrapped();
2049
    JSValue result = toJS(state, thisObject->globalObject(), impl.lenientTestObjAttr());
2050
    return result;
1852
}
2051
}
1853
2052
2053
static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1854
2054
1855
EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2055
EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1856
{
2056
{
Lines 1863-1873 EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisVal a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec27
1863
    if (UNLIKELY(!castedThis)) {
2063
    if (UNLIKELY(!castedThis)) {
1864
        return throwGetterTypeError(*state, throwScope, "TestObject", "unforgeableAttr");
2064
        return throwGetterTypeError(*state, throwScope, "TestObject", "unforgeableAttr");
1865
    }
2065
    }
1866
    auto& impl = castedThis->wrapped();
2066
    return JSValue::encode(jsTestObjUnforgeableAttrGetter(state, castedThis, throwScope));
2067
}
2068
2069
static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2070
{
2071
    UNUSED_PARAM(thisObject);
2072
    UNUSED_PARAM(throwScope);
2073
    UNUSED_PARAM(state);
2074
    auto& impl = thisObject->wrapped();
1867
    JSValue result = jsStringWithCache(state, impl.unforgeableAttr());
2075
    JSValue result = jsStringWithCache(state, impl.unforgeableAttr());
1868
    return JSValue::encode(result);
2076
    return result;
1869
}
2077
}
1870
2078
2079
static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1871
2080
1872
EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
2081
EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
1873
{
2082
{
Lines 1880-1890 EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, En a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec28
1880
    if (UNLIKELY(!castedThis)) {
2089
    if (UNLIKELY(!castedThis)) {
1881
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
2090
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
1882
    }
2091
    }
1883
    auto& impl = castedThis->wrapped();
2092
    return JSValue::encode(jsTestObjStringAttrTreatingNullAsEmptyStringGetter(state, castedThis, throwScope));
2093
}
2094
2095
static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2096
{
2097
    UNUSED_PARAM(thisObject);
2098
    UNUSED_PARAM(throwScope);
2099
    UNUSED_PARAM(state);
2100
    auto& impl = thisObject->wrapped();
1884
    JSValue result = jsStringWithCache(state, impl.stringAttrTreatingNullAsEmptyString());
2101
    JSValue result = jsStringWithCache(state, impl.stringAttrTreatingNullAsEmptyString());
1885
    return JSValue::encode(result);
2102
    return result;
1886
}
2103
}
1887
2104
2105
static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1888
2106
1889
EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
2107
EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
1890
{
2108
{
Lines 1897-1907 EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec29
1897
    if (UNLIKELY(!castedThis)) {
2115
    if (UNLIKELY(!castedThis)) {
1898
        return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
2116
        return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
1899
    }
2117
    }
1900
    auto& impl = castedThis->wrapped();
2118
    return JSValue::encode(jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(state, castedThis, throwScope));
2119
}
2120
2121
static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2122
{
2123
    UNUSED_PARAM(thisObject);
2124
    UNUSED_PARAM(throwScope);
2125
    UNUSED_PARAM(state);
2126
    auto& impl = thisObject->wrapped();
1901
    JSValue result = jsStringWithCache(state, impl.usvstringAttrTreatingNullAsEmptyString());
2127
    JSValue result = jsStringWithCache(state, impl.usvstringAttrTreatingNullAsEmptyString());
1902
    return JSValue::encode(result);
2128
    return result;
1903
}
2129
}
1904
2130
2131
static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1905
2132
1906
EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2133
EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1907
{
2134
{
Lines 1914-1924 EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec30
1914
    if (UNLIKELY(!castedThis)) {
2141
    if (UNLIKELY(!castedThis)) {
1915
        return throwGetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
2142
        return throwGetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
1916
    }
2143
    }
1917
    auto& impl = castedThis->wrapped();
2144
    return JSValue::encode(jsTestObjImplementationEnumAttrGetter(state, castedThis, throwScope));
2145
}
2146
2147
static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2148
{
2149
    UNUSED_PARAM(thisObject);
2150
    UNUSED_PARAM(throwScope);
2151
    UNUSED_PARAM(state);
2152
    auto& impl = thisObject->wrapped();
1918
    JSValue result = jsStringWithCache(state, impl.implementationEnumAttr());
2153
    JSValue result = jsStringWithCache(state, impl.implementationEnumAttr());
1919
    return JSValue::encode(result);
2154
    return result;
1920
}
2155
}
1921
2156
2157
static inline JSValue jsTestObjXMLObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1922
2158
1923
EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2159
EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1924
{
2160
{
Lines 1931-1941 EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec31
1931
    if (UNLIKELY(!castedThis)) {
2167
    if (UNLIKELY(!castedThis)) {
1932
        return throwGetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
2168
        return throwGetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
1933
    }
2169
    }
1934
    auto& impl = castedThis->wrapped();
2170
    return JSValue::encode(jsTestObjXMLObjAttrGetter(state, castedThis, throwScope));
1935
    JSValue result = toJS(state, castedThis->globalObject(), impl.xmlObjAttr());
1936
    return JSValue::encode(result);
1937
}
2171
}
1938
2172
2173
static inline JSValue jsTestObjXMLObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2174
{
2175
    UNUSED_PARAM(thisObject);
2176
    UNUSED_PARAM(throwScope);
2177
    UNUSED_PARAM(state);
2178
    auto& impl = thisObject->wrapped();
2179
    JSValue result = toJS(state, thisObject->globalObject(), impl.xmlObjAttr());
2180
    return result;
2181
}
2182
2183
static inline JSValue jsTestObjCreateGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1939
2184
1940
EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, PropertyName)
2185
EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, PropertyName)
1941
{
2186
{
Lines 1948-1958 EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, Prope a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec32
1948
    if (UNLIKELY(!castedThis)) {
2193
    if (UNLIKELY(!castedThis)) {
1949
        return throwGetterTypeError(*state, throwScope, "TestObject", "create");
2194
        return throwGetterTypeError(*state, throwScope, "TestObject", "create");
1950
    }
2195
    }
1951
    auto& impl = castedThis->wrapped();
2196
    return JSValue::encode(jsTestObjCreateGetter(state, castedThis, throwScope));
2197
}
2198
2199
static inline JSValue jsTestObjCreateGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2200
{
2201
    UNUSED_PARAM(thisObject);
2202
    UNUSED_PARAM(throwScope);
2203
    UNUSED_PARAM(state);
2204
    auto& impl = thisObject->wrapped();
1952
    JSValue result = jsBoolean(impl.isCreate());
2205
    JSValue result = jsBoolean(impl.isCreate());
1953
    return JSValue::encode(result);
2206
    return result;
1954
}
2207
}
1955
2208
2209
static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1956
2210
1957
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2211
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1958
{
2212
{
Lines 1965-1975 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec33
1965
    if (UNLIKELY(!castedThis)) {
2219
    if (UNLIKELY(!castedThis)) {
1966
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
2220
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
1967
    }
2221
    }
1968
    auto& impl = castedThis->wrapped();
2222
    return JSValue::encode(jsTestObjReflectedStringAttrGetter(state, castedThis, throwScope));
2223
}
2224
2225
static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2226
{
2227
    UNUSED_PARAM(thisObject);
2228
    UNUSED_PARAM(throwScope);
2229
    UNUSED_PARAM(state);
2230
    auto& impl = thisObject->wrapped();
1969
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr));
2231
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr));
1970
    return JSValue::encode(result);
2232
    return result;
1971
}
2233
}
1972
2234
2235
static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1973
2236
1974
EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2237
EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1975
{
2238
{
Lines 1982-1992 EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec34
1982
    if (UNLIKELY(!castedThis)) {
2245
    if (UNLIKELY(!castedThis)) {
1983
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
2246
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
1984
    }
2247
    }
1985
    auto& impl = castedThis->wrapped();
2248
    return JSValue::encode(jsTestObjReflectedUSVStringAttrGetter(state, castedThis, throwScope));
2249
}
2250
2251
static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2252
{
2253
    UNUSED_PARAM(thisObject);
2254
    UNUSED_PARAM(throwScope);
2255
    UNUSED_PARAM(state);
2256
    auto& impl = thisObject->wrapped();
1986
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr));
2257
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr));
1987
    return JSValue::encode(result);
2258
    return result;
1988
}
2259
}
1989
2260
2261
static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
1990
2262
1991
EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2263
EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1992
{
2264
{
Lines 1999-2009 EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue t a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec35
1999
    if (UNLIKELY(!castedThis)) {
2271
    if (UNLIKELY(!castedThis)) {
2000
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
2272
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
2001
    }
2273
    }
2002
    auto& impl = castedThis->wrapped();
2274
    return JSValue::encode(jsTestObjReflectedIntegralAttrGetter(state, castedThis, throwScope));
2275
}
2276
2277
static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2278
{
2279
    UNUSED_PARAM(thisObject);
2280
    UNUSED_PARAM(throwScope);
2281
    UNUSED_PARAM(state);
2282
    auto& impl = thisObject->wrapped();
2003
    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
2283
    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
2004
    return JSValue::encode(result);
2284
    return result;
2005
}
2285
}
2006
2286
2287
static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2007
2288
2008
EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2289
EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2009
{
2290
{
Lines 2016-2026 EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJ a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec36
2016
    if (UNLIKELY(!castedThis)) {
2297
    if (UNLIKELY(!castedThis)) {
2017
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
2298
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
2018
    }
2299
    }
2019
    auto& impl = castedThis->wrapped();
2300
    return JSValue::encode(jsTestObjReflectedUnsignedIntegralAttrGetter(state, castedThis, throwScope));
2301
}
2302
2303
static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2304
{
2305
    UNUSED_PARAM(thisObject);
2306
    UNUSED_PARAM(throwScope);
2307
    UNUSED_PARAM(state);
2308
    auto& impl = thisObject->wrapped();
2020
    JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
2309
    JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
2021
    return JSValue::encode(result);
2310
    return result;
2022
}
2311
}
2023
2312
2313
static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2024
2314
2025
EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2315
EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2026
{
2316
{
Lines 2033-2043 EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec37
2033
    if (UNLIKELY(!castedThis)) {
2323
    if (UNLIKELY(!castedThis)) {
2034
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
2324
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
2035
    }
2325
    }
2036
    auto& impl = castedThis->wrapped();
2326
    return JSValue::encode(jsTestObjReflectedBooleanAttrGetter(state, castedThis, throwScope));
2327
}
2328
2329
static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2330
{
2331
    UNUSED_PARAM(thisObject);
2332
    UNUSED_PARAM(throwScope);
2333
    UNUSED_PARAM(state);
2334
    auto& impl = thisObject->wrapped();
2037
    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedbooleanattrAttr));
2335
    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedbooleanattrAttr));
2038
    return JSValue::encode(result);
2336
    return result;
2039
}
2337
}
2040
2338
2339
static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2041
2340
2042
EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2341
EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2043
{
2342
{
Lines 2050-2060 EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec38
2050
    if (UNLIKELY(!castedThis)) {
2349
    if (UNLIKELY(!castedThis)) {
2051
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
2350
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
2052
    }
2351
    }
2053
    auto& impl = castedThis->wrapped();
2352
    return JSValue::encode(jsTestObjReflectedURLAttrGetter(state, castedThis, throwScope));
2353
}
2354
2355
static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2356
{
2357
    UNUSED_PARAM(thisObject);
2358
    UNUSED_PARAM(throwScope);
2359
    UNUSED_PARAM(state);
2360
    auto& impl = thisObject->wrapped();
2054
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
2361
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
2055
    return JSValue::encode(result);
2362
    return result;
2056
}
2363
}
2057
2364
2365
static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2058
2366
2059
EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2367
EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2060
{
2368
{
Lines 2067-2077 EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec39
2067
    if (UNLIKELY(!castedThis)) {
2375
    if (UNLIKELY(!castedThis)) {
2068
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVURLAttr");
2376
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVURLAttr");
2069
    }
2377
    }
2070
    auto& impl = castedThis->wrapped();
2378
    return JSValue::encode(jsTestObjReflectedUSVURLAttrGetter(state, castedThis, throwScope));
2379
}
2380
2381
static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2382
{
2383
    UNUSED_PARAM(thisObject);
2384
    UNUSED_PARAM(throwScope);
2385
    UNUSED_PARAM(state);
2386
    auto& impl = thisObject->wrapped();
2071
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedusvurlattrAttr));
2387
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedusvurlattrAttr));
2072
    return JSValue::encode(result);
2388
    return result;
2073
}
2389
}
2074
2390
2391
static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2075
2392
2076
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2393
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2077
{
2394
{
Lines 2084-2094 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec40
2084
    if (UNLIKELY(!castedThis)) {
2401
    if (UNLIKELY(!castedThis)) {
2085
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
2402
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
2086
    }
2403
    }
2087
    auto& impl = castedThis->wrapped();
2404
    return JSValue::encode(jsTestObjReflectedStringAttrGetter(state, castedThis, throwScope));
2405
}
2406
2407
static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2408
{
2409
    UNUSED_PARAM(thisObject);
2410
    UNUSED_PARAM(throwScope);
2411
    UNUSED_PARAM(state);
2412
    auto& impl = thisObject->wrapped();
2088
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr));
2413
    JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr));
2089
    return JSValue::encode(result);
2414
    return result;
2090
}
2415
}
2091
2416
2417
static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2092
2418
2093
EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2419
EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2094
{
2420
{
Lines 2101-2111 EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec41
2101
    if (UNLIKELY(!castedThis)) {
2427
    if (UNLIKELY(!castedThis)) {
2102
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomIntegralAttr");
2428
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomIntegralAttr");
2103
    }
2429
    }
2104
    auto& impl = castedThis->wrapped();
2430
    return JSValue::encode(jsTestObjReflectedCustomIntegralAttrGetter(state, castedThis, throwScope));
2431
}
2432
2433
static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2434
{
2435
    UNUSED_PARAM(thisObject);
2436
    UNUSED_PARAM(throwScope);
2437
    UNUSED_PARAM(state);
2438
    auto& impl = thisObject->wrapped();
2105
    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
2439
    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
2106
    return JSValue::encode(result);
2440
    return result;
2107
}
2441
}
2108
2442
2443
static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2109
2444
2110
EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2445
EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2111
{
2446
{
Lines 2118-2128 EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec42
2118
    if (UNLIKELY(!castedThis)) {
2453
    if (UNLIKELY(!castedThis)) {
2119
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomBooleanAttr");
2454
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomBooleanAttr");
2120
    }
2455
    }
2121
    auto& impl = castedThis->wrapped();
2456
    return JSValue::encode(jsTestObjReflectedCustomBooleanAttrGetter(state, castedThis, throwScope));
2457
}
2458
2459
static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2460
{
2461
    UNUSED_PARAM(thisObject);
2462
    UNUSED_PARAM(throwScope);
2463
    UNUSED_PARAM(state);
2464
    auto& impl = thisObject->wrapped();
2122
    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::customContentBooleanAttrAttr));
2465
    JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::customContentBooleanAttrAttr));
2123
    return JSValue::encode(result);
2466
    return result;
2124
}
2467
}
2125
2468
2469
static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2126
2470
2127
EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2471
EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2128
{
2472
{
Lines 2135-2147 EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec43
2135
    if (UNLIKELY(!castedThis)) {
2479
    if (UNLIKELY(!castedThis)) {
2136
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomURLAttr");
2480
        return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomURLAttr");
2137
    }
2481
    }
2138
    auto& impl = castedThis->wrapped();
2482
    return JSValue::encode(jsTestObjReflectedCustomURLAttrGetter(state, castedThis, throwScope));
2139
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
2140
    return JSValue::encode(result);
2141
}
2483
}
2142
2484
2485
static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2486
{
2487
    UNUSED_PARAM(thisObject);
2488
    UNUSED_PARAM(throwScope);
2489
    UNUSED_PARAM(state);
2490
    auto& impl = thisObject->wrapped();
2491
    JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
2492
    return result;
2493
}
2143
2494
2144
#if ENABLE(TEST_FEATURE)
2495
#if ENABLE(TEST_FEATURE)
2496
static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2497
2145
EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2498
EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2146
{
2499
{
2147
    VM& vm = state->vm();
2500
    VM& vm = state->vm();
Lines 2153-2165 EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSVal a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec44
2153
    if (UNLIKELY(!castedThis)) {
2506
    if (UNLIKELY(!castedThis)) {
2154
        return throwGetterTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeAttribute");
2507
        return throwGetterTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeAttribute");
2155
    }
2508
    }
2156
    auto& impl = castedThis->wrapped();
2509
    return JSValue::encode(jsTestObjEnabledAtRuntimeAttributeGetter(state, castedThis, throwScope));
2510
}
2511
2512
static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2513
{
2514
    UNUSED_PARAM(thisObject);
2515
    UNUSED_PARAM(throwScope);
2516
    UNUSED_PARAM(state);
2517
    auto& impl = thisObject->wrapped();
2157
    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
2518
    JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
2158
    return JSValue::encode(result);
2519
    return result;
2159
}
2520
}
2160
2521
2161
#endif
2522
#endif
2162
2523
2524
static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2525
2163
EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2526
EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2164
{
2527
{
2165
    VM& vm = state->vm();
2528
    VM& vm = state->vm();
Lines 2171-2181 EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValu a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec45
2171
    if (UNLIKELY(!castedThis)) {
2534
    if (UNLIKELY(!castedThis)) {
2172
        return throwGetterTypeError(*state, throwScope, "TestObject", "typedArrayAttr");
2535
        return throwGetterTypeError(*state, throwScope, "TestObject", "typedArrayAttr");
2173
    }
2536
    }
2174
    auto& impl = castedThis->wrapped();
2537
    return JSValue::encode(jsTestObjTypedArrayAttrGetter(state, castedThis, throwScope));
2175
    JSValue result = toJS(state, castedThis->globalObject(), impl.typedArrayAttr());
2538
}
2176
    return JSValue::encode(result);
2539
2540
static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2541
{
2542
    UNUSED_PARAM(thisObject);
2543
    UNUSED_PARAM(throwScope);
2544
    UNUSED_PARAM(state);
2545
    auto& impl = thisObject->wrapped();
2546
    JSValue result = toJS(state, thisObject->globalObject(), impl.typedArrayAttr());
2547
    return result;
2177
}
2548
}
2178
2549
2550
static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2179
2551
2180
EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2552
EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2181
{
2553
{
Lines 2188-2200 EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec46
2188
    if (UNLIKELY(!castedThis)) {
2560
    if (UNLIKELY(!castedThis)) {
2189
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterException");
2561
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterException");
2190
    }
2562
    }
2563
    return JSValue::encode(jsTestObjAttrWithGetterExceptionGetter(state, castedThis, throwScope));
2564
}
2565
2566
static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2567
{
2568
    UNUSED_PARAM(thisObject);
2569
    UNUSED_PARAM(throwScope);
2570
    UNUSED_PARAM(state);
2191
    ExceptionCode ec = 0;
2571
    ExceptionCode ec = 0;
2192
    auto& impl = castedThis->wrapped();
2572
    auto& impl = thisObject->wrapped();
2193
    JSValue result = jsNumber(impl.attrWithGetterException(ec));
2573
    JSValue result = jsNumber(impl.attrWithGetterException(ec));
2194
    setDOMException(state, throwScope, ec);
2574
    setDOMException(state, throwScope, ec);
2195
    return JSValue::encode(result);
2575
    return result;
2196
}
2576
}
2197
2577
2578
static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2198
2579
2199
EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2580
EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2200
{
2581
{
Lines 2207-2219 EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec47
2207
    if (UNLIKELY(!castedThis)) {
2588
    if (UNLIKELY(!castedThis)) {
2208
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterExceptionWithMessage");
2589
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterExceptionWithMessage");
2209
    }
2590
    }
2591
    return JSValue::encode(jsTestObjAttrWithGetterExceptionWithMessageGetter(state, castedThis, throwScope));
2592
}
2593
2594
static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2595
{
2596
    UNUSED_PARAM(thisObject);
2597
    UNUSED_PARAM(throwScope);
2598
    UNUSED_PARAM(state);
2210
    ExceptionCodeWithMessage ec;
2599
    ExceptionCodeWithMessage ec;
2211
    auto& impl = castedThis->wrapped();
2600
    auto& impl = thisObject->wrapped();
2212
    JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
2601
    JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
2213
    setDOMException(state, throwScope, ec);
2602
    setDOMException(state, throwScope, ec);
2214
    return JSValue::encode(result);
2603
    return result;
2215
}
2604
}
2216
2605
2606
static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2217
2607
2218
EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2608
EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2219
{
2609
{
Lines 2226-2236 EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec48
2226
    if (UNLIKELY(!castedThis)) {
2616
    if (UNLIKELY(!castedThis)) {
2227
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterException");
2617
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterException");
2228
    }
2618
    }
2229
    auto& impl = castedThis->wrapped();
2619
    return JSValue::encode(jsTestObjAttrWithSetterExceptionGetter(state, castedThis, throwScope));
2620
}
2621
2622
static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2623
{
2624
    UNUSED_PARAM(thisObject);
2625
    UNUSED_PARAM(throwScope);
2626
    UNUSED_PARAM(state);
2627
    auto& impl = thisObject->wrapped();
2230
    JSValue result = jsNumber(impl.attrWithSetterException());
2628
    JSValue result = jsNumber(impl.attrWithSetterException());
2231
    return JSValue::encode(result);
2629
    return result;
2232
}
2630
}
2233
2631
2632
static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2234
2633
2235
EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2634
EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2236
{
2635
{
Lines 2243-2253 EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec49
2243
    if (UNLIKELY(!castedThis)) {
2642
    if (UNLIKELY(!castedThis)) {
2244
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterExceptionWithMessage");
2643
        return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterExceptionWithMessage");
2245
    }
2644
    }
2246
    auto& impl = castedThis->wrapped();
2645
    return JSValue::encode(jsTestObjAttrWithSetterExceptionWithMessageGetter(state, castedThis, throwScope));
2646
}
2647
2648
static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2649
{
2650
    UNUSED_PARAM(thisObject);
2651
    UNUSED_PARAM(throwScope);
2652
    UNUSED_PARAM(state);
2653
    auto& impl = thisObject->wrapped();
2247
    JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
2654
    JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
2248
    return JSValue::encode(result);
2655
    return result;
2249
}
2656
}
2250
2657
2658
static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2251
2659
2252
EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2660
EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2253
{
2661
{
Lines 2260-2272 EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJ a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec50
2260
    if (UNLIKELY(!castedThis)) {
2668
    if (UNLIKELY(!castedThis)) {
2261
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithGetterException");
2669
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithGetterException");
2262
    }
2670
    }
2671
    return JSValue::encode(jsTestObjStringAttrWithGetterExceptionGetter(state, castedThis, throwScope));
2672
}
2673
2674
static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2675
{
2676
    UNUSED_PARAM(thisObject);
2677
    UNUSED_PARAM(throwScope);
2678
    UNUSED_PARAM(state);
2263
    ExceptionCode ec = 0;
2679
    ExceptionCode ec = 0;
2264
    auto& impl = castedThis->wrapped();
2680
    auto& impl = thisObject->wrapped();
2265
    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
2681
    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
2266
    setDOMException(state, throwScope, ec);
2682
    setDOMException(state, throwScope, ec);
2267
    return JSValue::encode(result);
2683
    return result;
2268
}
2684
}
2269
2685
2686
static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2270
2687
2271
EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2688
EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2272
{
2689
{
Lines 2279-2289 EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJ a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec51
2279
    if (UNLIKELY(!castedThis)) {
2696
    if (UNLIKELY(!castedThis)) {
2280
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithSetterException");
2697
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithSetterException");
2281
    }
2698
    }
2282
    auto& impl = castedThis->wrapped();
2699
    return JSValue::encode(jsTestObjStringAttrWithSetterExceptionGetter(state, castedThis, throwScope));
2700
}
2701
2702
static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2703
{
2704
    UNUSED_PARAM(thisObject);
2705
    UNUSED_PARAM(throwScope);
2706
    UNUSED_PARAM(state);
2707
    auto& impl = thisObject->wrapped();
2283
    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
2708
    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
2284
    return JSValue::encode(result);
2709
    return result;
2285
}
2710
}
2286
2711
2712
static inline JSValue jsTestObjCustomAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2287
2713
2288
EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2714
EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2289
{
2715
{
Lines 2296-2304 EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec52
2296
    if (UNLIKELY(!castedThis)) {
2722
    if (UNLIKELY(!castedThis)) {
2297
        return throwGetterTypeError(*state, throwScope, "TestObject", "customAttr");
2723
        return throwGetterTypeError(*state, throwScope, "TestObject", "customAttr");
2298
    }
2724
    }
2299
    return JSValue::encode(castedThis->customAttr(*state));
2725
    return JSValue::encode(jsTestObjCustomAttrGetter(state, castedThis, throwScope));
2726
}
2727
2728
static inline JSValue jsTestObjCustomAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2729
{
2730
    UNUSED_PARAM(thisObject);
2731
    UNUSED_PARAM(throwScope);
2732
    UNUSED_PARAM(state);
2733
    return thisObject->customAttr(*state);
2300
}
2734
}
2301
2735
2736
static inline JSValue jsTestObjOnfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2302
2737
2303
EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2738
EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2304
{
2739
{
Lines 2311-2320 EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, Proper a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec53
2311
    if (UNLIKELY(!castedThis)) {
2746
    if (UNLIKELY(!castedThis)) {
2312
        return throwGetterTypeError(*state, throwScope, "TestObject", "onfoo");
2747
        return throwGetterTypeError(*state, throwScope, "TestObject", "onfoo");
2313
    }
2748
    }
2749
    return JSValue::encode(jsTestObjOnfooGetter(state, castedThis, throwScope));
2750
}
2751
2752
static inline JSValue jsTestObjOnfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2753
{
2754
    UNUSED_PARAM(thisObject);
2755
    UNUSED_PARAM(throwScope);
2314
    UNUSED_PARAM(state);
2756
    UNUSED_PARAM(state);
2315
    return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
2757
    return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
2316
}
2758
}
2317
2759
2760
static inline JSValue jsTestObjOnwebkitfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2318
2761
2319
EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2762
EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2320
{
2763
{
Lines 2327-2336 EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec54
2327
    if (UNLIKELY(!castedThis)) {
2770
    if (UNLIKELY(!castedThis)) {
2328
        return throwGetterTypeError(*state, throwScope, "TestObject", "onwebkitfoo");
2771
        return throwGetterTypeError(*state, throwScope, "TestObject", "onwebkitfoo");
2329
    }
2772
    }
2773
    return JSValue::encode(jsTestObjOnwebkitfooGetter(state, castedThis, throwScope));
2774
}
2775
2776
static inline JSValue jsTestObjOnwebkitfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2777
{
2778
    UNUSED_PARAM(thisObject);
2779
    UNUSED_PARAM(throwScope);
2330
    UNUSED_PARAM(state);
2780
    UNUSED_PARAM(state);
2331
    return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
2781
    return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
2332
}
2782
}
2333
2783
2784
static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2334
2785
2335
EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2786
EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2336
{
2787
{
Lines 2343-2353 EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValu a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec55
2343
    if (UNLIKELY(!castedThis)) {
2794
    if (UNLIKELY(!castedThis)) {
2344
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttribute");
2795
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttribute");
2345
    }
2796
    }
2346
    auto& impl = castedThis->wrapped();
2797
    return JSValue::encode(jsTestObjWithScriptStateAttributeGetter(state, castedThis, throwScope));
2798
}
2799
2800
static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2801
{
2802
    UNUSED_PARAM(thisObject);
2803
    UNUSED_PARAM(throwScope);
2804
    UNUSED_PARAM(state);
2805
    auto& impl = thisObject->wrapped();
2347
    JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
2806
    JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
2348
    return JSValue::encode(result);
2807
    return result;
2349
}
2808
}
2350
2809
2810
static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2351
2811
2352
EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2812
EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2353
{
2813
{
Lines 2360-2370 EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec56
2360
    if (UNLIKELY(!castedThis)) {
2820
    if (UNLIKELY(!castedThis)) {
2361
        return throwGetterTypeError(*state, throwScope, "TestObject", "withCallWithAndSetterCallWithAttribute");
2821
        return throwGetterTypeError(*state, throwScope, "TestObject", "withCallWithAndSetterCallWithAttribute");
2362
    }
2822
    }
2363
    auto& impl = castedThis->wrapped();
2823
    return JSValue::encode(jsTestObjWithCallWithAndSetterCallWithAttributeGetter(state, castedThis, throwScope));
2824
}
2825
2826
static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2827
{
2828
    UNUSED_PARAM(thisObject);
2829
    UNUSED_PARAM(throwScope);
2830
    UNUSED_PARAM(state);
2831
    auto& impl = thisObject->wrapped();
2364
    JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
2832
    JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
2365
    return JSValue::encode(result);
2833
    return result;
2366
}
2834
}
2367
2835
2836
static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2368
2837
2369
EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2838
EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2370
{
2839
{
Lines 2377-2390 EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, En a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec57
2377
    if (UNLIKELY(!castedThis)) {
2846
    if (UNLIKELY(!castedThis)) {
2378
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttribute");
2847
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttribute");
2379
    }
2848
    }
2849
    return JSValue::encode(jsTestObjWithScriptExecutionContextAttributeGetter(state, castedThis, throwScope));
2850
}
2851
2852
static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2853
{
2854
    UNUSED_PARAM(thisObject);
2855
    UNUSED_PARAM(throwScope);
2856
    UNUSED_PARAM(state);
2380
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2857
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2381
    if (!context)
2858
    if (!context)
2382
        return JSValue::encode(jsUndefined());
2859
        return jsUndefined();
2383
    auto& impl = castedThis->wrapped();
2860
    auto& impl = thisObject->wrapped();
2384
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttribute(*context));
2861
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttribute(*context));
2385
    return JSValue::encode(result);
2862
    return result;
2386
}
2863
}
2387
2864
2865
static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2388
2866
2389
EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2867
EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2390
{
2868
{
Lines 2397-2409 EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, Encoded a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec58
2397
    if (UNLIKELY(!castedThis)) {
2875
    if (UNLIKELY(!castedThis)) {
2398
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttributeRaises");
2876
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttributeRaises");
2399
    }
2877
    }
2878
    return JSValue::encode(jsTestObjWithScriptStateAttributeRaisesGetter(state, castedThis, throwScope));
2879
}
2880
2881
static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2882
{
2883
    UNUSED_PARAM(thisObject);
2884
    UNUSED_PARAM(throwScope);
2885
    UNUSED_PARAM(state);
2400
    ExceptionCode ec = 0;
2886
    ExceptionCode ec = 0;
2401
    auto& impl = castedThis->wrapped();
2887
    auto& impl = thisObject->wrapped();
2402
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
2888
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
2403
    setDOMException(state, throwScope, ec);
2889
    setDOMException(state, throwScope, ec);
2404
    return JSValue::encode(result);
2890
    return result;
2405
}
2891
}
2406
2892
2893
static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2407
2894
2408
EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2895
EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2409
{
2896
{
Lines 2416-2431 EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* sta a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec59
2416
    if (UNLIKELY(!castedThis)) {
2903
    if (UNLIKELY(!castedThis)) {
2417
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttributeRaises");
2904
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttributeRaises");
2418
    }
2905
    }
2906
    return JSValue::encode(jsTestObjWithScriptExecutionContextAttributeRaisesGetter(state, castedThis, throwScope));
2907
}
2908
2909
static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2910
{
2911
    UNUSED_PARAM(thisObject);
2912
    UNUSED_PARAM(throwScope);
2913
    UNUSED_PARAM(state);
2419
    ExceptionCode ec = 0;
2914
    ExceptionCode ec = 0;
2420
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2915
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2421
    if (!context)
2916
    if (!context)
2422
        return JSValue::encode(jsUndefined());
2917
        return jsUndefined();
2423
    auto& impl = castedThis->wrapped();
2918
    auto& impl = thisObject->wrapped();
2424
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
2919
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
2425
    setDOMException(state, throwScope, ec);
2920
    setDOMException(state, throwScope, ec);
2426
    return JSValue::encode(result);
2921
    return result;
2427
}
2922
}
2428
2923
2924
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2429
2925
2430
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2926
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2431
{
2927
{
Lines 2438-2451 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecSt a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec60
2438
    if (UNLIKELY(!castedThis)) {
2934
    if (UNLIKELY(!castedThis)) {
2439
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttribute");
2935
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttribute");
2440
    }
2936
    }
2937
    return JSValue::encode(jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(state, castedThis, throwScope));
2938
}
2939
2940
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2941
{
2942
    UNUSED_PARAM(thisObject);
2943
    UNUSED_PARAM(throwScope);
2944
    UNUSED_PARAM(state);
2441
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2945
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2442
    if (!context)
2946
    if (!context)
2443
        return JSValue::encode(jsUndefined());
2947
        return jsUndefined();
2444
    auto& impl = castedThis->wrapped();
2948
    auto& impl = thisObject->wrapped();
2445
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
2949
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
2446
    return JSValue::encode(result);
2950
    return result;
2447
}
2951
}
2448
2952
2953
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2449
2954
2450
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2955
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2451
{
2956
{
Lines 2458-2473 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises( a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec61
2458
    if (UNLIKELY(!castedThis)) {
2963
    if (UNLIKELY(!castedThis)) {
2459
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttributeRaises");
2964
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttributeRaises");
2460
    }
2965
    }
2966
    return JSValue::encode(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(state, castedThis, throwScope));
2967
}
2968
2969
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
2970
{
2971
    UNUSED_PARAM(thisObject);
2972
    UNUSED_PARAM(throwScope);
2973
    UNUSED_PARAM(state);
2461
    ExceptionCode ec = 0;
2974
    ExceptionCode ec = 0;
2462
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2975
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2463
    if (!context)
2976
    if (!context)
2464
        return JSValue::encode(jsUndefined());
2977
        return jsUndefined();
2465
    auto& impl = castedThis->wrapped();
2978
    auto& impl = thisObject->wrapped();
2466
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
2979
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
2467
    setDOMException(state, throwScope, ec);
2980
    setDOMException(state, throwScope, ec);
2468
    return JSValue::encode(result);
2981
    return result;
2469
}
2982
}
2470
2983
2984
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2471
2985
2472
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2986
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2473
{
2987
{
Lines 2480-2493 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttrib a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec62
2480
    if (UNLIKELY(!castedThis)) {
2994
    if (UNLIKELY(!castedThis)) {
2481
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
2995
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
2482
    }
2996
    }
2997
    return JSValue::encode(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(state, castedThis, throwScope));
2998
}
2999
3000
static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3001
{
3002
    UNUSED_PARAM(thisObject);
3003
    UNUSED_PARAM(throwScope);
3004
    UNUSED_PARAM(state);
2483
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
3005
    auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2484
    if (!context)
3006
    if (!context)
2485
        return JSValue::encode(jsUndefined());
3007
        return jsUndefined();
2486
    auto& impl = castedThis->wrapped();
3008
    auto& impl = thisObject->wrapped();
2487
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
3009
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
2488
    return JSValue::encode(result);
3010
    return result;
2489
}
3011
}
2490
3012
3013
static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2491
3014
2492
EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3015
EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2493
{
3016
{
Lines 2500-2512 EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* stat a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec63
2500
    if (UNLIKELY(!castedThis)) {
3023
    if (UNLIKELY(!castedThis)) {
2501
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStackAttribute");
3024
        return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStackAttribute");
2502
    }
3025
    }
2503
    auto& impl = castedThis->wrapped();
3026
    return JSValue::encode(jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(state, castedThis, throwScope));
2504
    JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
2505
    return JSValue::encode(result);
2506
}
3027
}
2507
3028
3029
static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3030
{
3031
    UNUSED_PARAM(thisObject);
3032
    UNUSED_PARAM(throwScope);
3033
    UNUSED_PARAM(state);
3034
    auto& impl = thisObject->wrapped();
3035
    JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
3036
    return result;
3037
}
2508
3038
2509
#if ENABLE(Condition1)
3039
#if ENABLE(Condition1)
3040
static inline JSValue jsTestObjConditionalAttr1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3041
2510
EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
3042
EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
2511
{
3043
{
2512
    VM& vm = state->vm();
3044
    VM& vm = state->vm();
Lines 2518-2531 EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec64
2518
    if (UNLIKELY(!castedThis)) {
3050
    if (UNLIKELY(!castedThis)) {
2519
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr1");
3051
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr1");
2520
    }
3052
    }
2521
    auto& impl = castedThis->wrapped();
3053
    return JSValue::encode(jsTestObjConditionalAttr1Getter(state, castedThis, throwScope));
3054
}
3055
3056
static inline JSValue jsTestObjConditionalAttr1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3057
{
3058
    UNUSED_PARAM(thisObject);
3059
    UNUSED_PARAM(throwScope);
3060
    UNUSED_PARAM(state);
3061
    auto& impl = thisObject->wrapped();
2522
    JSValue result = jsNumber(impl.conditionalAttr1());
3062
    JSValue result = jsNumber(impl.conditionalAttr1());
2523
    return JSValue::encode(result);
3063
    return result;
2524
}
3064
}
2525
3065
2526
#endif
3066
#endif
2527
3067
2528
#if ENABLE(Condition1) && ENABLE(Condition2)
3068
#if ENABLE(Condition1) && ENABLE(Condition2)
3069
static inline JSValue jsTestObjConditionalAttr2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3070
2529
EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
3071
EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
2530
{
3072
{
2531
    VM& vm = state->vm();
3073
    VM& vm = state->vm();
Lines 2537-2550 EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec65
2537
    if (UNLIKELY(!castedThis)) {
3079
    if (UNLIKELY(!castedThis)) {
2538
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr2");
3080
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr2");
2539
    }
3081
    }
2540
    auto& impl = castedThis->wrapped();
3082
    return JSValue::encode(jsTestObjConditionalAttr2Getter(state, castedThis, throwScope));
3083
}
3084
3085
static inline JSValue jsTestObjConditionalAttr2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3086
{
3087
    UNUSED_PARAM(thisObject);
3088
    UNUSED_PARAM(throwScope);
3089
    UNUSED_PARAM(state);
3090
    auto& impl = thisObject->wrapped();
2541
    JSValue result = jsNumber(impl.conditionalAttr2());
3091
    JSValue result = jsNumber(impl.conditionalAttr2());
2542
    return JSValue::encode(result);
3092
    return result;
2543
}
3093
}
2544
3094
2545
#endif
3095
#endif
2546
3096
2547
#if ENABLE(Condition1) || ENABLE(Condition2)
3097
#if ENABLE(Condition1) || ENABLE(Condition2)
3098
static inline JSValue jsTestObjConditionalAttr3Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3099
2548
EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
3100
EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
2549
{
3101
{
2550
    VM& vm = state->vm();
3102
    VM& vm = state->vm();
Lines 2556-2569 EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec66
2556
    if (UNLIKELY(!castedThis)) {
3108
    if (UNLIKELY(!castedThis)) {
2557
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr3");
3109
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr3");
2558
    }
3110
    }
2559
    auto& impl = castedThis->wrapped();
3111
    return JSValue::encode(jsTestObjConditionalAttr3Getter(state, castedThis, throwScope));
3112
}
3113
3114
static inline JSValue jsTestObjConditionalAttr3Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3115
{
3116
    UNUSED_PARAM(thisObject);
3117
    UNUSED_PARAM(throwScope);
3118
    UNUSED_PARAM(state);
3119
    auto& impl = thisObject->wrapped();
2560
    JSValue result = jsNumber(impl.conditionalAttr3());
3120
    JSValue result = jsNumber(impl.conditionalAttr3());
2561
    return JSValue::encode(result);
3121
    return result;
2562
}
3122
}
2563
3123
2564
#endif
3124
#endif
2565
3125
2566
#if ENABLE(Condition1)
3126
#if ENABLE(Condition1)
3127
static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3128
2567
EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3129
EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2568
{
3130
{
2569
    VM& vm = state->vm();
3131
    VM& vm = state->vm();
Lines 2575-2586 EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec67
2575
    if (UNLIKELY(!castedThis)) {
3137
    if (UNLIKELY(!castedThis)) {
2576
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr4");
3138
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr4");
2577
    }
3139
    }
2578
    return JSValue::encode(JSTestObjectA::getConstructor(state->vm(), castedThis->globalObject()));
3140
    return JSValue::encode(jsTestObjConditionalAttr4ConstructorGetter(state, castedThis, throwScope));
3141
}
3142
3143
static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3144
{
3145
    UNUSED_PARAM(thisObject);
3146
    UNUSED_PARAM(throwScope);
3147
    UNUSED_PARAM(state);
3148
    return JSTestObjectA::getConstructor(state->vm(), thisObject->globalObject());
2579
}
3149
}
2580
3150
2581
#endif
3151
#endif
2582
3152
2583
#if ENABLE(Condition1) && ENABLE(Condition2)
3153
#if ENABLE(Condition1) && ENABLE(Condition2)
3154
static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3155
2584
EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3156
EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2585
{
3157
{
2586
    VM& vm = state->vm();
3158
    VM& vm = state->vm();
Lines 2592-2603 EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec68
2592
    if (UNLIKELY(!castedThis)) {
3164
    if (UNLIKELY(!castedThis)) {
2593
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr5");
3165
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr5");
2594
    }
3166
    }
2595
    return JSValue::encode(JSTestObjectB::getConstructor(state->vm(), castedThis->globalObject()));
3167
    return JSValue::encode(jsTestObjConditionalAttr5ConstructorGetter(state, castedThis, throwScope));
3168
}
3169
3170
static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3171
{
3172
    UNUSED_PARAM(thisObject);
3173
    UNUSED_PARAM(throwScope);
3174
    UNUSED_PARAM(state);
3175
    return JSTestObjectB::getConstructor(state->vm(), thisObject->globalObject());
2596
}
3176
}
2597
3177
2598
#endif
3178
#endif
2599
3179
2600
#if ENABLE(Condition1) || ENABLE(Condition2)
3180
#if ENABLE(Condition1) || ENABLE(Condition2)
3181
static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3182
2601
EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3183
EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2602
{
3184
{
2603
    VM& vm = state->vm();
3185
    VM& vm = state->vm();
Lines 2609-2619 EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSV a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec69
2609
    if (UNLIKELY(!castedThis)) {
3191
    if (UNLIKELY(!castedThis)) {
2610
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr6");
3192
        return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr6");
2611
    }
3193
    }
2612
    return JSValue::encode(JSTestObjectC::getConstructor(state->vm(), castedThis->globalObject()));
3194
    return JSValue::encode(jsTestObjConditionalAttr6ConstructorGetter(state, castedThis, throwScope));
3195
}
3196
3197
static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3198
{
3199
    UNUSED_PARAM(thisObject);
3200
    UNUSED_PARAM(throwScope);
3201
    UNUSED_PARAM(state);
3202
    return JSTestObjectC::getConstructor(state->vm(), thisObject->globalObject());
2613
}
3203
}
2614
3204
2615
#endif
3205
#endif
2616
3206
3207
static inline JSValue jsTestObjCachedAttribute1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3208
2617
EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisValue, PropertyName)
3209
EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisValue, PropertyName)
2618
{
3210
{
2619
    VM& vm = state->vm();
3211
    VM& vm = state->vm();
Lines 2625-2638 EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec70
2625
    if (UNLIKELY(!castedThis)) {
3217
    if (UNLIKELY(!castedThis)) {
2626
        return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute1");
3218
        return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute1");
2627
    }
3219
    }
2628
    if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
3220
    return JSValue::encode(jsTestObjCachedAttribute1Getter(state, castedThis, throwScope));
2629
        return JSValue::encode(cachedValue);
3221
}
2630
    auto& impl = castedThis->wrapped();
3222
3223
static inline JSValue jsTestObjCachedAttribute1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3224
{
3225
    UNUSED_PARAM(thisObject);
3226
    UNUSED_PARAM(throwScope);
3227
    UNUSED_PARAM(state);
3228
    if (JSValue cachedValue = thisObject->m_cachedAttribute1.get())
3229
        return cachedValue;
3230
    auto& impl = thisObject->wrapped();
2631
    JSValue result = impl.cachedAttribute1();
3231
    JSValue result = impl.cachedAttribute1();
2632
    castedThis->m_cachedAttribute1.set(state->vm(), castedThis, result);
3232
    thisObject->m_cachedAttribute1.set(state->vm(), thisObject, result);
2633
    return JSValue::encode(result);
3233
    return result;
2634
}
3234
}
2635
3235
3236
static inline JSValue jsTestObjCachedAttribute2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2636
3237
2637
EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisValue, PropertyName)
3238
EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisValue, PropertyName)
2638
{
3239
{
Lines 2645-2658 EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisVa a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec71
2645
    if (UNLIKELY(!castedThis)) {
3246
    if (UNLIKELY(!castedThis)) {
2646
        return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute2");
3247
        return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute2");
2647
    }
3248
    }
2648
    if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
3249
    return JSValue::encode(jsTestObjCachedAttribute2Getter(state, castedThis, throwScope));
2649
        return JSValue::encode(cachedValue);
3250
}
2650
    auto& impl = castedThis->wrapped();
3251
3252
static inline JSValue jsTestObjCachedAttribute2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3253
{
3254
    UNUSED_PARAM(thisObject);
3255
    UNUSED_PARAM(throwScope);
3256
    UNUSED_PARAM(state);
3257
    if (JSValue cachedValue = thisObject->m_cachedAttribute2.get())
3258
        return cachedValue;
3259
    auto& impl = thisObject->wrapped();
2651
    JSValue result = impl.cachedAttribute2();
3260
    JSValue result = impl.cachedAttribute2();
2652
    castedThis->m_cachedAttribute2.set(state->vm(), castedThis, result);
3261
    thisObject->m_cachedAttribute2.set(state->vm(), thisObject, result);
2653
    return JSValue::encode(result);
3262
    return result;
2654
}
3263
}
2655
3264
3265
static inline JSValue jsTestObjAnyAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2656
3266
2657
EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3267
EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2658
{
3268
{
Lines 2665-2675 EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec72
2665
    if (UNLIKELY(!castedThis)) {
3275
    if (UNLIKELY(!castedThis)) {
2666
        return throwGetterTypeError(*state, throwScope, "TestObject", "anyAttribute");
3276
        return throwGetterTypeError(*state, throwScope, "TestObject", "anyAttribute");
2667
    }
3277
    }
2668
    auto& impl = castedThis->wrapped();
3278
    return JSValue::encode(jsTestObjAnyAttributeGetter(state, castedThis, throwScope));
3279
}
3280
3281
static inline JSValue jsTestObjAnyAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3282
{
3283
    UNUSED_PARAM(thisObject);
3284
    UNUSED_PARAM(throwScope);
3285
    UNUSED_PARAM(state);
3286
    auto& impl = thisObject->wrapped();
2669
    JSValue result = impl.anyAttribute();
3287
    JSValue result = impl.anyAttribute();
2670
    return JSValue::encode(result);
3288
    return result;
2671
}
3289
}
2672
3290
3291
static inline JSValue jsTestObjContentDocumentGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2673
3292
2674
EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName)
3293
EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName)
2675
{
3294
{
Lines 2682-2691 EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisVal a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec73
2682
    if (UNLIKELY(!castedThis)) {
3301
    if (UNLIKELY(!castedThis)) {
2683
        return throwGetterTypeError(*state, throwScope, "TestObject", "contentDocument");
3302
        return throwGetterTypeError(*state, throwScope, "TestObject", "contentDocument");
2684
    }
3303
    }
2685
    auto& impl = castedThis->wrapped();
3304
    return JSValue::encode(jsTestObjContentDocumentGetter(state, castedThis, throwScope));
2686
    return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis->globalObject(), impl.contentDocument()) : jsNull());
3305
}
3306
3307
static inline JSValue jsTestObjContentDocumentGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3308
{
3309
    UNUSED_PARAM(thisObject);
3310
    UNUSED_PARAM(throwScope);
3311
    UNUSED_PARAM(state);
3312
    auto& impl = thisObject->wrapped();
3313
    return shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, thisObject->globalObject(), impl.contentDocument()) : jsNull();
2687
}
3314
}
2688
3315
3316
static inline JSValue jsTestObjMutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2689
3317
2690
EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
3318
EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
2691
{
3319
{
Lines 2698-2708 EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec74
2698
    if (UNLIKELY(!castedThis)) {
3326
    if (UNLIKELY(!castedThis)) {
2699
        return throwGetterTypeError(*state, throwScope, "TestObject", "mutablePoint");
3327
        return throwGetterTypeError(*state, throwScope, "TestObject", "mutablePoint");
2700
    }
3328
    }
2701
    auto& impl = castedThis->wrapped();
3329
    return JSValue::encode(jsTestObjMutablePointGetter(state, castedThis, throwScope));
2702
    JSValue result = toJS(state, castedThis->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
3330
}
2703
    return JSValue::encode(result);
3331
3332
static inline JSValue jsTestObjMutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3333
{
3334
    UNUSED_PARAM(thisObject);
3335
    UNUSED_PARAM(throwScope);
3336
    UNUSED_PARAM(state);
3337
    auto& impl = thisObject->wrapped();
3338
    JSValue result = toJS(state, thisObject->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
3339
    return result;
2704
}
3340
}
2705
3341
3342
static inline JSValue jsTestObjImmutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2706
3343
2707
EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
3344
EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
2708
{
3345
{
Lines 2715-2725 EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValu a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec75
2715
    if (UNLIKELY(!castedThis)) {
3352
    if (UNLIKELY(!castedThis)) {
2716
        return throwGetterTypeError(*state, throwScope, "TestObject", "immutablePoint");
3353
        return throwGetterTypeError(*state, throwScope, "TestObject", "immutablePoint");
2717
    }
3354
    }
2718
    auto& impl = castedThis->wrapped();
3355
    return JSValue::encode(jsTestObjImmutablePointGetter(state, castedThis, throwScope));
2719
    JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
3356
}
2720
    return JSValue::encode(result);
3357
3358
static inline JSValue jsTestObjImmutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3359
{
3360
    UNUSED_PARAM(thisObject);
3361
    UNUSED_PARAM(throwScope);
3362
    UNUSED_PARAM(state);
3363
    auto& impl = thisObject->wrapped();
3364
    JSValue result = toJS(state, thisObject->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
3365
    return result;
2721
}
3366
}
2722
3367
3368
static inline JSValue jsTestObjStrawberryGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2723
3369
2724
EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, PropertyName)
3370
EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, PropertyName)
2725
{
3371
{
Lines 2732-2742 EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec76
2732
    if (UNLIKELY(!castedThis)) {
3378
    if (UNLIKELY(!castedThis)) {
2733
        return throwGetterTypeError(*state, throwScope, "TestObject", "strawberry");
3379
        return throwGetterTypeError(*state, throwScope, "TestObject", "strawberry");
2734
    }
3380
    }
2735
    auto& impl = castedThis->wrapped();
3381
    return JSValue::encode(jsTestObjStrawberryGetter(state, castedThis, throwScope));
3382
}
3383
3384
static inline JSValue jsTestObjStrawberryGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3385
{
3386
    UNUSED_PARAM(thisObject);
3387
    UNUSED_PARAM(throwScope);
3388
    UNUSED_PARAM(state);
3389
    auto& impl = thisObject->wrapped();
2736
    JSValue result = jsNumber(impl.blueberry());
3390
    JSValue result = jsNumber(impl.blueberry());
2737
    return JSValue::encode(result);
3391
    return result;
2738
}
3392
}
2739
3393
3394
static inline JSValue jsTestObjDescriptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2740
3395
2741
EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, PropertyName)
3396
EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, PropertyName)
2742
{
3397
{
Lines 2749-2759 EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec77
2749
    if (UNLIKELY(!castedThis)) {
3404
    if (UNLIKELY(!castedThis)) {
2750
        return throwGetterTypeError(*state, throwScope, "TestObject", "description");
3405
        return throwGetterTypeError(*state, throwScope, "TestObject", "description");
2751
    }
3406
    }
2752
    auto& impl = castedThis->wrapped();
3407
    return JSValue::encode(jsTestObjDescriptionGetter(state, castedThis, throwScope));
3408
}
3409
3410
static inline JSValue jsTestObjDescriptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3411
{
3412
    UNUSED_PARAM(thisObject);
3413
    UNUSED_PARAM(throwScope);
3414
    UNUSED_PARAM(state);
3415
    auto& impl = thisObject->wrapped();
2753
    JSValue result = jsNumber(impl.description());
3416
    JSValue result = jsNumber(impl.description());
2754
    return JSValue::encode(result);
3417
    return result;
2755
}
3418
}
2756
3419
3420
static inline JSValue jsTestObjIdGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2757
3421
2758
EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyName)
3422
EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyName)
2759
{
3423
{
Lines 2766-2776 EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyN a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec78
2766
    if (UNLIKELY(!castedThis)) {
3430
    if (UNLIKELY(!castedThis)) {
2767
        return throwGetterTypeError(*state, throwScope, "TestObject", "id");
3431
        return throwGetterTypeError(*state, throwScope, "TestObject", "id");
2768
    }
3432
    }
2769
    auto& impl = castedThis->wrapped();
3433
    return JSValue::encode(jsTestObjIdGetter(state, castedThis, throwScope));
3434
}
3435
3436
static inline JSValue jsTestObjIdGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3437
{
3438
    UNUSED_PARAM(thisObject);
3439
    UNUSED_PARAM(throwScope);
3440
    UNUSED_PARAM(state);
3441
    auto& impl = thisObject->wrapped();
2770
    JSValue result = jsNumber(impl.id());
3442
    JSValue result = jsNumber(impl.id());
2771
    return JSValue::encode(result);
3443
    return result;
2772
}
3444
}
2773
3445
3446
static inline JSValue jsTestObjHashGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2774
3447
2775
EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
3448
EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
2776
{
3449
{
Lines 2783-2793 EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, Propert a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec79
2783
    if (UNLIKELY(!castedThis)) {
3456
    if (UNLIKELY(!castedThis)) {
2784
        return throwGetterTypeError(*state, throwScope, "TestObject", "hash");
3457
        return throwGetterTypeError(*state, throwScope, "TestObject", "hash");
2785
    }
3458
    }
2786
    auto& impl = castedThis->wrapped();
3459
    return JSValue::encode(jsTestObjHashGetter(state, castedThis, throwScope));
3460
}
3461
3462
static inline JSValue jsTestObjHashGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3463
{
3464
    UNUSED_PARAM(thisObject);
3465
    UNUSED_PARAM(throwScope);
3466
    UNUSED_PARAM(state);
3467
    auto& impl = thisObject->wrapped();
2787
    JSValue result = jsStringWithCache(state, impl.hash());
3468
    JSValue result = jsStringWithCache(state, impl.hash());
2788
    return JSValue::encode(result);
3469
    return result;
2789
}
3470
}
2790
3471
3472
static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2791
3473
2792
EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3474
EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2793
{
3475
{
Lines 2800-2810 EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec80
2800
    if (UNLIKELY(!castedThis)) {
3482
    if (UNLIKELY(!castedThis)) {
2801
        return throwGetterTypeError(*state, throwScope, "TestObject", "replaceableAttribute");
3483
        return throwGetterTypeError(*state, throwScope, "TestObject", "replaceableAttribute");
2802
    }
3484
    }
2803
    auto& impl = castedThis->wrapped();
3485
    return JSValue::encode(jsTestObjReplaceableAttributeGetter(state, castedThis, throwScope));
3486
}
3487
3488
static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3489
{
3490
    UNUSED_PARAM(thisObject);
3491
    UNUSED_PARAM(throwScope);
3492
    UNUSED_PARAM(state);
3493
    auto& impl = thisObject->wrapped();
2804
    JSValue result = jsNumber(impl.replaceableAttribute());
3494
    JSValue result = jsNumber(impl.replaceableAttribute());
2805
    return JSValue::encode(result);
3495
    return result;
2806
}
3496
}
2807
3497
3498
static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2808
3499
2809
EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3500
EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2810
{
3501
{
Lines 2817-2827 EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec81
2817
    if (UNLIKELY(!castedThis)) {
3508
    if (UNLIKELY(!castedThis)) {
2818
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableDoubleAttribute");
3509
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableDoubleAttribute");
2819
    }
3510
    }
2820
    auto& impl = castedThis->wrapped();
3511
    return JSValue::encode(jsTestObjNullableDoubleAttributeGetter(state, castedThis, throwScope));
3512
}
3513
3514
static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3515
{
3516
    UNUSED_PARAM(thisObject);
3517
    UNUSED_PARAM(throwScope);
3518
    UNUSED_PARAM(state);
3519
    auto& impl = thisObject->wrapped();
2821
    JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
3520
    JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
2822
    return JSValue::encode(result);
3521
    return result;
2823
}
3522
}
2824
3523
3524
static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2825
3525
2826
EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3526
EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2827
{
3527
{
Lines 2834-2844 EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue t a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec82
2834
    if (UNLIKELY(!castedThis)) {
3534
    if (UNLIKELY(!castedThis)) {
2835
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongAttribute");
3535
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongAttribute");
2836
    }
3536
    }
2837
    auto& impl = castedThis->wrapped();
3537
    return JSValue::encode(jsTestObjNullableLongAttributeGetter(state, castedThis, throwScope));
3538
}
3539
3540
static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3541
{
3542
    UNUSED_PARAM(thisObject);
3543
    UNUSED_PARAM(throwScope);
3544
    UNUSED_PARAM(state);
3545
    auto& impl = thisObject->wrapped();
2838
    JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
3546
    JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
2839
    return JSValue::encode(result);
3547
    return result;
2840
}
3548
}
2841
3549
3550
static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2842
3551
2843
EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3552
EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2844
{
3553
{
Lines 2851-2861 EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValu a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec83
2851
    if (UNLIKELY(!castedThis)) {
3560
    if (UNLIKELY(!castedThis)) {
2852
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableBooleanAttribute");
3561
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableBooleanAttribute");
2853
    }
3562
    }
2854
    auto& impl = castedThis->wrapped();
3563
    return JSValue::encode(jsTestObjNullableBooleanAttributeGetter(state, castedThis, throwScope));
3564
}
3565
3566
static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3567
{
3568
    UNUSED_PARAM(thisObject);
3569
    UNUSED_PARAM(throwScope);
3570
    UNUSED_PARAM(state);
3571
    auto& impl = thisObject->wrapped();
2855
    JSValue result = jsBoolean(impl.nullableBooleanAttribute());
3572
    JSValue result = jsBoolean(impl.nullableBooleanAttribute());
2856
    return JSValue::encode(result);
3573
    return result;
2857
}
3574
}
2858
3575
3576
static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2859
3577
2860
EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3578
EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2861
{
3579
{
Lines 2868-2878 EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec84
2868
    if (UNLIKELY(!castedThis)) {
3586
    if (UNLIKELY(!castedThis)) {
2869
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringAttribute");
3587
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringAttribute");
2870
    }
3588
    }
2871
    auto& impl = castedThis->wrapped();
3589
    return JSValue::encode(jsTestObjNullableStringAttributeGetter(state, castedThis, throwScope));
3590
}
3591
3592
static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3593
{
3594
    UNUSED_PARAM(thisObject);
3595
    UNUSED_PARAM(throwScope);
3596
    UNUSED_PARAM(state);
3597
    auto& impl = thisObject->wrapped();
2872
    JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
3598
    JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
2873
    return JSValue::encode(result);
3599
    return result;
2874
}
3600
}
2875
3601
3602
static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2876
3603
2877
EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3604
EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2878
{
3605
{
Lines 2885-2895 EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJ a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec85
2885
    if (UNLIKELY(!castedThis)) {
3612
    if (UNLIKELY(!castedThis)) {
2886
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongSettableAttribute");
3613
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongSettableAttribute");
2887
    }
3614
    }
2888
    auto& impl = castedThis->wrapped();
3615
    return JSValue::encode(jsTestObjNullableLongSettableAttributeGetter(state, castedThis, throwScope));
3616
}
3617
3618
static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3619
{
3620
    UNUSED_PARAM(thisObject);
3621
    UNUSED_PARAM(throwScope);
3622
    UNUSED_PARAM(state);
3623
    auto& impl = thisObject->wrapped();
2889
    JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
3624
    JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
2890
    return JSValue::encode(result);
3625
    return result;
2891
}
3626
}
2892
3627
3628
static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2893
3629
2894
EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3630
EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2895
{
3631
{
Lines 2902-2912 EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, Encode a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec86
2902
    if (UNLIKELY(!castedThis)) {
3638
    if (UNLIKELY(!castedThis)) {
2903
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringSettableAttribute");
3639
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringSettableAttribute");
2904
    }
3640
    }
2905
    auto& impl = castedThis->wrapped();
3641
    return JSValue::encode(jsTestObjNullableStringSettableAttributeGetter(state, castedThis, throwScope));
3642
}
3643
3644
static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3645
{
3646
    UNUSED_PARAM(thisObject);
3647
    UNUSED_PARAM(throwScope);
3648
    UNUSED_PARAM(state);
3649
    auto& impl = thisObject->wrapped();
2906
    JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
3650
    JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
2907
    return JSValue::encode(result);
3651
    return result;
2908
}
3652
}
2909
3653
3654
static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2910
3655
2911
EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3656
EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2912
{
3657
{
Lines 2919-2929 EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec87
2919
    if (UNLIKELY(!castedThis)) {
3664
    if (UNLIKELY(!castedThis)) {
2920
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableUSVStringSettableAttribute");
3665
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableUSVStringSettableAttribute");
2921
    }
3666
    }
2922
    auto& impl = castedThis->wrapped();
3667
    return JSValue::encode(jsTestObjNullableUSVStringSettableAttributeGetter(state, castedThis, throwScope));
3668
}
3669
3670
static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3671
{
3672
    UNUSED_PARAM(thisObject);
3673
    UNUSED_PARAM(throwScope);
3674
    UNUSED_PARAM(state);
3675
    auto& impl = thisObject->wrapped();
2923
    JSValue result = jsStringOrNull(state, impl.nullableUSVStringSettableAttribute());
3676
    JSValue result = jsStringOrNull(state, impl.nullableUSVStringSettableAttribute());
2924
    return JSValue::encode(result);
3677
    return result;
2925
}
3678
}
2926
3679
3680
static inline JSValue jsTestObjNullableStringValueGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2927
3681
2928
EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
3682
EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
2929
{
3683
{
Lines 2936-2948 EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thi a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec88
2936
    if (UNLIKELY(!castedThis)) {
3690
    if (UNLIKELY(!castedThis)) {
2937
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringValue");
3691
        return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringValue");
2938
    }
3692
    }
3693
    return JSValue::encode(jsTestObjNullableStringValueGetter(state, castedThis, throwScope));
3694
}
3695
3696
static inline JSValue jsTestObjNullableStringValueGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3697
{
3698
    UNUSED_PARAM(thisObject);
3699
    UNUSED_PARAM(throwScope);
3700
    UNUSED_PARAM(state);
2939
    ExceptionCode ec = 0;
3701
    ExceptionCode ec = 0;
2940
    auto& impl = castedThis->wrapped();
3702
    auto& impl = thisObject->wrapped();
2941
    JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
3703
    JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
2942
    setDOMException(state, throwScope, ec);
3704
    setDOMException(state, throwScope, ec);
2943
    return JSValue::encode(result);
3705
    return result;
2944
}
3706
}
2945
3707
3708
static inline JSValue jsTestObjAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2946
3709
2947
EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3710
EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2948
{
3711
{
Lines 2955-2965 EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, Pr a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec89
2955
    if (UNLIKELY(!castedThis)) {
3718
    if (UNLIKELY(!castedThis)) {
2956
        return throwGetterTypeError(*state, throwScope, "TestObject", "attribute");
3719
        return throwGetterTypeError(*state, throwScope, "TestObject", "attribute");
2957
    }
3720
    }
2958
    auto& impl = castedThis->wrapped();
3721
    return JSValue::encode(jsTestObjAttributeGetter(state, castedThis, throwScope));
3722
}
3723
3724
static inline JSValue jsTestObjAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3725
{
3726
    UNUSED_PARAM(thisObject);
3727
    UNUSED_PARAM(throwScope);
3728
    UNUSED_PARAM(state);
3729
    auto& impl = thisObject->wrapped();
2959
    JSValue result = jsStringWithCache(state, impl.attribute());
3730
    JSValue result = jsStringWithCache(state, impl.attribute());
2960
    return JSValue::encode(result);
3731
    return result;
2961
}
3732
}
2962
3733
3734
static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2963
3735
2964
EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJSValue thisValue, PropertyName)
3736
EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJSValue thisValue, PropertyName)
2965
{
3737
{
Lines 2972-2982 EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJ a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec90
2972
    if (UNLIKELY(!castedThis)) {
3744
    if (UNLIKELY(!castedThis)) {
2973
        return throwGetterTypeError(*state, throwScope, "TestObject", "attributeWithReservedEnumType");
3745
        return throwGetterTypeError(*state, throwScope, "TestObject", "attributeWithReservedEnumType");
2974
    }
3746
    }
2975
    auto& impl = castedThis->wrapped();
3747
    return JSValue::encode(jsTestObjAttributeWithReservedEnumTypeGetter(state, castedThis, throwScope));
3748
}
3749
3750
static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3751
{
3752
    UNUSED_PARAM(thisObject);
3753
    UNUSED_PARAM(throwScope);
3754
    UNUSED_PARAM(state);
3755
    auto& impl = thisObject->wrapped();
2976
    JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
3756
    JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
2977
    return JSValue::encode(result);
3757
    return result;
2978
}
3758
}
2979
3759
3760
static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2980
3761
2981
EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3762
EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2982
{
3763
{
Lines 2989-2999 EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec91
2989
    if (UNLIKELY(!castedThis)) {
3770
    if (UNLIKELY(!castedThis)) {
2990
        return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsAttribute");
3771
        return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsAttribute");
2991
    }
3772
    }
2992
    auto& impl = castedThis->wrapped();
3773
    return JSValue::encode(jsTestObjPutForwardsAttributeGetter(state, castedThis, throwScope));
2993
    JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsAttribute());
3774
}
2994
    return JSValue::encode(result);
3775
3776
static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3777
{
3778
    UNUSED_PARAM(thisObject);
3779
    UNUSED_PARAM(throwScope);
3780
    UNUSED_PARAM(state);
3781
    auto& impl = thisObject->wrapped();
3782
    JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsAttribute());
3783
    return result;
2995
}
3784
}
2996
3785
3786
static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
2997
3787
2998
EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3788
EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2999
{
3789
{
Lines 3006-3016 EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJS a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec92
3006
    if (UNLIKELY(!castedThis)) {
3796
    if (UNLIKELY(!castedThis)) {
3007
        return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsNullableAttribute");
3797
        return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsNullableAttribute");
3008
    }
3798
    }
3009
    auto& impl = castedThis->wrapped();
3799
    return JSValue::encode(jsTestObjPutForwardsNullableAttributeGetter(state, castedThis, throwScope));
3010
    JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsNullableAttribute());
3800
}
3011
    return JSValue::encode(result);
3801
3802
static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3803
{
3804
    UNUSED_PARAM(thisObject);
3805
    UNUSED_PARAM(throwScope);
3806
    UNUSED_PARAM(state);
3807
    auto& impl = thisObject->wrapped();
3808
    JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsNullableAttribute());
3809
    return result;
3012
}
3810
}
3013
3811
3812
static inline JSValue jsTestObjStringifierAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
3014
3813
3015
EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3814
EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3016
{
3815
{
Lines 3023-3033 EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue th a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec93
3023
    if (UNLIKELY(!castedThis)) {
3822
    if (UNLIKELY(!castedThis)) {
3024
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringifierAttribute");
3823
        return throwGetterTypeError(*state, throwScope, "TestObject", "stringifierAttribute");
3025
    }
3824
    }
3026
    auto& impl = castedThis->wrapped();
3825
    return JSValue::encode(jsTestObjStringifierAttributeGetter(state, castedThis, throwScope));
3027
    JSValue result = jsStringWithCache(state, impl.stringifierAttribute());
3028
    return JSValue::encode(result);
3029
}
3826
}
3030
3827
3828
static inline JSValue jsTestObjStringifierAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
3829
{
3830
    UNUSED_PARAM(thisObject);
3831
    UNUSED_PARAM(throwScope);
3832
    UNUSED_PARAM(state);
3833
    auto& impl = thisObject->wrapped();
3834
    JSValue result = jsStringWithCache(state, impl.stringifierAttribute());
3835
    return result;
3836
}
3031
3837
3032
EncodedJSValue jsTestObjConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3838
EncodedJSValue jsTestObjConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3033
{
3839
{
Lines 7375-7380 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToString(ExecState* state a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec94
7375
    return JSValue::encode(result);
8181
    return JSValue::encode(result);
7376
}
8182
}
7377
8183
8184
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToJSON(ExecState* state)
8185
{
8186
    ASSERT(state);
8187
    auto castedThis = jsDynamicCast<JSTestObj*>(state->thisValue());
8188
    VM& vm = state->vm();
8189
    auto throwScope = DECLARE_THROW_SCOPE(vm);
8190
    if (UNLIKELY(!castedThis)){
8191
        return throwThisTypeError(*state, throwScope, "TestObj", "toJSON");
8192
    }
8193
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
8194
8195
    auto* result = constructEmptyObject(state);
8196
    result->putDirect(vm, Identifier::fromString(&vm, "readOnlyStringAttr"), jsTestObjReadOnlyStringAttrGetter(state, castedThis, throwScope));
8197
    result->putDirect(vm, Identifier::fromString(&vm, "enumAttr"), jsTestObjEnumAttrGetter(state, castedThis, throwScope));
8198
    result->putDirect(vm, Identifier::fromString(&vm, "longAttr"), jsTestObjLongAttrGetter(state, castedThis, throwScope));
8199
    result->putDirect(vm, Identifier::fromString(&vm, "create"), jsTestObjCreateGetter(state, castedThis, throwScope));
8200
    return JSValue::encode(result);
8201
}
8202
7378
void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
8203
void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
7379
{
8204
{
7380
    auto* thisObject = jsCast<JSTestObj*>(cell);
8205
    auto* thisObject = jsCast<JSTestObj*>(cell);
- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp -21 / +66 lines
Lines 132-137 void JSTestSerializedScriptValueInterface::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec1
132
    thisObject->JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface();
132
    thisObject->JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface();
133
}
133
}
134
134
135
static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
136
135
EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
137
EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
136
{
138
{
137
    VM& vm = state->vm();
139
    VM& vm = state->vm();
Lines 143-153 EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, Encod a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec2
143
    if (UNLIKELY(!castedThis)) {
145
    if (UNLIKELY(!castedThis)) {
144
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "value");
146
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "value");
145
    }
147
    }
146
    auto& impl = castedThis->wrapped();
148
    return JSValue::encode(jsTestSerializedScriptValueInterfaceValueGetter(state, castedThis, throwScope));
147
    JSValue result = impl.value() ? impl.value()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
148
    return JSValue::encode(result);
149
}
149
}
150
150
151
static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
152
{
153
    UNUSED_PARAM(thisObject);
154
    UNUSED_PARAM(throwScope);
155
    UNUSED_PARAM(state);
156
    auto& impl = thisObject->wrapped();
157
    JSValue result = impl.value() ? impl.value()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
158
    return result;
159
}
160
161
static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
151
162
152
EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
163
EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
153
{
164
{
Lines 160-170 EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* stat a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec3
160
    if (UNLIKELY(!castedThis)) {
171
    if (UNLIKELY(!castedThis)) {
161
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "readonlyValue");
172
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "readonlyValue");
162
    }
173
    }
163
    auto& impl = castedThis->wrapped();
174
    return JSValue::encode(jsTestSerializedScriptValueInterfaceReadonlyValueGetter(state, castedThis, throwScope));
164
    JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
165
    return JSValue::encode(result);
166
}
175
}
167
176
177
static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
178
{
179
    UNUSED_PARAM(thisObject);
180
    UNUSED_PARAM(throwScope);
181
    UNUSED_PARAM(state);
182
    auto& impl = thisObject->wrapped();
183
    JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
184
    return result;
185
}
186
187
static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
168
188
169
EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
189
EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
170
{
190
{
Lines 177-190 EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* state, a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec4
177
    if (UNLIKELY(!castedThis)) {
197
    if (UNLIKELY(!castedThis)) {
178
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedValue");
198
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedValue");
179
    }
199
    }
180
    if (JSValue cachedValue = castedThis->m_cachedValue.get())
200
    return JSValue::encode(jsTestSerializedScriptValueInterfaceCachedValueGetter(state, castedThis, throwScope));
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
}
201
}
187
202
203
static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
204
{
205
    UNUSED_PARAM(thisObject);
206
    UNUSED_PARAM(throwScope);
207
    UNUSED_PARAM(state);
208
    if (JSValue cachedValue = thisObject->m_cachedValue.get())
209
        return cachedValue;
210
    auto& impl = thisObject->wrapped();
211
    JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
212
    thisObject->m_cachedValue.set(state->vm(), thisObject, result);
213
    return result;
214
}
215
216
static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
188
217
189
EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* state, EncodedJSValue thisValue, PropertyName)
218
EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* state, EncodedJSValue thisValue, PropertyName)
190
{
219
{
Lines 197-207 EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* state, Encod a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec5
197
    if (UNLIKELY(!castedThis)) {
226
    if (UNLIKELY(!castedThis)) {
198
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "ports");
227
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "ports");
199
    }
228
    }
200
    auto& impl = castedThis->wrapped();
229
    return JSValue::encode(jsTestSerializedScriptValueInterfacePortsGetter(state, castedThis, throwScope));
201
    JSValue result = jsArray(state, castedThis->globalObject(), impl.ports());
230
}
202
    return JSValue::encode(result);
231
232
static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
233
{
234
    UNUSED_PARAM(thisObject);
235
    UNUSED_PARAM(throwScope);
236
    UNUSED_PARAM(state);
237
    auto& impl = thisObject->wrapped();
238
    JSValue result = jsArray(state, thisObject->globalObject(), impl.ports());
239
    return result;
203
}
240
}
204
241
242
static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
205
243
206
EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
244
EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
207
{
245
{
Lines 214-227 EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp_sec6
214
    if (UNLIKELY(!castedThis)) {
252
    if (UNLIKELY(!castedThis)) {
215
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedReadonlyValue");
253
        return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedReadonlyValue");
216
    }
254
    }
217
    if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
255
    return JSValue::encode(jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(state, castedThis, throwScope));
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
}
256
}
224
257
258
static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
259
{
260
    UNUSED_PARAM(thisObject);
261
    UNUSED_PARAM(throwScope);
262
    UNUSED_PARAM(state);
263
    if (JSValue cachedValue = thisObject->m_cachedReadonlyValue.get())
264
        return cachedValue;
265
    auto& impl = thisObject->wrapped();
266
    JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
267
    thisObject->m_cachedReadonlyValue.set(state->vm(), thisObject, result);
268
    return result;
269
}
225
270
226
EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
271
EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
227
{
272
{
- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp -15 / +78 lines
Lines 210-215 void JSTestTypedefs::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec1
210
    thisObject->JSTestTypedefs::~JSTestTypedefs();
210
    thisObject->JSTestTypedefs::~JSTestTypedefs();
211
}
211
}
212
212
213
static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
214
213
EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
215
EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
214
{
216
{
215
    VM& vm = state->vm();
217
    VM& vm = state->vm();
Lines 221-231 EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSVal a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec2
221
    if (UNLIKELY(!castedThis)) {
223
    if (UNLIKELY(!castedThis)) {
222
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "unsignedLongLongAttr");
224
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "unsignedLongLongAttr");
223
    }
225
    }
224
    auto& impl = castedThis->wrapped();
226
    return JSValue::encode(jsTestTypedefsUnsignedLongLongAttrGetter(state, castedThis, throwScope));
227
}
228
229
static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
230
{
231
    UNUSED_PARAM(thisObject);
232
    UNUSED_PARAM(throwScope);
233
    UNUSED_PARAM(state);
234
    auto& impl = thisObject->wrapped();
225
    JSValue result = jsNumber(impl.unsignedLongLongAttr());
235
    JSValue result = jsNumber(impl.unsignedLongLongAttr());
226
    return JSValue::encode(result);
236
    return result;
227
}
237
}
228
238
239
static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
229
240
230
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
241
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
231
{
242
{
Lines 238-248 EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* state, En a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec3
238
    if (UNLIKELY(!castedThis)) {
249
    if (UNLIKELY(!castedThis)) {
239
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "immutableSerializedScriptValue");
250
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "immutableSerializedScriptValue");
240
    }
251
    }
241
    auto& impl = castedThis->wrapped();
252
    return JSValue::encode(jsTestTypedefsImmutableSerializedScriptValueGetter(state, castedThis, throwScope));
242
    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
243
    return JSValue::encode(result);
244
}
253
}
245
254
255
static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
256
{
257
    UNUSED_PARAM(thisObject);
258
    UNUSED_PARAM(throwScope);
259
    UNUSED_PARAM(state);
260
    auto& impl = thisObject->wrapped();
261
    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
262
    return result;
263
}
264
265
static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
246
266
247
EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
267
EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
248
{
268
{
Lines 255-263 EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSVa a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec4
255
    if (UNLIKELY(!castedThis)) {
275
    if (UNLIKELY(!castedThis)) {
256
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "TestSubObj");
276
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "TestSubObj");
257
    }
277
    }
258
    return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
278
    return JSValue::encode(jsTestTypedefsConstructorTestSubObjGetter(state, castedThis, throwScope));
279
}
280
281
static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
282
{
283
    UNUSED_PARAM(thisObject);
284
    UNUSED_PARAM(throwScope);
285
    UNUSED_PARAM(state);
286
    return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
259
}
287
}
260
288
289
static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
261
290
262
EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
291
EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
263
{
292
{
Lines 270-282 EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJS a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec5
270
    if (UNLIKELY(!castedThis)) {
299
    if (UNLIKELY(!castedThis)) {
271
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithGetterException");
300
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithGetterException");
272
    }
301
    }
302
    return JSValue::encode(jsTestTypedefsAttrWithGetterExceptionGetter(state, castedThis, throwScope));
303
}
304
305
static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
306
{
307
    UNUSED_PARAM(thisObject);
308
    UNUSED_PARAM(throwScope);
309
    UNUSED_PARAM(state);
273
    ExceptionCode ec = 0;
310
    ExceptionCode ec = 0;
274
    auto& impl = castedThis->wrapped();
311
    auto& impl = thisObject->wrapped();
275
    JSValue result = jsNumber(impl.attrWithGetterException(ec));
312
    JSValue result = jsNumber(impl.attrWithGetterException(ec));
276
    setDOMException(state, throwScope, ec);
313
    setDOMException(state, throwScope, ec);
277
    return JSValue::encode(result);
314
    return result;
278
}
315
}
279
316
317
static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
280
318
281
EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
319
EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
282
{
320
{
Lines 289-299 EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJS a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec6
289
    if (UNLIKELY(!castedThis)) {
327
    if (UNLIKELY(!castedThis)) {
290
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithSetterException");
328
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithSetterException");
291
    }
329
    }
292
    auto& impl = castedThis->wrapped();
330
    return JSValue::encode(jsTestTypedefsAttrWithSetterExceptionGetter(state, castedThis, throwScope));
331
}
332
333
static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
334
{
335
    UNUSED_PARAM(thisObject);
336
    UNUSED_PARAM(throwScope);
337
    UNUSED_PARAM(state);
338
    auto& impl = thisObject->wrapped();
293
    JSValue result = jsNumber(impl.attrWithSetterException());
339
    JSValue result = jsNumber(impl.attrWithSetterException());
294
    return JSValue::encode(result);
340
    return result;
295
}
341
}
296
342
343
static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
297
344
298
EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
345
EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
299
{
346
{
Lines 306-318 EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec7
306
    if (UNLIKELY(!castedThis)) {
353
    if (UNLIKELY(!castedThis)) {
307
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithGetterException");
354
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithGetterException");
308
    }
355
    }
356
    return JSValue::encode(jsTestTypedefsStringAttrWithGetterExceptionGetter(state, castedThis, throwScope));
357
}
358
359
static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
360
{
361
    UNUSED_PARAM(thisObject);
362
    UNUSED_PARAM(throwScope);
363
    UNUSED_PARAM(state);
309
    ExceptionCode ec = 0;
364
    ExceptionCode ec = 0;
310
    auto& impl = castedThis->wrapped();
365
    auto& impl = thisObject->wrapped();
311
    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
366
    JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
312
    setDOMException(state, throwScope, ec);
367
    setDOMException(state, throwScope, ec);
313
    return JSValue::encode(result);
368
    return result;
314
}
369
}
315
370
371
static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
316
372
317
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
373
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
318
{
374
{
Lines 325-335 EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, Enc a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec8
325
    if (UNLIKELY(!castedThis)) {
381
    if (UNLIKELY(!castedThis)) {
326
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithSetterException");
382
        return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithSetterException");
327
    }
383
    }
328
    auto& impl = castedThis->wrapped();
384
    return JSValue::encode(jsTestTypedefsStringAttrWithSetterExceptionGetter(state, castedThis, throwScope));
329
    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
330
    return JSValue::encode(result);
331
}
385
}
332
386
387
static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
388
{
389
    UNUSED_PARAM(thisObject);
390
    UNUSED_PARAM(throwScope);
391
    UNUSED_PARAM(state);
392
    auto& impl = thisObject->wrapped();
393
    JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
394
    return result;
395
}
333
396
334
EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
397
EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
335
{
398
{
- a/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp -3 / +12 lines
Lines 132-137 void JSattribute::destroy(JSC::JSCell* cell) a/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp_sec1
132
    thisObject->JSattribute::~JSattribute();
132
    thisObject->JSattribute::~JSattribute();
133
}
133
}
134
134
135
static inline JSValue jsattributeReadonlyGetter(ExecState*, JSattribute*, ThrowScope& throwScope);
136
135
EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, PropertyName)
137
EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, PropertyName)
136
{
138
{
137
    VM& vm = state->vm();
139
    VM& vm = state->vm();
Lines 143-153 EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, P a/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp_sec2
143
    if (UNLIKELY(!castedThis)) {
145
    if (UNLIKELY(!castedThis)) {
144
        return throwGetterTypeError(*state, throwScope, "attribute", "readonly");
146
        return throwGetterTypeError(*state, throwScope, "attribute", "readonly");
145
    }
147
    }
146
    auto& impl = castedThis->wrapped();
148
    return JSValue::encode(jsattributeReadonlyGetter(state, castedThis, throwScope));
147
    JSValue result = jsStringWithCache(state, impl.readonly());
148
    return JSValue::encode(result);
149
}
149
}
150
150
151
static inline JSValue jsattributeReadonlyGetter(ExecState* state, JSattribute* thisObject, ThrowScope& throwScope)
152
{
153
    UNUSED_PARAM(thisObject);
154
    UNUSED_PARAM(throwScope);
155
    UNUSED_PARAM(state);
156
    auto& impl = thisObject->wrapped();
157
    JSValue result = jsStringWithCache(state, impl.readonly());
158
    return result;
159
}
151
160
152
EncodedJSValue jsattributeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
161
EncodedJSValue jsattributeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
153
{
162
{
- a/Source/WebCore/bindings/scripts/test/TestNode.idl +2 lines
Lines 27-30 a/Source/WebCore/bindings/scripts/test/TestNode.idl_sec1
27
27
28
    [EnabledAtRuntime=DOMIterator] iterable<TestNode>;
28
    [EnabledAtRuntime=DOMIterator] iterable<TestNode>;
29
    Promise testWorkerPromise();
29
    Promise testWorkerPromise();
30
31
    serializer;
30
};
32
};
- a/Source/WebCore/bindings/scripts/test/TestObj.idl +3 lines
Lines 410-415 enum TestConfidence { "high", "kinda-low" }; a/Source/WebCore/bindings/scripts/test/TestObj.idl_sec1
410
    void attachShadowRoot(TestDictionary init);
410
    void attachShadowRoot(TestDictionary init);
411
411
412
    stringifier attribute USVString stringifierAttribute;
412
    stringifier attribute USVString stringifierAttribute;
413
414
415
    serializer = {readOnlyStringAttr, create, enumAttr, longAttr};
413
};
416
};
414
417
415
// The following comment should not generate any code.
418
// The following comment should not generate any code.
- a/LayoutTests/ChangeLog +15 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2016-09-26  Alejandro G. Castro  <alex@igalia.com>
2
3
        Add WebIDL special operation support: serializer
4
        https://bugs.webkit.org/show_bug.cgi?id=156293
5
6
        Reviewed by Darin Adler.
7
8
        Verify the new API of the objects and check what happens when user
9
        modifies the values and types of the attributes, or adds a null value.
10
11
        * fast/mediastream/RTCIceCandidate-expected.txt:
12
        * fast/mediastream/RTCIceCandidate.html:
13
        * fast/mediastream/RTCSessionDescription-expected.txt:
14
        * fast/mediastream/RTCSessionDescription.html:
15
1
2017-09-26  Ryan Haddad  <ryanhaddad@apple.com>
16
2017-09-26  Ryan Haddad  <ryanhaddad@apple.com>
2
17
3
        Marking css3/filters/backdrop/backdrop-filter-with-reflection* tests as flaky on Sierra WK1.
18
        Marking css3/filters/backdrop/backdrop-filter-with-reflection* tests as flaky on Sierra WK1.
- a/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt +15 lines
Lines 7-12 PASS candidate = new RTCIceCandidate(initializer); did not throw exception. a/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt_sec1
7
PASS candidate.candidate is "foo"
7
PASS candidate.candidate is "foo"
8
PASS candidate.sdpMid is "bar"
8
PASS candidate.sdpMid is "bar"
9
PASS candidate.sdpMLineIndex is 6
9
PASS candidate.sdpMLineIndex is 6
10
PASS RTCIceCandidate.prototype.toJSON is defined.
11
PASS Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").enumerable is true
12
PASS Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").writable is true
13
PASS Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").configurable is true
14
PASS RTCIceCandidate.prototype.toJSON.length is 0
15
PASS RTCIceCandidate.prototype.toJSON.name is "toJSON"
16
PASS Object.getOwnPropertyDescriptor(jsonMap, "candidate").enumerable is true
17
PASS Object.getOwnPropertyDescriptor(jsonMap, "candidate").writable is true
18
PASS Object.getOwnPropertyDescriptor(jsonMap, "candidate").configurable is true
19
PASS childCandidate.toJSON(); threw exception TypeError: Can only call RTCIceCandidate.toJSON on instances of RTCIceCandidate.
20
PASS JSON.stringify(candidate.toJSON()) is "{\"candidate\":\"foo\",\"sdpMid\":\"bar\",\"sdpMLineIndex\":6}"
21
PASS JSON.stringify(candidate.toJSON()) is "{\"candidate\":\"foo\",\"sdpMid\":\"bar\",\"sdpMLineIndex\":6}"
22
PASS JSON.stringify(candidate.toJSON()) is "{\"candidate\":\"foo\",\"sdpMid\":\"bar\",\"sdpMLineIndex\":6}"
23
PASS JSON.stringify(candidate.toJSON()) is "{\"candidate\":\"foo\",\"sdpMid\":\"bar\",\"sdpMLineIndex\":6}"
24
PASS JSON.stringify(candidate.toJSON()) is "{\"candidate\":\"foo\",\"sdpMid\":\"bar\",\"sdpMLineIndex\":6}"
10
25
11
Attributes are readonly
26
Attributes are readonly
12
candidate.candidate = "foo-updated"
27
candidate.candidate = "foo-updated"
- a/LayoutTests/fast/mediastream/RTCIceCandidate.html +27 lines
Lines 13-18 a/LayoutTests/fast/mediastream/RTCIceCandidate.html_sec1
13
            shouldBe('candidate.candidate', '"foo"');
13
            shouldBe('candidate.candidate', '"foo"');
14
            shouldBe('candidate.sdpMid', '"bar"');
14
            shouldBe('candidate.sdpMid', '"bar"');
15
            shouldBe('candidate.sdpMLineIndex', '6');
15
            shouldBe('candidate.sdpMLineIndex', '6');
16
            shouldBeDefined('RTCIceCandidate.prototype.toJSON');
17
            shouldBeTrue('Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").enumerable');
18
            shouldBeTrue('Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").writable');
19
            shouldBeTrue('Object.getOwnPropertyDescriptor(RTCIceCandidate.prototype, "toJSON").configurable');
20
            shouldBe('RTCIceCandidate.prototype.toJSON.length', '0');
21
            shouldBe('RTCIceCandidate.prototype.toJSON.name', '"toJSON"');
22
23
            var jsonMap = candidate.toJSON();
24
            shouldBeTrue('Object.getOwnPropertyDescriptor(jsonMap, "candidate").enumerable');
25
            shouldBeTrue('Object.getOwnPropertyDescriptor(jsonMap, "candidate").writable');
26
            shouldBeTrue('Object.getOwnPropertyDescriptor(jsonMap, "candidate").configurable');
27
28
            var childRTCIceCandidate = function() {};
29
            childRTCIceCandidate.prototype = Object.create(RTCIceCandidate.prototype);
30
            var childCandidate = new childRTCIceCandidate();
31
            shouldThrow('childCandidate.toJSON();');
32
33
            shouldBeEqualToString('JSON.stringify(candidate.toJSON())', '{"candidate":"foo","sdpMid":"bar","sdpMLineIndex":6}');
34
            candidate.newAttribute = "new value";
35
            shouldBeEqualToString('JSON.stringify(candidate.toJSON())', '{"candidate":"foo","sdpMid":"bar","sdpMLineIndex":6}');
36
            candidate.sdpMLineIndex = "not a number";
37
            shouldBeEqualToString('JSON.stringify(candidate.toJSON())', '{"candidate":"foo","sdpMid":"bar","sdpMLineIndex":6}');
38
            candidate.sdpMid = 7;
39
            shouldBeEqualToString('JSON.stringify(candidate.toJSON())', '{"candidate":"foo","sdpMid":"bar","sdpMLineIndex":6}');
40
            candidate.sdpMid = null;
41
            shouldBeEqualToString('JSON.stringify(candidate.toJSON())', '{"candidate":"foo","sdpMid":"bar","sdpMLineIndex":6}');
42
16
            debug("");
43
            debug("");
17
44
18
            debug("Attributes are readonly");
45
            debug("Attributes are readonly");
- a/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt +1 lines
Lines 6-11 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt_sec1
6
PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
6
PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
7
PASS sessionDescription.type is "offer"
7
PASS sessionDescription.type is "offer"
8
PASS sessionDescription.sdp is "foobar"
8
PASS sessionDescription.sdp is "foobar"
9
PASS JSON.stringify(sessionDescription.toJSON()) is "{\"type\":\"offer\",\"sdp\":\"foobar\"}"
9
*** Attributes are read-only.
10
*** Attributes are read-only.
10
PASS sessionDescription.type = 'answer' did not throw exception.
11
PASS sessionDescription.type = 'answer' did not throw exception.
11
PASS sessionDescription.type is 'offer'
12
PASS sessionDescription.type is 'offer'
- a/LayoutTests/fast/mediastream/RTCSessionDescription.html +1 lines
Lines 14-19 a/LayoutTests/fast/mediastream/RTCSessionDescription.html_sec1
14
            shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);");
14
            shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);");
15
            shouldBe('sessionDescription.type', '"offer"');
15
            shouldBe('sessionDescription.type', '"offer"');
16
            shouldBe('sessionDescription.sdp', '"foobar"');
16
            shouldBe('sessionDescription.sdp', '"foobar"');
17
            shouldBeEqualToString('JSON.stringify(sessionDescription.toJSON())', '{"type":"offer","sdp":"foobar"}');
17
18
18
            debug("*** Attributes are read-only.");
19
            debug("*** Attributes are read-only.");
19
            shouldNotThrow("sessionDescription.type = 'answer'");
20
            shouldNotThrow("sessionDescription.type = 'answer'");

Return to Bug 156293