Changeset 181156 in webkit


Ignore:
Timestamp:
Mar 6, 2015 8:30:23 AM (9 years ago)
Author:
Darin Adler
Message:

Make JavaScript binding get and set legacy event listener attributes directly
https://bugs.webkit.org/show_bug.cgi?id=142282

Reviewed by Antti Koivisto.

Test: fast/dom/legacy-event-handler-attributes.html

This patch changes the JavaScript getters and setters for these attributes
to work directly without requiring any functions in the C++ DOM implementation.
A subsequent patch will remove the now-unused C++ DOM implementation.

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
m_hasEndedListener; this was incorrect since it only detected event listeners
set up with the event handler attribute, not with addEventListener.
(WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
m_hasEndedListener after making changes to the event listeners.
(WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
(WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.

  • Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
m_hasAudioProcessListener; this was incorrect since it only detected event listeners
set up with the event handler attribute, not with addEventListener.
(WebCore::ScriptProcessorNode::addEventListener): Added code to update
m_hasAudioProcessListener after making changes to the event listeners.
(WebCore::ScriptProcessorNode::removeEventListener): Ditto.
(WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.

  • Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
  • bindings/js/JSEventListener.cpp:

(WebCore::legacyEventListenerAttribute): Added.
(WebCore::createEventListenerForLegacyAttribute): Added.
(WebCore::setLegacyEventListenerAttribute): Added.
(WebCore::legacyWindowEventListenerAttribute): Added.
(WebCore::setLegacyWindowEventListenerAttribute): Added.

  • bindings/js/JSEventListener.h:

(WebCore::createJSEventListenerForAttribute): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateAttributeEventListenerCall): Deleted.
(LegacyEventListenerAttributeEventName): Added.
(LegacyEventListenerAttributePrefix): Added.
(GenerateImplementation): Use "auto" in lots of places to simplify the code
generation. Replaced the old inlined code to deal with legacy event listener
attributes with code that simply calls the new functions from JSEventLister.h.
(GenerateCallWith): Use "auto".
(GenerateConstructorDefinition): Ditto.

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected

results since these now use auto.

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestException.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
  • bindings/scripts/test/JS/JSattribute.cpp: Ditto.
  • bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
  • dom/MessagePort.cpp:

(WebCore::MessagePort::addEventListener): Moved logic that calls the start
function in here from setOnmessage, since the latter will no longer be called.

  • dom/MessagePort.h: Ditto.
Location:
trunk/Source/WebCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181155 r181156  
     12015-03-05  Darin Adler  <darin@apple.com>
     2
     3        Make JavaScript binding get and set legacy event listener attributes directly
     4        https://bugs.webkit.org/show_bug.cgi?id=142282
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Test: fast/dom/legacy-event-handler-attributes.html
     9
     10        This patch changes the JavaScript getters and setters for these attributes
     11        to work directly without requiring any functions in the C++ DOM implementation.
     12        A subsequent patch will remove the now-unused C++ DOM implementation.
     13
     14        * Modules/webaudio/AudioScheduledSourceNode.cpp:
     15        (WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
     16        m_hasEndedListener; this was incorrect since it only detected event listeners
     17        set up with the event handler attribute, not with addEventListener.
     18        (WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
     19        m_hasEndedListener after making changes to the event listeners.
     20        (WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
     21        (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
     22        * Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
     23
     24        * Modules/webaudio/ScriptProcessorNode.cpp:
     25        (WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
     26        m_hasAudioProcessListener; this was incorrect since it only detected event listeners
     27        set up with the event handler attribute, not with addEventListener.
     28        (WebCore::ScriptProcessorNode::addEventListener): Added code to update
     29        m_hasAudioProcessListener after making changes to the event listeners.
     30        (WebCore::ScriptProcessorNode::removeEventListener): Ditto.
     31        (WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
     32        * Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
     33
     34        * bindings/js/JSEventListener.cpp:
     35        (WebCore::legacyEventListenerAttribute): Added.
     36        (WebCore::createEventListenerForLegacyAttribute): Added.
     37        (WebCore::setLegacyEventListenerAttribute): Added.
     38        (WebCore::legacyWindowEventListenerAttribute): Added.
     39        (WebCore::setLegacyWindowEventListenerAttribute): Added.
     40
     41        * bindings/js/JSEventListener.h:
     42        (WebCore::createJSEventListenerForAttribute): Deleted.
     43
     44        * bindings/scripts/CodeGeneratorJS.pm:
     45        (GenerateAttributeEventListenerCall): Deleted.
     46        (LegacyEventListenerAttributeEventName): Added.
     47        (LegacyEventListenerAttributePrefix): Added.
     48        (GenerateImplementation): Use "auto" in lots of places to simplify the code
     49        generation. Replaced the old inlined code to deal with legacy event listener
     50        attributes with code that simply calls the new functions from JSEventLister.h.
     51        (GenerateCallWith): Use "auto".
     52        (GenerateConstructorDefinition): Ditto.
     53
     54        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
     55        results since these now use auto.
     56        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
     57        * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
     58        * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
     59        * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
     60        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
     61        * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
     62        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
     63        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
     64        * bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
     65        * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
     66        * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
     67        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
     68        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
     69        * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
     70        * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
     71        * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
     72
     73        * dom/MessagePort.cpp:
     74        (WebCore::MessagePort::addEventListener): Moved logic that calls the start
     75        function in here from setOnmessage, since the latter will no longer be called.
     76        * dom/MessagePort.h: Ditto.
     77
    1782015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
    279
  • trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp

    r176311 r181156  
    199199void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener)
    200200{
    201     m_hasEndedListener = listener;
    202201    setAttributeEventListener(eventNames().endedEvent, listener);
    203202}
     
    232231}
    233232
     233bool AudioScheduledSourceNode::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
     234{
     235    bool success = AudioNode::addEventListener(eventType, listener, useCapture);
     236    if (success && eventType == eventNames().endedEvent)
     237        m_hasEndedListener = hasEventListeners(eventNames().endedEvent);
     238    return success;
     239}
     240
     241bool AudioScheduledSourceNode::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
     242{
     243    bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
     244    if (success && eventType == eventNames().endedEvent)
     245        m_hasEndedListener = hasEventListeners(eventNames().endedEvent);
     246    return success;
     247}
     248
     249void AudioScheduledSourceNode::removeAllEventListeners()
     250{
     251    m_hasEndedListener = false;
     252    AudioNode::removeAllEventListeners();
     253}
     254
    234255} // namespace WebCore
    235256
  • trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h

    r176311 r181156  
    108108
    109109    static const double UnknownTime;
     110
     111private:
     112    bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
     113    bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) override;
     114    void removeAllEventListeners() override;
    110115};
    111116
  • trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp

    r167131 r181156  
    220220void ScriptProcessorNode::setOnaudioprocess(PassRefPtr<EventListener> listener)
    221221{
    222     m_hasAudioProcessListener = listener;
    223222    setAttributeEventListener(eventNames().audioprocessEvent, listener);
    224223}
     
    287286}
    288287
     288bool ScriptProcessorNode::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
     289{
     290    bool success = AudioNode::addEventListener(eventType, listener, useCapture);
     291    if (success && eventType == eventNames().audioprocessEvent)
     292        m_hasAudioProcessListener = hasEventListeners(eventNames().audioprocessEvent);
     293    return success;
     294}
     295
     296bool ScriptProcessorNode::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
     297{
     298    bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
     299    if (success && eventType == eventNames().audioprocessEvent)
     300        m_hasAudioProcessListener = hasEventListeners(eventNames().audioprocessEvent);
     301    return success;
     302}
     303
     304void ScriptProcessorNode::removeAllEventListeners()
     305{
     306    m_hasAudioProcessListener = false;
     307    AudioNode::removeAllEventListeners();
     308}
     309
    289310} // namespace WebCore
    290311
  • trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h

    r162139 r181156  
    7878    void fireProcessEvent();
    7979
     80    bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
     81    bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) override;
     82    void removeAllEventListeners() override;
     83
    8084    // Double buffering
    8185    unsigned doubleBufferIndex() const { return m_doubleBufferIndex; }
  • trunk/Source/WebCore/bindings/js/JSEventListener.cpp

    r181024 r181156  
    2424#include "Event.h"
    2525#include "Frame.h"
     26#include "HTMLElement.h"
    2627#include "JSEvent.h"
    2728#include "JSEventTarget.h"
     
    171172}
    172173
     174static inline JSC::JSValue eventHandlerAttribute(EventListener* abstractListener, ScriptExecutionContext& context)
     175{
     176    if (!abstractListener)
     177        return jsNull();
     178
     179    auto* listener = JSEventListener::cast(abstractListener);
     180    if (!listener)
     181        return jsNull();
     182
     183    auto* function = listener->jsFunction(&context);
     184    if (!function)
     185        return jsNull();
     186
     187    return function;
     188}
     189
     190static inline RefPtr<JSEventListener> createEventListenerForEventHandlerAttribute(JSC::ExecState& state, JSC::JSValue listener, JSC::JSObject& wrapper)
     191{
     192    if (!listener.isObject())
     193        return nullptr;
     194    return JSEventListener::create(asObject(listener), &wrapper, true, currentWorld(&state));
     195}
     196
     197JSC::JSValue eventHandlerAttribute(EventTarget& target, const AtomicString& eventType)
     198{
     199    return eventHandlerAttribute(target.getAttributeEventListener(eventType), *target.scriptExecutionContext());
     200}
     201
     202void setEventHandlerAttribute(JSC::ExecState& state, JSC::JSObject& wrapper, EventTarget& target, const AtomicString& eventType, JSC::JSValue value)
     203{
     204    target.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, wrapper));
     205}
     206
     207JSC::JSValue windowForwardedEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType)
     208{
     209    auto& document = element.document();
     210    return eventHandlerAttribute(document.getWindowAttributeEventListener(eventType), document);
     211}
     212
     213void setWindowForwardedEventHandlerAttribute(JSC::ExecState& state, JSC::JSObject& wrapper, HTMLElement& element, const AtomicString& eventType, JSC::JSValue value)
     214{
     215    ASSERT(wrapper.globalObject());
     216    element.document().setWindowAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *wrapper.globalObject()));
     217}
     218
    173219} // namespace WebCore
  • trunk/Source/WebCore/bindings/js/JSEventListener.h

    r181024 r181156  
    3030namespace WebCore {
    3131
     32    class EventTarget;
     33    class HTMLElement;
    3234    class JSDOMGlobalObject;
    3335
     
    7678    };
    7779
    78     // For "onXXX" event attributes.
    79     RefPtr<JSEventListener> createJSEventListenerForAttribute(JSC::ExecState&, JSC::JSValue listener, JSC::JSObject& wrapper);
     80    // For "onxxx" attributes that automatically set up JavaScript event listeners.
     81    JSC::JSValue eventHandlerAttribute(EventTarget&, const AtomicString& eventType);
     82    void setEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, EventTarget&, const AtomicString& eventType, JSC::JSValue);
     83
     84    // Like the functions above, but for attributes that forward event handlers to the window object rather than setting them on the target.
     85    JSC::JSValue windowForwardedEventHandlerAttribute(HTMLElement&, const AtomicString& eventType);
     86    void setWindowForwardedEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, HTMLElement&, const AtomicString& eventType, JSC::JSValue);
    8087
    8188    Ref<JSEventListener> createJSEventListenerForAdd(JSC::ExecState&, JSC::JSObject& listener, JSC::JSObject& wrapper);
     
    113120    }
    114121
    115     inline RefPtr<JSEventListener> createJSEventListenerForAttribute(JSC::ExecState& state, JSC::JSValue listener, JSC::JSObject& wrapper)
    116     {
    117         if (!listener.isObject())
    118             return nullptr;
    119         return JSEventListener::create(asObject(listener), &wrapper, true, currentWorld(&state));
    120     }
    121 
    122122    inline Ref<JSEventListener> createJSEventListenerForRemove(JSC::ExecState& state, JSC::JSObject& listener, JSC::JSObject& wrapper)
    123123    {
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r181024 r181156  
    141141}
    142142
    143 sub GenerateAttributeEventListenerCall
    144 {
    145     my $implSetterFunctionName = shift;
    146     my $windowEventListener = shift;
    147 
    148     my $wrapperObject = $windowEventListener ? "globalObject" : "castedThis";
    149     my @GenerateEventListenerImpl = ();
    150 
    151     push(@GenerateEventListenerImpl, "    impl.set$implSetterFunctionName(createJSEventListenerForAttribute(*exec, value, *$wrapperObject));\n");
    152     return @GenerateEventListenerImpl;
     143sub EventHandlerAttributeEventName
     144{
     145    my $attribute = shift;
     146
     147    # Remove the "on" prefix.
     148    my $eventType = substr($attribute->signature->name, 2);
     149
     150    # FIXME: Consider adding a property in the IDL file instead of hard coding these names.
     151
     152    $eventType = "show" if $eventType eq "display";
     153
     154    # Note: These four names exist in HTMLElement.cpp.
     155    $eventType = "webkitAnimationEnd" if $eventType eq "webkitanimationend";
     156    $eventType = "webkitAnimationIteration" if $eventType eq "webkitanimationiteration";
     157    $eventType = "webkitAnimationStart" if $eventType eq "webkitanimationstart";
     158    $eventType = "webkitTransitionEnd" if $eventType eq "webkittransitionend";
     159
     160    return "eventNames().${eventType}Event";
    153161}
    154162
     
    19701978            push(@implContent, "    VM& vm = exec->vm();\n");
    19711979            push(@implContent, "    UNUSED_PARAM(vm);\n");
    1972             push(@implContent, "    ${className}Prototype* thisObject = jsCast<${className}Prototype*>(object);\n");
     1980            push(@implContent, "    auto* thisObject = jsCast<${className}Prototype*>(object);\n");
    19731981
    19741982            if ($numConstants eq 0 && $numFunctions eq 0 && $numPrototypeAttributes eq 0) {
     
    20132021        push(@implContent, "void ${className}Prototype::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
    20142022        push(@implContent, "{\n");
    2015         push(@implContent, "    ${className}Prototype* thisObject = jsCast<${className}Prototype*>(cell);\n");
     2023        push(@implContent, "    auto* thisObject = jsCast<${className}Prototype*>(cell);\n");
    20162024        push(@implContent, "    if (thisObject->putDelegate(exec, propertyName, value, slot))\n");
    20172025        push(@implContent, "        return;\n");
     
    21072115            push(@implContent, "bool ${className}::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)\n");
    21082116            push(@implContent, "{\n");
    2109             push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
     2117            push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
    21102118            push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    21112119            push(@implContent, GenerateGetOwnPropertySlotBody($interface, $interfaceName, $className, $numInstanceAttributes > 0, 0));
     
    21182126            push(@implContent, "bool ${className}::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)\n");
    21192127            push(@implContent, "{\n");
    2120             push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
     2128            push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
    21212129            push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    21222130
     
    21912199            if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
    21922200                if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) {
    2193                     push(@implContent, "    ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n");
     2201                    push(@implContent, "    auto* castedThis = to${className}(JSValue::decode(thisValue));\n");
    21942202                } elsif (AttributeShouldBeOnInstance($interface, $attribute)) {
    2195                     push(@implContent, "    ${className}* castedThis = jsCast<JS${interfaceName}*>(slotBase);\n");
     2203                    push(@implContent, "    auto* castedThis = jsCast<JS${interfaceName}*>(slotBase);\n");
    21962204                    if (InterfaceRequiresAttributesOnInstanceForCompatibility($interface)) {
    21972205                        push(@implContent, "    ${className}* castedThisObject = " . GetCastingHelperForThisObject($interface) . "(JSValue::decode(thisValue));\n");
     
    22842292            } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
    22852293                $implIncludes{"JSDOMBinding.h"} = 1;
    2286                 push(@implContent, "    $implType& impl = castedThis->impl();\n");
     2294                push(@implContent, "    auto& impl = castedThis->impl();\n");
    22872295                push(@implContent, "    return JSValue::encode(shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
    22882296            } elsif ($type eq "EventListener") {
    2289                 $implIncludes{"EventListener.h"} = 1;
     2297                my $getter = $attribute->signature->extendedAttributes->{"JSWindowEventListener"} ? "windowForwardedEventHandlerAttribute" : "eventHandlerAttribute";
     2298                my $eventName = EventHandlerAttributeEventName($attribute);
    22902299                push(@implContent, "    UNUSED_PARAM(exec);\n");
    2291                 push(@implContent, "    $implType& impl = castedThis->impl();\n");
    2292                 push(@implContent, "    if (EventListener* listener = impl.$implGetterFunctionName()) {\n");
    2293                 push(@implContent, "        if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {\n");
    2294                 if ($interfaceName eq "Document" || $codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
    2295                     push(@implContent, "            if (JSObject* jsFunction = jsListener->jsFunction(&impl))\n");
    2296                 } else {
    2297                     push(@implContent, "            if (JSObject* jsFunction = jsListener->jsFunction(impl.scriptExecutionContext()))\n");
    2298                 }
    2299                 push(@implContent, "                return JSValue::encode(jsFunction);\n");
    2300                 push(@implContent, "        }\n");
    2301                 push(@implContent, "    }\n");
    2302                 push(@implContent, "    return JSValue::encode(jsNull());\n");
     2300                push(@implContent, "    return JSValue::encode($getter(castedThis->impl(), $eventName));\n");
    23032301            } elsif ($attribute->signature->type =~ /Constructor$/) {
    23042302                my $constructorType = $attribute->signature->type;
     
    23532351                    unshift(@arguments, @callWithArgs);
    23542352                    my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
    2355                     push(@implContent, "    $implType& impl = castedThis->impl();\n") if !$attribute->isStatic;
     2353                    push(@implContent, "    auto& impl = castedThis->impl();\n") if !$attribute->isStatic;
    23562354                    if ($codeGenerator->IsSVGAnimatedType($type)) {
    23572355                        push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
     
    23822380                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
    23832381                } else {
    2384                     push(@implContent, "    $implType& impl = castedThis->impl();\n");
     2382                    push(@implContent, "    auto& impl = castedThis->impl();\n");
    23852383                    push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
    23862384                }
     
    24732471            push(@implContent, "void ${className}::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
    24742472            push(@implContent, "{\n");
    2475             push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
     2473            push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
    24762474            push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    24772475            if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
     
    24932491                push(@implContent, "void ${className}::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow)\n");
    24942492                push(@implContent, "{\n");
    2495                 push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
     2493                push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
    24962494                push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    24972495
     
    25492547                    } elsif (AttributeShouldBeOnInstance($interface, $attribute)) {
    25502548                        push(@implContent, "    UNUSED_PARAM(thisValue);\n");
    2551                         push(@implContent, "    ${className}* castedThis = jsCast<JS${interfaceName}*>(baseObject);\n");
     2549                        push(@implContent, "    auto* castedThis = jsCast<JS${interfaceName}*>(baseObject);\n");
    25522550                        if (InterfaceRequiresAttributesOnInstanceForCompatibility($interface)) {
    25532551                            push(@implContent, "    ${className}* castedThisObject = " . GetCastingHelperForThisObject($interface) . "(JSValue::decode(thisValue));\n");
     
    25812579                    push(@implContent, "    castedThis->set$implSetterFunctionName(exec, value);\n");
    25822580                } elsif ($type eq "EventListener") {
    2583                     $implIncludes{"JSEventListener.h"} = 1;
    2584                     push(@implContent, "    UNUSED_PARAM(exec);\n");
    2585                     my $windowEventListener = $attribute->signature->extendedAttributes->{"JSWindowEventListener"};
    2586                     if ($windowEventListener) {
    2587                         push(@implContent, "    JSDOMGlobalObject* globalObject = castedThis->globalObject();\n");
    2588                     }
    2589                     push(@implContent, "    $implType& impl = castedThis->impl();\n");
     2581                    my $eventName = EventHandlerAttributeEventName($attribute);
     2582                    # FIXME: Find a way to do this special case without hardcoding the class and attribute names here.
    25902583                    if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerGlobalScope")) and $name eq "onerror") {
    25912584                        $implIncludes{"JSErrorHandler.h"} = 1;
    2592                         push(@implContent, "    impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, castedThis));\n");
     2585                        push(@implContent, "    castedThis->impl().setAttributeEventListener($eventName, createJSErrorHandler(exec, value, castedThis));\n");
    25932586                    } else {
    2594                         push(@implContent, GenerateAttributeEventListenerCall($implSetterFunctionName, $windowEventListener));
     2587                        $implIncludes{"JSEventListener.h"} = 1;
     2588                        my $setter = $attribute->signature->extendedAttributes->{"JSWindowEventListener"} ? "setWindowForwardedEventHandlerAttribute" : "setEventHandlerAttribute";
     2589                        push(@implContent, "    $setter(*exec, *castedThis, castedThis->impl(), $eventName, value);\n");
    25952590                    }
    25962591                } elsif ($attribute->signature->type =~ /Constructor$/) {
     
    26032598                        AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
    26042599                    }
    2605                     push(@implContent, "    // Shadowing a built-in constructor\n");
     2600                    push(@implContent, "    // Shadowing a built-in constructor.\n");
    26062601                    push(@implContent, "    castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");
    26072602                } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) {
    2608                     push(@implContent, "    // Shadowing a built-in object\n");
     2603                    push(@implContent, "    // Shadowing a built-in object.\n");
    26092604                    push(@implContent, "    castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");
    26102605                } else {
    26112606                    if (!$attribute->isStatic) {
    2612                         push(@implContent, "    $implType& impl = castedThis->impl();\n");
     2607                        push(@implContent, "    auto& impl = castedThis->impl();\n");
    26132608                    }
    26142609                    push(@implContent, "    ExceptionCode ec = 0;\n") if $setterRaisesException;
     
    27132708        push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
    27142709        push(@implContent, "{\n");
    2715         push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
     2710        push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
    27162711        push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    27172712        push(@implContent, "    for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i)\n");
     
    28202815                    push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
    28212816                } else {
    2822                     push(@implContent, "    $implType& impl = castedThis->impl();\n");
     2817                    push(@implContent, "    auto& impl = castedThis->impl();\n");
    28232818                    if ($svgPropertyType) {
    28242819                        push(@implContent, "    if (impl.isReadOnly()) {\n");
     
    28702865        push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
    28712866        push(@implContent, "{\n");
    2872         push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
     2867        push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
    28732868        push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
    28742869        push(@implContent, "    Base::visitChildren(thisObject, visitor);\n");
     
    29142909            push(@implContent, "EncodedJSValue ${className}::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)\n");
    29152910            push(@implContent, "{\n");
    2916             push(@implContent, "    ${className}* thisObj = jsCast<$className*>(slotBase);\n");
    2917             push(@implContent, "    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");
     2911            push(@implContent, "    auto* thisObject = jsCast<$className*>(slotBase);\n");
     2912            push(@implContent, "    return JSValue::encode(toJS(exec, thisObject->globalObject(), thisObject->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");
    29182913            push(@implContent, "}\n\n");
    29192914        }
     
    29452940        my $emittedJSCast = 0;
    29462941        if ($codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) {
    2947             push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
     2942            push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
    29482943            $emittedJSCast = 1;
    29492944            push(@implContent, "    if (js${interfaceName}->impl().hasPendingActivity())\n");
     
    29522947        if ($codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) {
    29532948            if (!$emittedJSCast) {
    2954                 push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
     2949                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
    29552950                $emittedJSCast = 1;
    29562951            }
     
    29602955        if ($codeGenerator->InheritsInterface($interface, "Node")) {
    29612956            if (!$emittedJSCast) {
    2962                 push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
     2957                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
    29632958                $emittedJSCast = 1;
    29642959            }
     
    29682963        if (GetGenerateIsReachable($interface)) {
    29692964            if (!$emittedJSCast) {
    2970                 push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
     2965                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
    29712966                $emittedJSCast = 1;
    29722967            }
     
    30253020        push(@implContent, "void JS${interfaceName}Owner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)\n");
    30263021        push(@implContent, "{\n");
    3027         push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
    3028         push(@implContent, "    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);\n");
     3022        push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
     3023        push(@implContent, "    auto& world = *static_cast<DOMWrapperWorld*>(context);\n");
    30293024        push(@implContent, "    uncacheWrapper(world, &js${interfaceName}->impl(), js${interfaceName});\n");
    30303025        push(@implContent, "    js${interfaceName}->releaseImpl();\n");
     
    31333128    }
    31343129    if ($codeGenerator->ExtendedAttributeContains($callWith, "ScriptExecutionContext")) {
    3135         push(@$outputArray, "    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();\n");
     3130        push(@$outputArray, "    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();\n");
    31363131        push(@$outputArray, "    if (!scriptContext)\n");
    31373132        push(@$outputArray, "        return" . ($returnValue ? " " . $returnValue : "") . ";\n");
     
    45104505EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}(ExecState* exec)
    45114506{
    4512     ${constructorClassName}* jsConstructor = jsCast<${constructorClassName}*>(exec->callee());
     4507    auto* jsConstructor = jsCast<${constructorClassName}*>(exec->callee());
    45134508
    45144509    ScriptExecutionContext* executionContext = jsConstructor->scriptExecutionContext();
     
    45774572            push(@$outputArray, "EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}${overloadedIndexString}(ExecState* exec)\n");
    45784573            push(@$outputArray, "{\n");
    4579             push(@$outputArray, "    ${constructorClassName}* castedThis = jsCast<${constructorClassName}*>(exec->callee());\n");
     4574            push(@$outputArray, "    auto* castedThis = jsCast<${constructorClassName}*>(exec->callee());\n");
    45804575
    45814576            my @constructorArgList;
     
    46074602                push(@$outputArray, "    if (!context)\n");
    46084603                push(@$outputArray, "        return throwConstructorDocumentUnavailableError(*exec, \"${interfaceName}\");\n");
    4609                 push(@$outputArray, "    Document& document = downcast<Document>(*context);\n");
     4604                push(@$outputArray, "    auto& document = downcast<Document>(*context);\n");
    46104605            }
    46114606            if ($generatingNamedConstructor) {
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r181024 r181156  
    169169bool JSTestActiveDOMObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    170170{
    171     JSTestActiveDOMObject* thisObject = jsCast<JSTestActiveDOMObject*>(object);
     171    auto* thisObject = jsCast<JSTestActiveDOMObject*>(object);
    172172    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    173173    return getStaticValueSlot<JSTestActiveDOMObject, Base>(exec, JSTestActiveDOMObjectTable, thisObject, propertyName, slot);
     
    179179    UNUSED_PARAM(slotBase);
    180180    UNUSED_PARAM(thisValue);
    181     JSTestActiveDOMObject* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
     181    auto* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
    182182    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
    183183        return JSValue::encode(jsUndefined());
    184     TestActiveDOMObject& impl = castedThis->impl();
     184    auto& impl = castedThis->impl();
    185185    JSValue result = jsNumber(impl.excitingAttr());
    186186    return JSValue::encode(result);
     
    212212    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
    213213        return JSValue::encode(jsUndefined());
    214     TestActiveDOMObject& impl = castedThis->impl();
     214    auto& impl = castedThis->impl();
    215215    if (UNLIKELY(exec->argumentCount() < 1))
    216216        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    229229        return throwThisTypeError(*exec, "TestActiveDOMObject", "postMessage");
    230230    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
    231     TestActiveDOMObject& impl = castedThis->impl();
     231    auto& impl = castedThis->impl();
    232232    if (UNLIKELY(exec->argumentCount() < 1))
    233233        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    248248void JSTestActiveDOMObjectOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    249249{
    250     JSTestActiveDOMObject* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
    251     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     250    auto* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
     251    auto& world = *static_cast<DOMWrapperWorld*>(context);
    252252    uncacheWrapper(world, &jsTestActiveDOMObject->impl(), jsTestActiveDOMObject);
    253253    jsTestActiveDOMObject->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r181024 r181156  
    162162bool JSTestCustomNamedGetter::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    163163{
    164     JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     164    auto* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
    165165    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    166166    if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) {
     
    173173bool JSTestCustomNamedGetter::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)
    174174{
    175     JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     175    auto* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
    176176    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    177177    PropertyName propertyName = Identifier::from(exec, index);
     
    203203        return throwThisTypeError(*exec, "TestCustomNamedGetter", "anotherFunction");
    204204    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCustomNamedGetter::info());
    205     TestCustomNamedGetter& impl = castedThis->impl();
     205    auto& impl = castedThis->impl();
    206206    if (UNLIKELY(exec->argumentCount() < 1))
    207207        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    222222void JSTestCustomNamedGetterOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    223223{
    224     JSTestCustomNamedGetter* jsTestCustomNamedGetter = jsCast<JSTestCustomNamedGetter*>(handle.slot()->asCell());
    225     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     224    auto* jsTestCustomNamedGetter = jsCast<JSTestCustomNamedGetter*>(handle.slot()->asCell());
     225    auto& world = *static_cast<DOMWrapperWorld*>(context);
    226226    uncacheWrapper(world, &jsTestCustomNamedGetter->impl(), jsTestCustomNamedGetter);
    227227    jsTestCustomNamedGetter->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r181024 r181156  
    9292EncodedJSValue JSC_HOST_CALL JSTestEventConstructorConstructor::constructJSTestEventConstructor(ExecState* exec)
    9393{
    94     JSTestEventConstructorConstructor* jsConstructor = jsCast<JSTestEventConstructorConstructor*>(exec->callee());
     94    auto* jsConstructor = jsCast<JSTestEventConstructorConstructor*>(exec->callee());
    9595
    9696    ScriptExecutionContext* executionContext = jsConstructor->scriptExecutionContext();
     
    206206        return throwGetterTypeError(*exec, "TestEventConstructor", "attr1");
    207207    }
    208     TestEventConstructor& impl = castedThis->impl();
     208    auto& impl = castedThis->impl();
    209209    JSValue result = jsStringWithCache(exec, impl.attr1());
    210210    return JSValue::encode(result);
     
    223223        return throwGetterTypeError(*exec, "TestEventConstructor", "attr2");
    224224    }
    225     TestEventConstructor& impl = castedThis->impl();
     225    auto& impl = castedThis->impl();
    226226    JSValue result = jsStringWithCache(exec, impl.attr2());
    227227    return JSValue::encode(result);
     
    251251void JSTestEventConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    252252{
    253     JSTestEventConstructor* jsTestEventConstructor = jsCast<JSTestEventConstructor*>(handle.slot()->asCell());
    254     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     253    auto* jsTestEventConstructor = jsCast<JSTestEventConstructor*>(handle.slot()->asCell());
     254    auto& world = *static_cast<DOMWrapperWorld*>(context);
    255255    uncacheWrapper(world, &jsTestEventConstructor->impl(), jsTestEventConstructor);
    256256    jsTestEventConstructor->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r181024 r181156  
    174174bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    175175{
    176     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
     176    auto* thisObject = jsCast<JSTestEventTarget*>(object);
    177177    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    178178    const HashTableValue* entry = getStaticValueSlotEntryWithoutCaching<JSTestEventTarget>(exec, propertyName);
     
    196196bool JSTestEventTarget::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)
    197197{
    198     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
     198    auto* thisObject = jsCast<JSTestEventTarget*>(object);
    199199    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    200200    if (index < thisObject->impl().length()) {
     
    221221void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
    222222{
    223     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
     223    auto* thisObject = jsCast<JSTestEventTarget*>(object);
    224224    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    225225    for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i)
     
    240240        return throwThisTypeError(*exec, "TestEventTarget", "item");
    241241    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
    242     TestEventTarget& impl = castedThis->impl();
     242    auto& impl = castedThis->impl();
    243243    if (UNLIKELY(exec->argumentCount() < 1))
    244244        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    261261        return throwThisTypeError(*exec, "TestEventTarget", "addEventListener");
    262262    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
    263     TestEventTarget& impl = castedThis->impl();
     263    auto& impl = castedThis->impl();
    264264    JSValue listener = exec->argument(1);
    265265    if (UNLIKELY(!listener.isObject()))
     
    276276        return throwThisTypeError(*exec, "TestEventTarget", "removeEventListener");
    277277    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
    278     TestEventTarget& impl = castedThis->impl();
     278    auto& impl = castedThis->impl();
    279279    JSValue listener = exec->argument(1);
    280280    if (UNLIKELY(!listener.isObject()))
     
    291291        return throwThisTypeError(*exec, "TestEventTarget", "dispatchEvent");
    292292    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
    293     TestEventTarget& impl = castedThis->impl();
     293    auto& impl = castedThis->impl();
    294294    if (UNLIKELY(exec->argumentCount() < 1))
    295295        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    306306void JSTestEventTarget::visitChildren(JSCell* cell, SlotVisitor& visitor)
    307307{
    308     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(cell);
     308    auto* thisObject = jsCast<JSTestEventTarget*>(cell);
    309309    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    310310    Base::visitChildren(thisObject, visitor);
     
    314314bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    315315{
    316     JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
     316    auto* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
    317317    if (jsTestEventTarget->impl().isFiringEventListeners())
    318318        return true;
     
    323323void JSTestEventTargetOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    324324{
    325     JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
    326     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     325    auto* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
     326    auto& world = *static_cast<DOMWrapperWorld*>(context);
    327327    uncacheWrapper(world, &jsTestEventTarget->impl(), jsTestEventTarget);
    328328    jsTestEventTarget->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r181024 r181156  
    159159bool JSTestException::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    160160{
    161     JSTestException* thisObject = jsCast<JSTestException*>(object);
     161    auto* thisObject = jsCast<JSTestException*>(object);
    162162    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    163163    return getStaticValueSlot<JSTestException, Base>(exec, JSTestExceptionTable, thisObject, propertyName, slot);
     
    169169    UNUSED_PARAM(slotBase);
    170170    UNUSED_PARAM(thisValue);
    171     JSTestException* castedThis = jsCast<JSTestException*>(slotBase);
    172     TestException& impl = castedThis->impl();
     171    auto* castedThis = jsCast<JSTestException*>(slotBase);
     172    auto& impl = castedThis->impl();
    173173    JSValue result = jsStringWithCache(exec, impl.name());
    174174    return JSValue::encode(result);
     
    198198void JSTestExceptionOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    199199{
    200     JSTestException* jsTestException = jsCast<JSTestException*>(handle.slot()->asCell());
    201     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     200    auto* jsTestException = jsCast<JSTestException*>(handle.slot()->asCell());
     201    auto& world = *static_cast<DOMWrapperWorld*>(context);
    202202    uncacheWrapper(world, &jsTestException->impl(), jsTestException);
    203203    jsTestException->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp

    r181024 r181156  
    161161bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    162162{
    163     JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
     163    auto* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
    164164    if (!isObservable(jsTestGenerateIsReachable))
    165165        return false;
     
    170170void JSTestGenerateIsReachableOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    171171{
    172     JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
    173     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     172    auto* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
     173    auto& world = *static_cast<DOMWrapperWorld*>(context);
    174174    uncacheWrapper(world, &jsTestGenerateIsReachable->impl(), jsTestGenerateIsReachable);
    175175    jsTestGenerateIsReachable->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r181024 r181156  
    272272EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::constructJSTestInterface(ExecState* exec)
    273273{
    274     JSTestInterfaceConstructor* castedThis = jsCast<JSTestInterfaceConstructor*>(exec->callee());
     274    auto* castedThis = jsCast<JSTestInterfaceConstructor*>(exec->callee());
    275275    if (UNLIKELY(exec->argumentCount() < 1))
    276276        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    443443bool JSTestInterface::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    444444{
    445     JSTestInterface* thisObject = jsCast<JSTestInterface*>(object);
     445    auto* thisObject = jsCast<JSTestInterface*>(object);
    446446    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    447447    return getStaticValueSlot<JSTestInterface, Base>(exec, JSTestInterfaceTable, thisObject, propertyName, slot);
     
    484484        return throwGetterTypeError(*exec, "TestInterface", "implementsStr1");
    485485    }
    486     TestInterface& impl = castedThis->impl();
     486    auto& impl = castedThis->impl();
    487487    JSValue result = jsStringWithCache(exec, impl.implementsStr1());
    488488    return JSValue::encode(result);
     
    503503        return throwGetterTypeError(*exec, "TestInterface", "implementsStr2");
    504504    }
    505     TestInterface& impl = castedThis->impl();
     505    auto& impl = castedThis->impl();
    506506    JSValue result = jsStringWithCache(exec, impl.implementsStr2());
    507507    return JSValue::encode(result);
     
    516516    UNUSED_PARAM(slotBase);
    517517    UNUSED_PARAM(thisValue);
    518     JSTestInterface* castedThis = jsCast<JSTestInterface*>(slotBase);
     518    auto* castedThis = jsCast<JSTestInterface*>(slotBase);
    519519    return JSValue::encode(castedThis->implementsStr3(exec));
    520520}
     
    534534        return throwGetterTypeError(*exec, "TestInterface", "implementsNode");
    535535    }
    536     TestInterface& impl = castedThis->impl();
     536    auto& impl = castedThis->impl();
    537537    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsNode()));
    538538    return JSValue::encode(result);
     
    577577        return throwGetterTypeError(*exec, "TestInterface", "supplementalStr1");
    578578    }
    579     TestInterface& impl = castedThis->impl();
     579    auto& impl = castedThis->impl();
    580580    JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr1(&impl));
    581581    return JSValue::encode(result);
     
    596596        return throwGetterTypeError(*exec, "TestInterface", "supplementalStr2");
    597597    }
    598     TestInterface& impl = castedThis->impl();
     598    auto& impl = castedThis->impl();
    599599    JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr2(&impl));
    600600    return JSValue::encode(result);
     
    609609    UNUSED_PARAM(slotBase);
    610610    UNUSED_PARAM(thisValue);
    611     JSTestInterface* castedThis = jsCast<JSTestInterface*>(slotBase);
     611    auto* castedThis = jsCast<JSTestInterface*>(slotBase);
    612612    return JSValue::encode(castedThis->supplementalStr3(exec));
    613613}
     
    627627        return throwGetterTypeError(*exec, "TestInterface", "supplementalNode");
    628628    }
    629     TestInterface& impl = castedThis->impl();
     629    auto& impl = castedThis->impl();
    630630    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(&impl)));
    631631    return JSValue::encode(result);
     
    644644void JSTestInterface::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
    645645{
    646     JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell);
     646    auto* thisObject = jsCast<JSTestInterface*>(cell);
    647647    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    648648    if (thisObject->putDelegate(exec, propertyName, value, slot))
     
    653653void JSTestInterface::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow)
    654654{
    655     JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell);
     655    auto* thisObject = jsCast<JSTestInterface*>(cell);
    656656    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    657657    PropertyName propertyName = Identifier::from(exec, index);
     
    688688        return;
    689689    }
    690     TestInterface& impl = castedThis->impl();
     690    auto& impl = castedThis->impl();
    691691    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    692692    if (UNLIKELY(exec->hadException()))
     
    703703    UNUSED_PARAM(baseObject);
    704704    UNUSED_PARAM(thisValue);
    705     JSTestInterface* castedThis = jsCast<JSTestInterface*>(baseObject);
     705    auto* castedThis = jsCast<JSTestInterface*>(baseObject);
    706706    UNUSED_PARAM(thisValue);
    707707    UNUSED_PARAM(exec);
     
    724724        return;
    725725    }
    726     TestInterface& impl = castedThis->impl();
     726    auto& impl = castedThis->impl();
    727727    Node* nativeValue(JSNode::toWrapped(value));
    728728    if (UNLIKELY(exec->hadException()))
     
    759759        return;
    760760    }
    761     TestInterface& impl = castedThis->impl();
     761    auto& impl = castedThis->impl();
    762762    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    763763    if (UNLIKELY(exec->hadException()))
     
    774774    UNUSED_PARAM(baseObject);
    775775    UNUSED_PARAM(thisValue);
    776     JSTestInterface* castedThis = jsCast<JSTestInterface*>(baseObject);
     776    auto* castedThis = jsCast<JSTestInterface*>(baseObject);
    777777    UNUSED_PARAM(thisValue);
    778778    UNUSED_PARAM(exec);
     
    795795        return;
    796796    }
    797     TestInterface& impl = castedThis->impl();
     797    auto& impl = castedThis->impl();
    798798    Node* nativeValue(JSNode::toWrapped(value));
    799799    if (UNLIKELY(exec->hadException()))
     
    817817        return throwThisTypeError(*exec, "TestInterface", "implementsMethod1");
    818818    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    819     TestInterface& impl = castedThis->impl();
     819    auto& impl = castedThis->impl();
    820820    impl.implementsMethod1();
    821821    return JSValue::encode(jsUndefined());
     
    832832        return throwThisTypeError(*exec, "TestInterface", "implementsMethod2");
    833833    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    834     TestInterface& impl = castedThis->impl();
     834    auto& impl = castedThis->impl();
    835835    if (UNLIKELY(exec->argumentCount() < 2))
    836836        return throwVMError(exec, createNotEnoughArgumentsError(exec));
    837837    ExceptionCode ec = 0;
    838     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     838    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    839839    if (!scriptContext)
    840840        return JSValue::encode(jsUndefined());
     
    883883        return throwThisTypeError(*exec, "TestInterface", "supplementalMethod1");
    884884    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    885     TestInterface& impl = castedThis->impl();
     885    auto& impl = castedThis->impl();
    886886    TestSupplemental::supplementalMethod1(&impl);
    887887    return JSValue::encode(jsUndefined());
     
    898898        return throwThisTypeError(*exec, "TestInterface", "supplementalMethod2");
    899899    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    900     TestInterface& impl = castedThis->impl();
     900    auto& impl = castedThis->impl();
    901901    if (UNLIKELY(exec->argumentCount() < 2))
    902902        return throwVMError(exec, createNotEnoughArgumentsError(exec));
    903903    ExceptionCode ec = 0;
    904     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     904    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    905905    if (!scriptContext)
    906906        return JSValue::encode(jsUndefined());
     
    943943bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    944944{
    945     JSTestInterface* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
     945    auto* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
    946946    if (jsTestInterface->impl().hasPendingActivity())
    947947        return true;
     
    952952void JSTestInterfaceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    953953{
    954     JSTestInterface* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
    955     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     954    auto* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
     955    auto& world = *static_cast<DOMWrapperWorld*>(context);
    956956    uncacheWrapper(world, &jsTestInterface->impl(), jsTestInterface);
    957957    jsTestInterface->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r181024 r181156  
    167167        return throwThisTypeError(*exec, "TestMediaQueryListListener", "method");
    168168    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestMediaQueryListListener::info());
    169     TestMediaQueryListListener& impl = castedThis->impl();
     169    auto& impl = castedThis->impl();
    170170    if (UNLIKELY(exec->argumentCount() < 1))
    171171        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    186186void JSTestMediaQueryListListenerOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    187187{
    188     JSTestMediaQueryListListener* jsTestMediaQueryListListener = jsCast<JSTestMediaQueryListListener*>(handle.slot()->asCell());
    189     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     188    auto* jsTestMediaQueryListListener = jsCast<JSTestMediaQueryListListener*>(handle.slot()->asCell());
     189    auto& world = *static_cast<DOMWrapperWorld*>(context);
    190190    uncacheWrapper(world, &jsTestMediaQueryListListener->impl(), jsTestMediaQueryListListener);
    191191    jsTestMediaQueryListListener->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r181024 r181156  
    125125EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor(ExecState* exec)
    126126{
    127     JSTestNamedConstructorNamedConstructor* castedThis = jsCast<JSTestNamedConstructorNamedConstructor*>(exec->callee());
     127    auto* castedThis = jsCast<JSTestNamedConstructorNamedConstructor*>(exec->callee());
    128128    if (UNLIKELY(exec->argumentCount() < 1))
    129129        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    231231bool JSTestNamedConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    232232{
    233     JSTestNamedConstructor* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
     233    auto* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
    234234    if (jsTestNamedConstructor->impl().hasPendingActivity())
    235235        return true;
     
    240240void JSTestNamedConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    241241{
    242     JSTestNamedConstructor* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
    243     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     242    auto* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
     243    auto& world = *static_cast<DOMWrapperWorld*>(context);
    244244    uncacheWrapper(world, &jsTestNamedConstructor->impl(), jsTestNamedConstructor);
    245245    jsTestNamedConstructor->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r181024 r181156  
    8787EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::constructJSTestNode(ExecState* exec)
    8888{
    89     JSTestNodeConstructor* castedThis = jsCast<JSTestNodeConstructor*>(exec->callee());
     89    auto* castedThis = jsCast<JSTestNodeConstructor*>(exec->callee());
    9090    RefPtr<TestNode> object = TestNode::create();
    9191    return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
     
    160160void JSTestNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
    161161{
    162     JSTestNode* thisObject = jsCast<JSTestNode*>(cell);
     162    auto* thisObject = jsCast<JSTestNode*>(cell);
    163163    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    164164    Base::visitChildren(thisObject, visitor);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r181024 r181156  
    200200    }
    201201#endif
    202     TestNondeterministic& impl = castedThis->impl();
     202    auto& impl = castedThis->impl();
    203203    JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
    204204    return JSValue::encode(result);
     
    237237    }
    238238#endif
    239     TestNondeterministic& impl = castedThis->impl();
     239    auto& impl = castedThis->impl();
    240240    JSValue result = jsStringWithCache(exec, impl.nondeterministicWriteableAttr());
    241241    return JSValue::encode(result);
     
    274274    }
    275275#endif
    276     TestNondeterministic& impl = castedThis->impl();
     276    auto& impl = castedThis->impl();
    277277    JSValue result = jsStringWithCache(exec, impl.nondeterministicExceptionAttr());
    278278    return JSValue::encode(result);
     
    314314    }
    315315#endif
    316     TestNondeterministic& impl = castedThis->impl();
     316    auto& impl = castedThis->impl();
    317317    JSValue result = jsStringWithCache(exec, impl.nondeterministicGetterExceptionAttr(ec));
    318318    setDOMException(exec, ec);
     
    352352    }
    353353#endif
    354     TestNondeterministic& impl = castedThis->impl();
     354    auto& impl = castedThis->impl();
    355355    JSValue result = jsStringWithCache(exec, impl.nondeterministicSetterExceptionAttr());
    356356    return JSValue::encode(result);
     
    378378        return;
    379379    }
    380     TestNondeterministic& impl = castedThis->impl();
     380    auto& impl = castedThis->impl();
    381381    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    382382    if (UNLIKELY(exec->hadException()))
     
    398398        return;
    399399    }
    400     TestNondeterministic& impl = castedThis->impl();
     400    auto& impl = castedThis->impl();
    401401    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    402402    if (UNLIKELY(exec->hadException()))
     
    418418        return;
    419419    }
    420     TestNondeterministic& impl = castedThis->impl();
     420    auto& impl = castedThis->impl();
    421421    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    422422    if (UNLIKELY(exec->hadException()))
     
    438438        return;
    439439    }
    440     TestNondeterministic& impl = castedThis->impl();
     440    auto& impl = castedThis->impl();
    441441    ExceptionCode ec = 0;
    442442    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     
    460460        return throwThisTypeError(*exec, "TestNondeterministic", "nondeterministicZeroArgFunction");
    461461    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNondeterministic::info());
    462     TestNondeterministic& impl = castedThis->impl();
     462    auto& impl = castedThis->impl();
    463463    JSValue result;
    464464#if ENABLE(WEB_REPLAY)
     
    493493void JSTestNondeterministicOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    494494{
    495     JSTestNondeterministic* jsTestNondeterministic = jsCast<JSTestNondeterministic*>(handle.slot()->asCell());
    496     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     495    auto* jsTestNondeterministic = jsCast<JSTestNondeterministic*>(handle.slot()->asCell());
     496    auto& world = *static_cast<DOMWrapperWorld*>(context);
    497497    uncacheWrapper(world, &jsTestNondeterministic->impl(), jsTestNondeterministic);
    498498    jsTestNondeterministic->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r181024 r181156  
    443443EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
    444444{
    445     JSTestObjConstructor* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
     445    auto* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
    446446    if (UNLIKELY(exec->argumentCount() < 1))
    447447        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    685685bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    686686{
    687     JSTestObj* thisObject = jsCast<JSTestObj*>(object);
     687    auto* thisObject = jsCast<JSTestObj*>(object);
    688688    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    689689    return getStaticValueSlot<JSTestObj, Base>(exec, JSTestObjTable, thisObject, propertyName, slot);
     
    701701        return throwGetterTypeError(*exec, "TestObj", "readOnlyLongAttr");
    702702    }
    703     TestObj& impl = castedThis->impl();
     703    auto& impl = castedThis->impl();
    704704    JSValue result = jsNumber(impl.readOnlyLongAttr());
    705705    return JSValue::encode(result);
     
    718718        return throwGetterTypeError(*exec, "TestObj", "readOnlyStringAttr");
    719719    }
    720     TestObj& impl = castedThis->impl();
     720    auto& impl = castedThis->impl();
    721721    JSValue result = jsStringWithCache(exec, impl.readOnlyStringAttr());
    722722    return JSValue::encode(result);
     
    735735        return throwGetterTypeError(*exec, "TestObj", "readOnlyTestObjAttr");
    736736    }
    737     TestObj& impl = castedThis->impl();
     737    auto& impl = castedThis->impl();
    738738    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
    739739    return JSValue::encode(result);
     
    766766    UNUSED_PARAM(slotBase);
    767767    UNUSED_PARAM(thisValue);
    768     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     768    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    769769    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
    770770}
     
    776776    UNUSED_PARAM(slotBase);
    777777    UNUSED_PARAM(thisValue);
    778     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     778    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    779779    if (!castedThis->impl().frame())
    780780        return JSValue::encode(jsUndefined());
     
    797797        return throwGetterTypeError(*exec, "TestObj", "enumAttr");
    798798    }
    799     TestObj& impl = castedThis->impl();
     799    auto& impl = castedThis->impl();
    800800    JSValue result = jsStringWithCache(exec, impl.enumAttr());
    801801    return JSValue::encode(result);
     
    814814        return throwGetterTypeError(*exec, "TestObj", "byteAttr");
    815815    }
    816     TestObj& impl = castedThis->impl();
     816    auto& impl = castedThis->impl();
    817817    JSValue result = jsNumber(impl.byteAttr());
    818818    return JSValue::encode(result);
     
    831831        return throwGetterTypeError(*exec, "TestObj", "octetAttr");
    832832    }
    833     TestObj& impl = castedThis->impl();
     833    auto& impl = castedThis->impl();
    834834    JSValue result = jsNumber(impl.octetAttr());
    835835    return JSValue::encode(result);
     
    848848        return throwGetterTypeError(*exec, "TestObj", "shortAttr");
    849849    }
    850     TestObj& impl = castedThis->impl();
     850    auto& impl = castedThis->impl();
    851851    JSValue result = jsNumber(impl.shortAttr());
    852852    return JSValue::encode(result);
     
    865865        return throwGetterTypeError(*exec, "TestObj", "unsignedShortAttr");
    866866    }
    867     TestObj& impl = castedThis->impl();
     867    auto& impl = castedThis->impl();
    868868    JSValue result = jsNumber(impl.unsignedShortAttr());
    869869    return JSValue::encode(result);
     
    882882        return throwGetterTypeError(*exec, "TestObj", "longAttr");
    883883    }
    884     TestObj& impl = castedThis->impl();
     884    auto& impl = castedThis->impl();
    885885    JSValue result = jsNumber(impl.longAttr());
    886886    return JSValue::encode(result);
     
    899899        return throwGetterTypeError(*exec, "TestObj", "longLongAttr");
    900900    }
    901     TestObj& impl = castedThis->impl();
     901    auto& impl = castedThis->impl();
    902902    JSValue result = jsNumber(impl.longLongAttr());
    903903    return JSValue::encode(result);
     
    916916        return throwGetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
    917917    }
    918     TestObj& impl = castedThis->impl();
     918    auto& impl = castedThis->impl();
    919919    JSValue result = jsNumber(impl.unsignedLongLongAttr());
    920920    return JSValue::encode(result);
     
    933933        return throwGetterTypeError(*exec, "TestObj", "stringAttr");
    934934    }
    935     TestObj& impl = castedThis->impl();
     935    auto& impl = castedThis->impl();
    936936    JSValue result = jsStringWithCache(exec, impl.stringAttr());
    937937    return JSValue::encode(result);
     
    950950        return throwGetterTypeError(*exec, "TestObj", "testObjAttr");
    951951    }
    952     TestObj& impl = castedThis->impl();
     952    auto& impl = castedThis->impl();
    953953    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.testObjAttr()));
    954954    return JSValue::encode(result);
     
    967967        return throwGetterTypeError(*exec, "TestObj", "XMLObjAttr");
    968968    }
    969     TestObj& impl = castedThis->impl();
     969    auto& impl = castedThis->impl();
    970970    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.xmlObjAttr()));
    971971    return JSValue::encode(result);
     
    984984        return throwGetterTypeError(*exec, "TestObj", "create");
    985985    }
    986     TestObj& impl = castedThis->impl();
     986    auto& impl = castedThis->impl();
    987987    JSValue result = jsBoolean(impl.isCreate());
    988988    return JSValue::encode(result);
     
    10011001        return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
    10021002    }
    1003     TestObj& impl = castedThis->impl();
     1003    auto& impl = castedThis->impl();
    10041004    JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
    10051005    return JSValue::encode(result);
     
    10181018        return throwGetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
    10191019    }
    1020     TestObj& impl = castedThis->impl();
     1020    auto& impl = castedThis->impl();
    10211021    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
    10221022    return JSValue::encode(result);
     
    10351035        return throwGetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
    10361036    }
    1037     TestObj& impl = castedThis->impl();
     1037    auto& impl = castedThis->impl();
    10381038    JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
    10391039    return JSValue::encode(result);
     
    10521052        return throwGetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
    10531053    }
    1054     TestObj& impl = castedThis->impl();
     1054    auto& impl = castedThis->impl();
    10551055    JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
    10561056    return JSValue::encode(result);
     
    10691069        return throwGetterTypeError(*exec, "TestObj", "reflectedURLAttr");
    10701070    }
    1071     TestObj& impl = castedThis->impl();
     1071    auto& impl = castedThis->impl();
    10721072    JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
    10731073    return JSValue::encode(result);
     
    10861086        return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
    10871087    }
    1088     TestObj& impl = castedThis->impl();
     1088    auto& impl = castedThis->impl();
    10891089    JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
    10901090    return JSValue::encode(result);
     
    11031103        return throwGetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
    11041104    }
    1105     TestObj& impl = castedThis->impl();
     1105    auto& impl = castedThis->impl();
    11061106    JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
    11071107    return JSValue::encode(result);
     
    11201120        return throwGetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
    11211121    }
    1122     TestObj& impl = castedThis->impl();
     1122    auto& impl = castedThis->impl();
    11231123    JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
    11241124    return JSValue::encode(result);
     
    11371137        return throwGetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
    11381138    }
    1139     TestObj& impl = castedThis->impl();
     1139    auto& impl = castedThis->impl();
    11401140    JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
    11411141    return JSValue::encode(result);
     
    11541154        return throwGetterTypeError(*exec, "TestObj", "typedArrayAttr");
    11551155    }
    1156     TestObj& impl = castedThis->impl();
     1156    auto& impl = castedThis->impl();
    11571157    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.typedArrayAttr()));
    11581158    return JSValue::encode(result);
     
    11721172    }
    11731173    ExceptionCode ec = 0;
    1174     TestObj& impl = castedThis->impl();
     1174    auto& impl = castedThis->impl();
    11751175    JSValue result = jsNumber(impl.attrWithGetterException(ec));
    11761176    setDOMException(exec, ec);
     
    11901190        return throwGetterTypeError(*exec, "TestObj", "attrWithSetterException");
    11911191    }
    1192     TestObj& impl = castedThis->impl();
     1192    auto& impl = castedThis->impl();
    11931193    JSValue result = jsNumber(impl.attrWithSetterException());
    11941194    return JSValue::encode(result);
     
    12081208    }
    12091209    ExceptionCode ec = 0;
    1210     TestObj& impl = castedThis->impl();
     1210    auto& impl = castedThis->impl();
    12111211    JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
    12121212    setDOMException(exec, ec);
     
    12261226        return throwGetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
    12271227    }
    1228     TestObj& impl = castedThis->impl();
     1228    auto& impl = castedThis->impl();
    12291229    JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
    12301230    return JSValue::encode(result);
     
    12371237    UNUSED_PARAM(slotBase);
    12381238    UNUSED_PARAM(thisValue);
    1239     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     1239    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    12401240    return JSValue::encode(castedThis->customAttr(exec));
    12411241}
     
    12531253        return throwGetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
    12541254    }
    1255     TestObj& impl = castedThis->impl();
     1255    auto& impl = castedThis->impl();
    12561256    JSValue result = jsNumber(impl.withScriptStateAttribute(exec));
    12571257    return JSValue::encode(result);
     
    12701270        return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
    12711271    }
    1272     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     1272    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    12731273    if (!scriptContext)
    12741274        return JSValue::encode(jsUndefined());
    1275     TestObj& impl = castedThis->impl();
     1275    auto& impl = castedThis->impl();
    12761276    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(scriptContext)));
    12771277    return JSValue::encode(result);
     
    12911291    }
    12921292    ExceptionCode ec = 0;
    1293     TestObj& impl = castedThis->impl();
     1293    auto& impl = castedThis->impl();
    12941294    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
    12951295    setDOMException(exec, ec);
     
    13101310    }
    13111311    ExceptionCode ec = 0;
    1312     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     1312    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    13131313    if (!scriptContext)
    13141314        return JSValue::encode(jsUndefined());
    1315     TestObj& impl = castedThis->impl();
     1315    auto& impl = castedThis->impl();
    13161316    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
    13171317    setDOMException(exec, ec);
     
    13311331        return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
    13321332    }
    1333     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     1333    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    13341334    if (!scriptContext)
    13351335        return JSValue::encode(jsUndefined());
    1336     TestObj& impl = castedThis->impl();
     1336    auto& impl = castedThis->impl();
    13371337    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
    13381338    return JSValue::encode(result);
     
    13521352    }
    13531353    ExceptionCode ec = 0;
    1354     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     1354    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    13551355    if (!scriptContext)
    13561356        return JSValue::encode(jsUndefined());
    1357     TestObj& impl = castedThis->impl();
     1357    auto& impl = castedThis->impl();
    13581358    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
    13591359    setDOMException(exec, ec);
     
    13731373        return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
    13741374    }
    1375     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     1375    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    13761376    if (!scriptContext)
    13771377        return JSValue::encode(jsUndefined());
    1378     TestObj& impl = castedThis->impl();
     1378    auto& impl = castedThis->impl();
    13791379    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
    13801380    return JSValue::encode(result);
     
    13931393        return throwGetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
    13941394    }
    1395     TestObj& impl = castedThis->impl();
     1395    auto& impl = castedThis->impl();
    13961396    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
    13971397    return JSValue::encode(result);
     
    14111411        return throwGetterTypeError(*exec, "TestObj", "conditionalAttr1");
    14121412    }
    1413     TestObj& impl = castedThis->impl();
     1413    auto& impl = castedThis->impl();
    14141414    JSValue result = jsNumber(impl.conditionalAttr1());
    14151415    return JSValue::encode(result);
     
    14301430        return throwGetterTypeError(*exec, "TestObj", "conditionalAttr2");
    14311431    }
    1432     TestObj& impl = castedThis->impl();
     1432    auto& impl = castedThis->impl();
    14331433    JSValue result = jsNumber(impl.conditionalAttr2());
    14341434    return JSValue::encode(result);
     
    14491449        return throwGetterTypeError(*exec, "TestObj", "conditionalAttr3");
    14501450    }
    1451     TestObj& impl = castedThis->impl();
     1451    auto& impl = castedThis->impl();
    14521452    JSValue result = jsNumber(impl.conditionalAttr3());
    14531453    return JSValue::encode(result);
     
    14621462    UNUSED_PARAM(slotBase);
    14631463    UNUSED_PARAM(thisValue);
    1464     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     1464    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    14651465    return JSValue::encode(JSTestObjectA::getConstructor(exec->vm(), castedThis->globalObject()));
    14661466}
     
    14741474    UNUSED_PARAM(slotBase);
    14751475    UNUSED_PARAM(thisValue);
    1476     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     1476    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    14771477    return JSValue::encode(JSTestObjectB::getConstructor(exec->vm(), castedThis->globalObject()));
    14781478}
     
    14861486    UNUSED_PARAM(slotBase);
    14871487    UNUSED_PARAM(thisValue);
    1488     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
     1488    auto* castedThis = jsCast<JSTestObj*>(slotBase);
    14891489    return JSValue::encode(JSTestObjectC::getConstructor(exec->vm(), castedThis->globalObject()));
    14901490}
     
    15051505    if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
    15061506        return JSValue::encode(cachedValue);
    1507     TestObj& impl = castedThis->impl();
     1507    auto& impl = castedThis->impl();
    15081508    JSValue result = (impl.cachedAttribute1().hasNoValue() ? jsNull() : impl.cachedAttribute1().jsValue());
    15091509    castedThis->m_cachedAttribute1.set(exec->vm(), castedThis, result);
     
    15251525    if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
    15261526        return JSValue::encode(cachedValue);
    1527     TestObj& impl = castedThis->impl();
     1527    auto& impl = castedThis->impl();
    15281528    JSValue result = (impl.cachedAttribute2().hasNoValue() ? jsNull() : impl.cachedAttribute2().jsValue());
    15291529    castedThis->m_cachedAttribute2.set(exec->vm(), castedThis, result);
     
    15431543        return throwGetterTypeError(*exec, "TestObj", "anyAttribute");
    15441544    }
    1545     TestObj& impl = castedThis->impl();
     1545    auto& impl = castedThis->impl();
    15461546    JSValue result = (impl.anyAttribute().hasNoValue() ? jsNull() : impl.anyAttribute().jsValue());
    15471547    return JSValue::encode(result);
     
    15541554    UNUSED_PARAM(slotBase);
    15551555    UNUSED_PARAM(thisValue);
    1556     JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
    1557     TestObj& impl = castedThis->impl();
     1556    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     1557    auto& impl = castedThis->impl();
    15581558    return JSValue::encode(shouldAllowAccessToNode(exec, impl.contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
    15591559}
     
    15711571        return throwGetterTypeError(*exec, "TestObj", "mutablePoint");
    15721572    }
    1573     TestObj& impl = castedThis->impl();
     1573    auto& impl = castedThis->impl();
    15741574    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint)));
    15751575    return JSValue::encode(result);
     
    15881588        return throwGetterTypeError(*exec, "TestObj", "immutablePoint");
    15891589    }
    1590     TestObj& impl = castedThis->impl();
     1590    auto& impl = castedThis->impl();
    15911591    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint())));
    15921592    return JSValue::encode(result);
     
    16051605        return throwGetterTypeError(*exec, "TestObj", "strawberry");
    16061606    }
    1607     TestObj& impl = castedThis->impl();
     1607    auto& impl = castedThis->impl();
    16081608    JSValue result = jsNumber(impl.blueberry());
    16091609    return JSValue::encode(result);
     
    16221622        return throwGetterTypeError(*exec, "TestObj", "strictFloat");
    16231623    }
    1624     TestObj& impl = castedThis->impl();
     1624    auto& impl = castedThis->impl();
    16251625    JSValue result = jsNumber(impl.strictFloat());
    16261626    return JSValue::encode(result);
     
    16391639        return throwGetterTypeError(*exec, "TestObj", "description");
    16401640    }
    1641     TestObj& impl = castedThis->impl();
     1641    auto& impl = castedThis->impl();
    16421642    JSValue result = jsNumber(impl.description());
    16431643    return JSValue::encode(result);
     
    16561656        return throwGetterTypeError(*exec, "TestObj", "id");
    16571657    }
    1658     TestObj& impl = castedThis->impl();
     1658    auto& impl = castedThis->impl();
    16591659    JSValue result = jsNumber(impl.id());
    16601660    return JSValue::encode(result);
     
    16731673        return throwGetterTypeError(*exec, "TestObj", "hash");
    16741674    }
    1675     TestObj& impl = castedThis->impl();
     1675    auto& impl = castedThis->impl();
    16761676    JSValue result = jsStringWithCache(exec, impl.hash());
    16771677    return JSValue::encode(result);
     
    16901690        return throwGetterTypeError(*exec, "TestObj", "replaceableAttribute");
    16911691    }
    1692     TestObj& impl = castedThis->impl();
     1692    auto& impl = castedThis->impl();
    16931693    JSValue result = jsNumber(impl.replaceableAttribute());
    16941694    return JSValue::encode(result);
     
    17081708    }
    17091709    bool isNull = false;
    1710     TestObj& impl = castedThis->impl();
     1710    auto& impl = castedThis->impl();
    17111711    JSValue result = jsNumber(impl.nullableDoubleAttribute(isNull));
    17121712    if (isNull)
     
    17281728    }
    17291729    bool isNull = false;
    1730     TestObj& impl = castedThis->impl();
     1730    auto& impl = castedThis->impl();
    17311731    JSValue result = jsNumber(impl.nullableLongAttribute(isNull));
    17321732    if (isNull)
     
    17481748    }
    17491749    bool isNull = false;
    1750     TestObj& impl = castedThis->impl();
     1750    auto& impl = castedThis->impl();
    17511751    JSValue result = jsBoolean(impl.nullableBooleanAttribute(isNull));
    17521752    if (isNull)
     
    17681768    }
    17691769    bool isNull = false;
    1770     TestObj& impl = castedThis->impl();
     1770    auto& impl = castedThis->impl();
    17711771    JSValue result = jsStringWithCache(exec, impl.nullableStringAttribute(isNull));
    17721772    if (isNull)
     
    17881788    }
    17891789    bool isNull = false;
    1790     TestObj& impl = castedThis->impl();
     1790    auto& impl = castedThis->impl();
    17911791    JSValue result = jsNumber(impl.nullableLongSettableAttribute(isNull));
    17921792    if (isNull)
     
    18091809    ExceptionCode ec = 0;
    18101810    bool isNull = false;
    1811     TestObj& impl = castedThis->impl();
     1811    auto& impl = castedThis->impl();
    18121812    JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
    18131813    setDOMException(exec, ec);
     
    18291829        return throwGetterTypeError(*exec, "TestObj", "attribute");
    18301830    }
    1831     TestObj& impl = castedThis->impl();
     1831    auto& impl = castedThis->impl();
    18321832    JSValue result = jsStringWithCache(exec, impl.attribute());
    18331833    return JSValue::encode(result);
     
    18461846        return throwGetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
    18471847    }
    1848     TestObj& impl = castedThis->impl();
     1848    auto& impl = castedThis->impl();
    18491849    JSValue result = jsStringWithCache(exec, impl.attributeWithReservedEnumType());
    18501850    return JSValue::encode(result);
     
    18761876    UNUSED_PARAM(baseObject);
    18771877    UNUSED_PARAM(thisValue);
    1878     JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
    1879     UNUSED_PARAM(thisValue);
    1880     UNUSED_PARAM(exec);
    1881     // Shadowing a built-in constructor
     1878    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     1879    UNUSED_PARAM(thisValue);
     1880    UNUSED_PARAM(exec);
     1881    // Shadowing a built-in constructor.
    18821882    castedThis->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value);
    18831883}
     
    18961896        return;
    18971897    }
    1898     TestObj& impl = castedThis->impl();
     1898    auto& impl = castedThis->impl();
    18991899    const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    19001900    if (UNLIKELY(exec->hadException()))
     
    19181918        return;
    19191919    }
    1920     TestObj& impl = castedThis->impl();
     1920    auto& impl = castedThis->impl();
    19211921    int8_t nativeValue(toInt8(exec, value, NormalConversion));
    19221922    if (UNLIKELY(exec->hadException()))
     
    19381938        return;
    19391939    }
    1940     TestObj& impl = castedThis->impl();
     1940    auto& impl = castedThis->impl();
    19411941    uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
    19421942    if (UNLIKELY(exec->hadException()))
     
    19581958        return;
    19591959    }
    1960     TestObj& impl = castedThis->impl();
     1960    auto& impl = castedThis->impl();
    19611961    int16_t nativeValue(toInt16(exec, value, NormalConversion));
    19621962    if (UNLIKELY(exec->hadException()))
     
    19781978        return;
    19791979    }
    1980     TestObj& impl = castedThis->impl();
     1980    auto& impl = castedThis->impl();
    19811981    uint16_t nativeValue(toUInt16(exec, value, NormalConversion));
    19821982    if (UNLIKELY(exec->hadException()))
     
    19981998        return;
    19991999    }
    2000     TestObj& impl = castedThis->impl();
     2000    auto& impl = castedThis->impl();
    20012001    int nativeValue(toInt32(exec, value, NormalConversion));
    20022002    if (UNLIKELY(exec->hadException()))
     
    20182018        return;
    20192019    }
    2020     TestObj& impl = castedThis->impl();
     2020    auto& impl = castedThis->impl();
    20212021    long long nativeValue(toInt64(exec, value, NormalConversion));
    20222022    if (UNLIKELY(exec->hadException()))
     
    20382038        return;
    20392039    }
    2040     TestObj& impl = castedThis->impl();
     2040    auto& impl = castedThis->impl();
    20412041    unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
    20422042    if (UNLIKELY(exec->hadException()))
     
    20582058        return;
    20592059    }
    2060     TestObj& impl = castedThis->impl();
     2060    auto& impl = castedThis->impl();
    20612061    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    20622062    if (UNLIKELY(exec->hadException()))
     
    20782078        return;
    20792079    }
    2080     TestObj& impl = castedThis->impl();
     2080    auto& impl = castedThis->impl();
    20812081    TestObj* nativeValue(JSTestObj::toWrapped(value));
    20822082    if (UNLIKELY(exec->hadException()))
     
    20982098        return;
    20992099    }
    2100     TestObj& impl = castedThis->impl();
     2100    auto& impl = castedThis->impl();
    21012101    TestObj* nativeValue(JSTestObj::toWrapped(value));
    21022102    if (UNLIKELY(exec->hadException()))
     
    21182118        return;
    21192119    }
    2120     TestObj& impl = castedThis->impl();
     2120    auto& impl = castedThis->impl();
    21212121    bool nativeValue(value.toBoolean(exec));
    21222122    if (UNLIKELY(exec->hadException()))
     
    21382138        return;
    21392139    }
    2140     TestObj& impl = castedThis->impl();
     2140    auto& impl = castedThis->impl();
    21412141    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    21422142    if (UNLIKELY(exec->hadException()))
     
    21582158        return;
    21592159    }
    2160     TestObj& impl = castedThis->impl();
     2160    auto& impl = castedThis->impl();
    21612161    int nativeValue(toInt32(exec, value, NormalConversion));
    21622162    if (UNLIKELY(exec->hadException()))
     
    21782178        return;
    21792179    }
    2180     TestObj& impl = castedThis->impl();
     2180    auto& impl = castedThis->impl();
    21812181    unsigned nativeValue(toUInt32(exec, value, NormalConversion));
    21822182    if (UNLIKELY(exec->hadException()))
     
    21982198        return;
    21992199    }
    2200     TestObj& impl = castedThis->impl();
     2200    auto& impl = castedThis->impl();
    22012201    bool nativeValue(value.toBoolean(exec));
    22022202    if (UNLIKELY(exec->hadException()))
     
    22182218        return;
    22192219    }
    2220     TestObj& impl = castedThis->impl();
     2220    auto& impl = castedThis->impl();
    22212221    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    22222222    if (UNLIKELY(exec->hadException()))
     
    22382238        return;
    22392239    }
    2240     TestObj& impl = castedThis->impl();
     2240    auto& impl = castedThis->impl();
    22412241    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    22422242    if (UNLIKELY(exec->hadException()))
     
    22582258        return;
    22592259    }
    2260     TestObj& impl = castedThis->impl();
     2260    auto& impl = castedThis->impl();
    22612261    int nativeValue(toInt32(exec, value, NormalConversion));
    22622262    if (UNLIKELY(exec->hadException()))
     
    22782278        return;
    22792279    }
    2280     TestObj& impl = castedThis->impl();
     2280    auto& impl = castedThis->impl();
    22812281    bool nativeValue(value.toBoolean(exec));
    22822282    if (UNLIKELY(exec->hadException()))
     
    22982298        return;
    22992299    }
    2300     TestObj& impl = castedThis->impl();
     2300    auto& impl = castedThis->impl();
    23012301    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    23022302    if (UNLIKELY(exec->hadException()))
     
    23182318        return;
    23192319    }
    2320     TestObj& impl = castedThis->impl();
     2320    auto& impl = castedThis->impl();
    23212321    RefPtr<Float32Array> nativeValue(toFloat32Array(value));
    23222322    if (UNLIKELY(exec->hadException()))
     
    23382338        return;
    23392339    }
    2340     TestObj& impl = castedThis->impl();
     2340    auto& impl = castedThis->impl();
    23412341    int nativeValue(toInt32(exec, value, NormalConversion));
    23422342    if (UNLIKELY(exec->hadException()))
     
    23582358        return;
    23592359    }
    2360     TestObj& impl = castedThis->impl();
     2360    auto& impl = castedThis->impl();
    23612361    ExceptionCode ec = 0;
    23622362    int nativeValue(toInt32(exec, value, NormalConversion));
     
    23802380        return;
    23812381    }
    2382     TestObj& impl = castedThis->impl();
     2382    auto& impl = castedThis->impl();
    23832383    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    23842384    if (UNLIKELY(exec->hadException()))
     
    24002400        return;
    24012401    }
    2402     TestObj& impl = castedThis->impl();
     2402    auto& impl = castedThis->impl();
    24032403    ExceptionCode ec = 0;
    24042404    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     
    24152415    UNUSED_PARAM(baseObject);
    24162416    UNUSED_PARAM(thisValue);
    2417     JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
     2417    auto* castedThis = jsCast<JSTestObj*>(baseObject);
    24182418    UNUSED_PARAM(thisValue);
    24192419    UNUSED_PARAM(exec);
     
    24342434        return;
    24352435    }
    2436     TestObj& impl = castedThis->impl();
     2436    auto& impl = castedThis->impl();
    24372437    int nativeValue(toInt32(exec, value, NormalConversion));
    24382438    if (UNLIKELY(exec->hadException()))
     
    24542454        return;
    24552455    }
    2456     TestObj& impl = castedThis->impl();
     2456    auto& impl = castedThis->impl();
    24572457    TestObj* nativeValue(JSTestObj::toWrapped(value));
    24582458    if (UNLIKELY(exec->hadException()))
    24592459        return;
    2460     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     2460    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    24612461    if (!scriptContext)
    24622462        return;
     
    24772477        return;
    24782478    }
    2479     TestObj& impl = castedThis->impl();
     2479    auto& impl = castedThis->impl();
    24802480    TestObj* nativeValue(JSTestObj::toWrapped(value));
    24812481    if (UNLIKELY(exec->hadException()))
     
    24972497        return;
    24982498    }
    2499     TestObj& impl = castedThis->impl();
     2499    auto& impl = castedThis->impl();
    25002500    TestObj* nativeValue(JSTestObj::toWrapped(value));
    25012501    if (UNLIKELY(exec->hadException()))
    25022502        return;
    2503     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     2503    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    25042504    if (!scriptContext)
    25052505        return;
     
    25202520        return;
    25212521    }
    2522     TestObj& impl = castedThis->impl();
     2522    auto& impl = castedThis->impl();
    25232523    TestObj* nativeValue(JSTestObj::toWrapped(value));
    25242524    if (UNLIKELY(exec->hadException()))
    25252525        return;
    2526     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     2526    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    25272527    if (!scriptContext)
    25282528        return;
     
    25432543        return;
    25442544    }
    2545     TestObj& impl = castedThis->impl();
     2545    auto& impl = castedThis->impl();
    25462546    TestObj* nativeValue(JSTestObj::toWrapped(value));
    25472547    if (UNLIKELY(exec->hadException()))
    25482548        return;
    2549     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     2549    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    25502550    if (!scriptContext)
    25512551        return;
     
    25662566        return;
    25672567    }
    2568     TestObj& impl = castedThis->impl();
     2568    auto& impl = castedThis->impl();
    25692569    TestObj* nativeValue(JSTestObj::toWrapped(value));
    25702570    if (UNLIKELY(exec->hadException()))
    25712571        return;
    2572     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     2572    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    25732573    if (!scriptContext)
    25742574        return;
     
    25892589        return;
    25902590    }
    2591     TestObj& impl = castedThis->impl();
     2591    auto& impl = castedThis->impl();
    25922592    TestObj* nativeValue(JSTestObj::toWrapped(value));
    25932593    if (UNLIKELY(exec->hadException()))
     
    26102610        return;
    26112611    }
    2612     TestObj& impl = castedThis->impl();
     2612    auto& impl = castedThis->impl();
    26132613    int nativeValue(toInt32(exec, value, NormalConversion));
    26142614    if (UNLIKELY(exec->hadException()))
     
    26322632        return;
    26332633    }
    2634     TestObj& impl = castedThis->impl();
     2634    auto& impl = castedThis->impl();
    26352635    int nativeValue(toInt32(exec, value, NormalConversion));
    26362636    if (UNLIKELY(exec->hadException()))
     
    26542654        return;
    26552655    }
    2656     TestObj& impl = castedThis->impl();
     2656    auto& impl = castedThis->impl();
    26572657    int nativeValue(toInt32(exec, value, NormalConversion));
    26582658    if (UNLIKELY(exec->hadException()))
     
    26692669    UNUSED_PARAM(baseObject);
    26702670    UNUSED_PARAM(thisValue);
    2671     JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
    2672     UNUSED_PARAM(thisValue);
    2673     UNUSED_PARAM(exec);
    2674     // Shadowing a built-in constructor
     2671    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     2672    UNUSED_PARAM(thisValue);
     2673    UNUSED_PARAM(exec);
     2674    // Shadowing a built-in constructor.
    26752675    castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value);
    26762676}
     
    26842684    UNUSED_PARAM(baseObject);
    26852685    UNUSED_PARAM(thisValue);
    2686     JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
    2687     UNUSED_PARAM(thisValue);
    2688     UNUSED_PARAM(exec);
    2689     // Shadowing a built-in constructor
     2686    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     2687    UNUSED_PARAM(thisValue);
     2688    UNUSED_PARAM(exec);
     2689    // Shadowing a built-in constructor.
    26902690    castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value);
    26912691}
     
    26992699    UNUSED_PARAM(baseObject);
    27002700    UNUSED_PARAM(thisValue);
    2701     JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
    2702     UNUSED_PARAM(thisValue);
    2703     UNUSED_PARAM(exec);
    2704     // Shadowing a built-in constructor
     2701    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     2702    UNUSED_PARAM(thisValue);
     2703    UNUSED_PARAM(exec);
     2704    // Shadowing a built-in constructor.
    27052705    castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value);
    27062706}
     
    27202720        return;
    27212721    }
    2722     TestObj& impl = castedThis->impl();
     2722    auto& impl = castedThis->impl();
    27232723    Deprecated::ScriptValue nativeValue(exec->vm(), value);
    27242724    if (UNLIKELY(exec->hadException()))
     
    27402740        return;
    27412741    }
    2742     TestObj& impl = castedThis->impl();
     2742    auto& impl = castedThis->impl();
    27432743    SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
    27442744    if (UNLIKELY(exec->hadException()))
     
    27602760        return;
    27612761    }
    2762     TestObj& impl = castedThis->impl();
     2762    auto& impl = castedThis->impl();
    27632763    SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
    27642764    if (UNLIKELY(exec->hadException()))
     
    27802780        return;
    27812781    }
    2782     TestObj& impl = castedThis->impl();
     2782    auto& impl = castedThis->impl();
    27832783    int nativeValue(toInt32(exec, value, NormalConversion));
    27842784    if (UNLIKELY(exec->hadException()))
     
    28002800        return;
    28012801    }
    2802     TestObj& impl = castedThis->impl();
     2802    auto& impl = castedThis->impl();
    28032803    float nativeValue(value.toFloat(exec));
    28042804    if (UNLIKELY(exec->hadException()))
     
    28202820        return;
    28212821    }
    2822     TestObj& impl = castedThis->impl();
     2822    auto& impl = castedThis->impl();
    28232823    int nativeValue(toInt32(exec, value, NormalConversion));
    28242824    if (UNLIKELY(exec->hadException()))
     
    28402840        return;
    28412841    }
    2842     // Shadowing a built-in object
     2842    // Shadowing a built-in object.
    28432843    castedThis->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value);
    28442844}
     
    28572857        return;
    28582858    }
    2859     TestObj& impl = castedThis->impl();
     2859    auto& impl = castedThis->impl();
    28602860    int nativeValue(toInt32(exec, value, NormalConversion));
    28612861    if (UNLIKELY(exec->hadException()))
     
    28772877        return;
    28782878    }
    2879     TestObj& impl = castedThis->impl();
     2879    auto& impl = castedThis->impl();
    28802880    int nativeValue(toInt32(exec, value, NormalConversion));
    28812881    if (UNLIKELY(exec->hadException()))
     
    28972897        return;
    28982898    }
    2899     TestObj& impl = castedThis->impl();
     2899    auto& impl = castedThis->impl();
    29002900    const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    29012901    if (UNLIKELY(exec->hadException()))
     
    29192919        return throwThisTypeError(*exec, "TestObj", "voidMethod");
    29202920    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    2921     TestObj& impl = castedThis->impl();
     2921    auto& impl = castedThis->impl();
    29222922    impl.voidMethod();
    29232923    return JSValue::encode(jsUndefined());
     
    29312931        return throwThisTypeError(*exec, "TestObj", "voidMethodWithArgs");
    29322932    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    2933     TestObj& impl = castedThis->impl();
     2933    auto& impl = castedThis->impl();
    29342934    if (UNLIKELY(exec->argumentCount() < 3))
    29352935        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    29542954        return throwThisTypeError(*exec, "TestObj", "byteMethod");
    29552955    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    2956     TestObj& impl = castedThis->impl();
     2956    auto& impl = castedThis->impl();
    29572957    JSValue result = jsNumber(impl.byteMethod());
    29582958    return JSValue::encode(result);
     
    29662966        return throwThisTypeError(*exec, "TestObj", "byteMethodWithArgs");
    29672967    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    2968     TestObj& impl = castedThis->impl();
     2968    auto& impl = castedThis->impl();
    29692969    if (UNLIKELY(exec->argumentCount() < 3))
    29702970        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    29892989        return throwThisTypeError(*exec, "TestObj", "octetMethod");
    29902990    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    2991     TestObj& impl = castedThis->impl();
     2991    auto& impl = castedThis->impl();
    29922992    JSValue result = jsNumber(impl.octetMethod());
    29932993    return JSValue::encode(result);
     
    30013001        return throwThisTypeError(*exec, "TestObj", "octetMethodWithArgs");
    30023002    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3003     TestObj& impl = castedThis->impl();
     3003    auto& impl = castedThis->impl();
    30043004    if (UNLIKELY(exec->argumentCount() < 3))
    30053005        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    30243024        return throwThisTypeError(*exec, "TestObj", "longMethod");
    30253025    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3026     TestObj& impl = castedThis->impl();
     3026    auto& impl = castedThis->impl();
    30273027    JSValue result = jsNumber(impl.longMethod());
    30283028    return JSValue::encode(result);
     
    30363036        return throwThisTypeError(*exec, "TestObj", "longMethodWithArgs");
    30373037    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3038     TestObj& impl = castedThis->impl();
     3038    auto& impl = castedThis->impl();
    30393039    if (UNLIKELY(exec->argumentCount() < 3))
    30403040        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    30593059        return throwThisTypeError(*exec, "TestObj", "objMethod");
    30603060    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3061     TestObj& impl = castedThis->impl();
     3061    auto& impl = castedThis->impl();
    30623062    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
    30633063    return JSValue::encode(result);
     
    30713071        return throwThisTypeError(*exec, "TestObj", "objMethodWithArgs");
    30723072    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3073     TestObj& impl = castedThis->impl();
     3073    auto& impl = castedThis->impl();
    30743074    if (UNLIKELY(exec->argumentCount() < 3))
    30753075        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    30943094        return throwThisTypeError(*exec, "TestObj", "methodWithSequenceArg");
    30953095    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3096     TestObj& impl = castedThis->impl();
     3096    auto& impl = castedThis->impl();
    30973097    if (UNLIKELY(exec->argumentCount() < 1))
    30983098        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    31113111        return throwThisTypeError(*exec, "TestObj", "methodReturningSequence");
    31123112    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3113     TestObj& impl = castedThis->impl();
     3113    auto& impl = castedThis->impl();
    31143114    if (UNLIKELY(exec->argumentCount() < 1))
    31153115        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    31283128        return throwThisTypeError(*exec, "TestObj", "methodWithEnumArg");
    31293129    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3130     TestObj& impl = castedThis->impl();
     3130    auto& impl = castedThis->impl();
    31313131    if (UNLIKELY(exec->argumentCount() < 1))
    31323132        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    31473147        return throwThisTypeError(*exec, "TestObj", "methodThatRequiresAllArgsAndThrows");
    31483148    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3149     TestObj& impl = castedThis->impl();
     3149    auto& impl = castedThis->impl();
    31503150    if (UNLIKELY(exec->argumentCount() < 2))
    31513151        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    31703170        return throwThisTypeError(*exec, "TestObj", "serializedValue");
    31713171    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3172     TestObj& impl = castedThis->impl();
     3172    auto& impl = castedThis->impl();
    31733173    if (UNLIKELY(exec->argumentCount() < 1))
    31743174        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    31873187        return throwThisTypeError(*exec, "TestObj", "optionsObject");
    31883188    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3189     TestObj& impl = castedThis->impl();
     3189    auto& impl = castedThis->impl();
    31903190    if (UNLIKELY(exec->argumentCount() < 1))
    31913191        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    32073207        return throwThisTypeError(*exec, "TestObj", "methodWithException");
    32083208    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3209     TestObj& impl = castedThis->impl();
     3209    auto& impl = castedThis->impl();
    32103210    ExceptionCode ec = 0;
    32113211    impl.methodWithException(ec);
     
    32413241        return throwThisTypeError(*exec, "TestObj", "addEventListener");
    32423242    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3243     TestObj& impl = castedThis->impl();
     3243    auto& impl = castedThis->impl();
    32443244    JSValue listener = exec->argument(1);
    32453245    if (UNLIKELY(!listener.isObject()))
     
    32563256        return throwThisTypeError(*exec, "TestObj", "removeEventListener");
    32573257    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3258     TestObj& impl = castedThis->impl();
     3258    auto& impl = castedThis->impl();
    32593259    JSValue listener = exec->argument(1);
    32603260    if (UNLIKELY(!listener.isObject()))
     
    32713271        return throwThisTypeError(*exec, "TestObj", "withScriptStateVoid");
    32723272    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3273     TestObj& impl = castedThis->impl();
     3273    auto& impl = castedThis->impl();
    32743274    impl.withScriptStateVoid(exec);
    32753275    return JSValue::encode(jsUndefined());
     
    32833283        return throwThisTypeError(*exec, "TestObj", "withScriptStateObj");
    32843284    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3285     TestObj& impl = castedThis->impl();
     3285    auto& impl = castedThis->impl();
    32863286    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
    32873287    if (UNLIKELY(exec->hadException()))
     
    32973297        return throwThisTypeError(*exec, "TestObj", "withScriptStateVoidException");
    32983298    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3299     TestObj& impl = castedThis->impl();
     3299    auto& impl = castedThis->impl();
    33003300    ExceptionCode ec = 0;
    33013301    impl.withScriptStateVoidException(exec, ec);
     
    33113311        return throwThisTypeError(*exec, "TestObj", "withScriptStateObjException");
    33123312    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3313     TestObj& impl = castedThis->impl();
     3313    auto& impl = castedThis->impl();
    33143314    ExceptionCode ec = 0;
    33153315    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
     
    33283328        return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContext");
    33293329    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3330     TestObj& impl = castedThis->impl();
    3331     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     3330    auto& impl = castedThis->impl();
     3331    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    33323332    if (!scriptContext)
    33333333        return JSValue::encode(jsUndefined());
     
    33433343        return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptState");
    33443344    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3345     TestObj& impl = castedThis->impl();
    3346     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     3345    auto& impl = castedThis->impl();
     3346    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    33473347    if (!scriptContext)
    33483348        return JSValue::encode(jsUndefined());
     
    33583358        return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateObjException");
    33593359    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3360     TestObj& impl = castedThis->impl();
     3360    auto& impl = castedThis->impl();
    33613361    ExceptionCode ec = 0;
    3362     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     3362    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    33633363    if (!scriptContext)
    33643364        return JSValue::encode(jsUndefined());
     
    33783378        return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces");
    33793379    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3380     TestObj& impl = castedThis->impl();
    3381     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     3380    auto& impl = castedThis->impl();
     3381    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    33823382    if (!scriptContext)
    33833383        return JSValue::encode(jsUndefined());
     
    33953395        return throwThisTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStack");
    33963396    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3397     TestObj& impl = castedThis->impl();
     3397    auto& impl = castedThis->impl();
    33983398    RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(exec, 0));
    33993399    impl.withScriptArgumentsAndCallStack(scriptArguments.release());
     
    34083408        return throwThisTypeError(*exec, "TestObj", "methodWithOptionalArg");
    34093409    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3410     TestObj& impl = castedThis->impl();
     3410    auto& impl = castedThis->impl();
    34113411
    34123412    size_t argsCount = exec->argumentCount();
     
    34303430        return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndOptionalArg");
    34313431    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3432     TestObj& impl = castedThis->impl();
     3432    auto& impl = castedThis->impl();
    34333433    if (UNLIKELY(exec->argumentCount() < 1))
    34343434        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    34573457        return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs");
    34583458    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3459     TestObj& impl = castedThis->impl();
     3459    auto& impl = castedThis->impl();
    34603460    if (UNLIKELY(exec->argumentCount() < 1))
    34613461        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    34923492        return throwThisTypeError(*exec, "TestObj", "methodWithOptionalString");
    34933493    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3494     TestObj& impl = castedThis->impl();
     3494    auto& impl = castedThis->impl();
    34953495
    34963496    size_t argsCount = exec->argumentCount();
     
    35143514        return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsUndefined");
    35153515    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3516     TestObj& impl = castedThis->impl();
     3516    auto& impl = castedThis->impl();
    35173517    const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
    35183518    if (UNLIKELY(exec->hadException()))
     
    35293529        return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsNullString");
    35303530    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3531     TestObj& impl = castedThis->impl();
     3531    auto& impl = castedThis->impl();
    35323532    const String& str(argumentOrNull(exec, 0).isEmpty() ? String() : argumentOrNull(exec, 0).toString(exec)->value(exec));
    35333533    if (UNLIKELY(exec->hadException()))
     
    35443544        return throwThisTypeError(*exec, "TestObj", "methodWithCallbackArg");
    35453545    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3546     TestObj& impl = castedThis->impl();
     3546    auto& impl = castedThis->impl();
    35473547    if (UNLIKELY(exec->argumentCount() < 1))
    35483548        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    35613561        return throwThisTypeError(*exec, "TestObj", "methodWithNonCallbackArgAndCallbackArg");
    35623562    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3563     TestObj& impl = castedThis->impl();
     3563    auto& impl = castedThis->impl();
    35643564    if (UNLIKELY(exec->argumentCount() < 2))
    35653565        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    35813581        return throwThisTypeError(*exec, "TestObj", "methodWithCallbackAndOptionalArg");
    35823582    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3583     TestObj& impl = castedThis->impl();
     3583    auto& impl = castedThis->impl();
    35843584    RefPtr<TestCallback> callback;
    35853585    if (!exec->argument(0).isUndefinedOrNull()) {
     
    36233623        return throwThisTypeError(*exec, "TestObj", "conditionalMethod1");
    36243624    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3625     TestObj& impl = castedThis->impl();
     3625    auto& impl = castedThis->impl();
    36263626    JSValue result = jsStringWithCache(exec, impl.conditionalMethod1());
    36273627    return JSValue::encode(result);
     
    36383638        return throwThisTypeError(*exec, "TestObj", "conditionalMethod2");
    36393639    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3640     TestObj& impl = castedThis->impl();
     3640    auto& impl = castedThis->impl();
    36413641    impl.conditionalMethod2();
    36423642    return JSValue::encode(jsUndefined());
     
    36533653        return throwThisTypeError(*exec, "TestObj", "conditionalMethod3");
    36543654    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3655     TestObj& impl = castedThis->impl();
     3655    auto& impl = castedThis->impl();
    36563656    impl.conditionalMethod3();
    36573657    return JSValue::encode(jsUndefined());
     
    36673667        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    36683668    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3669     TestObj& impl = castedThis->impl();
     3669    auto& impl = castedThis->impl();
    36703670    if (UNLIKELY(exec->argumentCount() < 2))
    36713671        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    36873687        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    36883688    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3689     TestObj& impl = castedThis->impl();
     3689    auto& impl = castedThis->impl();
    36903690    if (UNLIKELY(exec->argumentCount() < 1))
    36913691        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37143714        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    37153715    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3716     TestObj& impl = castedThis->impl();
     3716    auto& impl = castedThis->impl();
    37173717    if (UNLIKELY(exec->argumentCount() < 1))
    37183718        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37313731        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    37323732    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3733     TestObj& impl = castedThis->impl();
     3733    auto& impl = castedThis->impl();
    37343734    if (UNLIKELY(exec->argumentCount() < 1))
    37353735        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37483748        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    37493749    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3750     TestObj& impl = castedThis->impl();
     3750    auto& impl = castedThis->impl();
    37513751    if (UNLIKELY(exec->argumentCount() < 1))
    37523752        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37653765        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    37663766    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3767     TestObj& impl = castedThis->impl();
     3767    auto& impl = castedThis->impl();
    37683768    if (UNLIKELY(exec->argumentCount() < 1))
    37693769        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37823782        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    37833783    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3784     TestObj& impl = castedThis->impl();
     3784    auto& impl = castedThis->impl();
    37853785    if (UNLIKELY(exec->argumentCount() < 1))
    37863786        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    37993799        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    38003800    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3801     TestObj& impl = castedThis->impl();
     3801    auto& impl = castedThis->impl();
    38023802    if (UNLIKELY(exec->argumentCount() < 1))
    38033803        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    38163816        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    38173817    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3818     TestObj& impl = castedThis->impl();
     3818    auto& impl = castedThis->impl();
    38193819    if (UNLIKELY(exec->argumentCount() < 1))
    38203820        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    38333833        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    38343834    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3835     TestObj& impl = castedThis->impl();
     3835    auto& impl = castedThis->impl();
    38363836    if (UNLIKELY(exec->argumentCount() < 1))
    38373837        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    38503850        return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
    38513851    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3852     TestObj& impl = castedThis->impl();
     3852    auto& impl = castedThis->impl();
    38533853    if (UNLIKELY(exec->argumentCount() < 1))
    38543854        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    39753975        return throwThisTypeError(*exec, "TestObj", "classMethodWithClamp");
    39763976    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    3977     TestObj& impl = castedThis->impl();
     3977    auto& impl = castedThis->impl();
    39783978    if (UNLIKELY(exec->argumentCount() < 2))
    39793979        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    40054005        return throwThisTypeError(*exec, "TestObj", "methodWithUnsignedLongSequence");
    40064006    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4007     TestObj& impl = castedThis->impl();
     4007    auto& impl = castedThis->impl();
    40084008    if (UNLIKELY(exec->argumentCount() < 1))
    40094009        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    40224022        return throwThisTypeError(*exec, "TestObj", "stringArrayFunction");
    40234023    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4024     TestObj& impl = castedThis->impl();
     4024    auto& impl = castedThis->impl();
    40254025    if (UNLIKELY(exec->argumentCount() < 1))
    40264026        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    40424042        return throwThisTypeError(*exec, "TestObj", "domStringListFunction");
    40434043    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4044     TestObj& impl = castedThis->impl();
     4044    auto& impl = castedThis->impl();
    40454045    if (UNLIKELY(exec->argumentCount() < 1))
    40464046        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    40624062        return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence");
    40634063    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4064     TestObj& impl = castedThis->impl();
     4064    auto& impl = castedThis->impl();
    40654065    if (UNLIKELY(exec->argumentCount() < 2))
    40664066        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    40824082        return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence2");
    40834083    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4084     TestObj& impl = castedThis->impl();
     4084    auto& impl = castedThis->impl();
    40854085    if (UNLIKELY(exec->argumentCount() < 2))
    40864086        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    41024102        return throwThisTypeError(*exec, "TestObj", "getSVGDocument");
    41034103    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4104     TestObj& impl = castedThis->impl();
     4104    auto& impl = castedThis->impl();
    41054105    ExceptionCode ec = 0;
    41064106    if (!shouldAllowAccessToNode(exec, impl.getSVGDocument(ec)))
     
    41194119        return throwThisTypeError(*exec, "TestObj", "convert1");
    41204120    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4121     TestObj& impl = castedThis->impl();
     4121    auto& impl = castedThis->impl();
    41224122    if (UNLIKELY(exec->argumentCount() < 1))
    41234123        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    41364136        return throwThisTypeError(*exec, "TestObj", "convert2");
    41374137    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4138     TestObj& impl = castedThis->impl();
     4138    auto& impl = castedThis->impl();
    41394139    if (UNLIKELY(exec->argumentCount() < 1))
    41404140        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    41534153        return throwThisTypeError(*exec, "TestObj", "convert4");
    41544154    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4155     TestObj& impl = castedThis->impl();
     4155    auto& impl = castedThis->impl();
    41564156    if (UNLIKELY(exec->argumentCount() < 1))
    41574157        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    41704170        return throwThisTypeError(*exec, "TestObj", "convert5");
    41714171    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4172     TestObj& impl = castedThis->impl();
     4172    auto& impl = castedThis->impl();
    41734173    if (UNLIKELY(exec->argumentCount() < 1))
    41744174        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    41874187        return throwThisTypeError(*exec, "TestObj", "mutablePointFunction");
    41884188    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4189     TestObj& impl = castedThis->impl();
     4189    auto& impl = castedThis->impl();
    41904190    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())));
    41914191    return JSValue::encode(result);
     
    41994199        return throwThisTypeError(*exec, "TestObj", "immutablePointFunction");
    42004200    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4201     TestObj& impl = castedThis->impl();
     4201    auto& impl = castedThis->impl();
    42024202    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
    42034203    return JSValue::encode(result);
     
    42114211        return throwThisTypeError(*exec, "TestObj", "orange");
    42124212    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4213     TestObj& impl = castedThis->impl();
     4213    auto& impl = castedThis->impl();
    42144214    impl.banana();
    42154215    return JSValue::encode(jsUndefined());
     
    42234223        return throwThisTypeError(*exec, "TestObj", "strictFunction");
    42244224    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4225     TestObj& impl = castedThis->impl();
     4225    auto& impl = castedThis->impl();
    42264226    if (UNLIKELY(exec->argumentCount() < 3))
    42274227        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    42494249        return throwThisTypeError(*exec, "TestObj", "strictFunctionWithSequence");
    42504250    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4251     TestObj& impl = castedThis->impl();
     4251    auto& impl = castedThis->impl();
    42524252    if (UNLIKELY(exec->argumentCount() < 2))
    42534253        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    42744274        return throwThisTypeError(*exec, "TestObj", "strictFunctionWithArray");
    42754275    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4276     TestObj& impl = castedThis->impl();
     4276    auto& impl = castedThis->impl();
    42774277    if (UNLIKELY(exec->argumentCount() < 2))
    42784278        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    42994299        return throwThisTypeError(*exec, "TestObj", "variadicStringMethod");
    43004300    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4301     TestObj& impl = castedThis->impl();
     4301    auto& impl = castedThis->impl();
    43024302    if (UNLIKELY(exec->argumentCount() < 1))
    43034303        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    43194319        return throwThisTypeError(*exec, "TestObj", "variadicDoubleMethod");
    43204320    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4321     TestObj& impl = castedThis->impl();
     4321    auto& impl = castedThis->impl();
    43224322    if (UNLIKELY(exec->argumentCount() < 1))
    43234323        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    43394339        return throwThisTypeError(*exec, "TestObj", "variadicNodeMethod");
    43404340    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4341     TestObj& impl = castedThis->impl();
     4341    auto& impl = castedThis->impl();
    43424342    if (UNLIKELY(exec->argumentCount() < 1))
    43434343        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    43624362        return throwThisTypeError(*exec, "TestObj", "any");
    43634363    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4364     TestObj& impl = castedThis->impl();
     4364    auto& impl = castedThis->impl();
    43654365    if (UNLIKELY(exec->argumentCount() < 2))
    43664366        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    43774377void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
    43784378{
    4379     JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
     4379    auto* thisObject = jsCast<JSTestObj*>(cell);
    43804380    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    43814381    Base::visitChildren(thisObject, visitor);
     
    43934393void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    43944394{
    4395     JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.slot()->asCell());
    4396     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     4395    auto* jsTestObj = jsCast<JSTestObj*>(handle.slot()->asCell());
     4396    auto& world = *static_cast<DOMWrapperWorld*>(context);
    43974397    uncacheWrapper(world, &jsTestObj->impl(), jsTestObj);
    43984398    jsTestObj->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r181024 r181156  
    9292EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1(ExecState* exec)
    9393{
    94     JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     94    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
    9595    if (UNLIKELY(exec->argumentCount() < 1))
    9696        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    104104EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2(ExecState* exec)
    105105{
    106     JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     106    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
    107107    if (UNLIKELY(exec->argumentCount() < 1))
    108108        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    116116EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3(ExecState* exec)
    117117{
    118     JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     118    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
    119119    if (UNLIKELY(exec->argumentCount() < 1))
    120120        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    128128EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4(ExecState* exec)
    129129{
    130     JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     130    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
    131131    if (UNLIKELY(exec->argumentCount() < 1))
    132132        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    242242void JSTestOverloadedConstructorsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    243243{
    244     JSTestOverloadedConstructors* jsTestOverloadedConstructors = jsCast<JSTestOverloadedConstructors*>(handle.slot()->asCell());
    245     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     244    auto* jsTestOverloadedConstructors = jsCast<JSTestOverloadedConstructors*>(handle.slot()->asCell());
     245    auto& world = *static_cast<DOMWrapperWorld*>(context);
    246246    uncacheWrapper(world, &jsTestOverloadedConstructors->impl(), jsTestOverloadedConstructors);
    247247    jsTestOverloadedConstructors->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r181024 r181156  
    170170        return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "value");
    171171    }
    172     TestSerializedScriptValueInterface& impl = castedThis->impl();
     172    auto& impl = castedThis->impl();
    173173    JSValue result = impl.value() ? impl.value()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    174174    return JSValue::encode(result);
     
    187187        return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "readonlyValue");
    188188    }
    189     TestSerializedScriptValueInterface& impl = castedThis->impl();
     189    auto& impl = castedThis->impl();
    190190    JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    191191    return JSValue::encode(result);
     
    206206    if (JSValue cachedValue = castedThis->m_cachedValue.get())
    207207        return JSValue::encode(cachedValue);
    208     TestSerializedScriptValueInterface& impl = castedThis->impl();
     208    auto& impl = castedThis->impl();
    209209    JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    210210    castedThis->m_cachedValue.set(exec->vm(), castedThis, result);
     
    224224        return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "ports");
    225225    }
    226     TestSerializedScriptValueInterface& impl = castedThis->impl();
     226    auto& impl = castedThis->impl();
    227227    JSValue result = jsArray(exec, castedThis->globalObject(), impl.ports());
    228228    return JSValue::encode(result);
     
    243243    if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
    244244        return JSValue::encode(cachedValue);
    245     TestSerializedScriptValueInterface& impl = castedThis->impl();
     245    auto& impl = castedThis->impl();
    246246    JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    247247    castedThis->m_cachedReadonlyValue.set(exec->vm(), castedThis, result);
     
    270270        return;
    271271    }
    272     TestSerializedScriptValueInterface& impl = castedThis->impl();
     272    auto& impl = castedThis->impl();
    273273    RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
    274274    if (UNLIKELY(exec->hadException()))
     
    290290        return;
    291291    }
    292     TestSerializedScriptValueInterface& impl = castedThis->impl();
     292    auto& impl = castedThis->impl();
    293293    RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
    294294    if (UNLIKELY(exec->hadException()))
     
    305305void JSTestSerializedScriptValueInterface::visitChildren(JSCell* cell, SlotVisitor& visitor)
    306306{
    307     JSTestSerializedScriptValueInterface* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell);
     307    auto* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell);
    308308    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    309309    Base::visitChildren(thisObject, visitor);
     
    321321void JSTestSerializedScriptValueInterfaceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    322322{
    323     JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface = jsCast<JSTestSerializedScriptValueInterface*>(handle.slot()->asCell());
    324     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     323    auto* jsTestSerializedScriptValueInterface = jsCast<JSTestSerializedScriptValueInterface*>(handle.slot()->asCell());
     324    auto& world = *static_cast<DOMWrapperWorld*>(context);
    325325    uncacheWrapper(world, &jsTestSerializedScriptValueInterface->impl(), jsTestSerializedScriptValueInterface);
    326326    jsTestSerializedScriptValueInterface->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r181024 r181156  
    147147EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::constructJSTestTypedefs(ExecState* exec)
    148148{
    149     JSTestTypedefsConstructor* castedThis = jsCast<JSTestTypedefsConstructor*>(exec->callee());
     149    auto* castedThis = jsCast<JSTestTypedefsConstructor*>(exec->callee());
    150150    if (UNLIKELY(exec->argumentCount() < 2))
    151151        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    244244bool JSTestTypedefs::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    245245{
    246     JSTestTypedefs* thisObject = jsCast<JSTestTypedefs*>(object);
     246    auto* thisObject = jsCast<JSTestTypedefs*>(object);
    247247    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    248248    return getStaticValueSlot<JSTestTypedefs, Base>(exec, JSTestTypedefsTable, thisObject, propertyName, slot);
     
    260260        return throwGetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr");
    261261    }
    262     TestTypedefs& impl = castedThis->impl();
     262    auto& impl = castedThis->impl();
    263263    JSValue result = jsNumber(impl.unsignedLongLongAttr());
    264264    return JSValue::encode(result);
     
    277277        return throwGetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
    278278    }
    279     TestTypedefs& impl = castedThis->impl();
     279    auto& impl = castedThis->impl();
    280280    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    281281    return JSValue::encode(result);
     
    288288    UNUSED_PARAM(slotBase);
    289289    UNUSED_PARAM(thisValue);
    290     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(slotBase);
     290    auto* castedThis = jsCast<JSTestTypedefs*>(slotBase);
    291291    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
    292292}
     
    305305    }
    306306    ExceptionCode ec = 0;
    307     TestTypedefs& impl = castedThis->impl();
     307    auto& impl = castedThis->impl();
    308308    JSValue result = jsNumber(impl.attrWithGetterException(ec));
    309309    setDOMException(exec, ec);
     
    323323        return throwGetterTypeError(*exec, "TestTypedefs", "attrWithSetterException");
    324324    }
    325     TestTypedefs& impl = castedThis->impl();
     325    auto& impl = castedThis->impl();
    326326    JSValue result = jsNumber(impl.attrWithSetterException());
    327327    return JSValue::encode(result);
     
    341341    }
    342342    ExceptionCode ec = 0;
    343     TestTypedefs& impl = castedThis->impl();
     343    auto& impl = castedThis->impl();
    344344    JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
    345345    setDOMException(exec, ec);
     
    359359        return throwGetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException");
    360360    }
    361     TestTypedefs& impl = castedThis->impl();
     361    auto& impl = castedThis->impl();
    362362    JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
    363363    return JSValue::encode(result);
     
    385385        return;
    386386    }
    387     TestTypedefs& impl = castedThis->impl();
     387    auto& impl = castedThis->impl();
    388388    unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
    389389    if (UNLIKELY(exec->hadException()))
     
    405405        return;
    406406    }
    407     TestTypedefs& impl = castedThis->impl();
     407    auto& impl = castedThis->impl();
    408408    RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
    409409    if (UNLIKELY(exec->hadException()))
     
    425425        return;
    426426    }
    427     TestTypedefs& impl = castedThis->impl();
     427    auto& impl = castedThis->impl();
    428428    int nativeValue(toInt32(exec, value, NormalConversion));
    429429    if (UNLIKELY(exec->hadException()))
     
    445445        return;
    446446    }
    447     TestTypedefs& impl = castedThis->impl();
     447    auto& impl = castedThis->impl();
    448448    ExceptionCode ec = 0;
    449449    int nativeValue(toInt32(exec, value, NormalConversion));
     
    467467        return;
    468468    }
    469     TestTypedefs& impl = castedThis->impl();
     469    auto& impl = castedThis->impl();
    470470    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    471471    if (UNLIKELY(exec->hadException()))
     
    487487        return;
    488488    }
    489     TestTypedefs& impl = castedThis->impl();
     489    auto& impl = castedThis->impl();
    490490    ExceptionCode ec = 0;
    491491    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     
    509509        return throwThisTypeError(*exec, "TestTypedefs", "func");
    510510    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    511     TestTypedefs& impl = castedThis->impl();
     511    auto& impl = castedThis->impl();
    512512
    513513    size_t argsCount = exec->argumentCount();
     
    531531        return throwThisTypeError(*exec, "TestTypedefs", "setShadow");
    532532    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    533     TestTypedefs& impl = castedThis->impl();
     533    auto& impl = castedThis->impl();
    534534    if (UNLIKELY(exec->argumentCount() < 3))
    535535        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    572572        return throwThisTypeError(*exec, "TestTypedefs", "methodWithSequenceArg");
    573573    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    574     TestTypedefs& impl = castedThis->impl();
     574    auto& impl = castedThis->impl();
    575575    if (UNLIKELY(exec->argumentCount() < 1))
    576576        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    589589        return throwThisTypeError(*exec, "TestTypedefs", "nullableArrayArg");
    590590    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    591     TestTypedefs& impl = castedThis->impl();
     591    auto& impl = castedThis->impl();
    592592    if (UNLIKELY(exec->argumentCount() < 1))
    593593        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    606606        return throwThisTypeError(*exec, "TestTypedefs", "funcWithClamp");
    607607    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    608     TestTypedefs& impl = castedThis->impl();
     608    auto& impl = castedThis->impl();
    609609    if (UNLIKELY(exec->argumentCount() < 1))
    610610        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    643643        return throwThisTypeError(*exec, "TestTypedefs", "immutablePointFunction");
    644644    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    645     TestTypedefs& impl = castedThis->impl();
     645    auto& impl = castedThis->impl();
    646646    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
    647647    return JSValue::encode(result);
     
    655655        return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction");
    656656    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    657     TestTypedefs& impl = castedThis->impl();
     657    auto& impl = castedThis->impl();
    658658    if (UNLIKELY(exec->argumentCount() < 1))
    659659        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    675675        return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction2");
    676676    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    677     TestTypedefs& impl = castedThis->impl();
     677    auto& impl = castedThis->impl();
    678678    if (UNLIKELY(exec->argumentCount() < 1))
    679679        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    695695        return throwThisTypeError(*exec, "TestTypedefs", "callWithSequenceThatRequiresInclude");
    696696    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    697     TestTypedefs& impl = castedThis->impl();
     697    auto& impl = castedThis->impl();
    698698    if (UNLIKELY(exec->argumentCount() < 1))
    699699        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     
    712712        return throwThisTypeError(*exec, "TestTypedefs", "methodWithException");
    713713    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    714     TestTypedefs& impl = castedThis->impl();
     714    auto& impl = castedThis->impl();
    715715    ExceptionCode ec = 0;
    716716    impl.methodWithException(ec);
     
    728728void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    729729{
    730     JSTestTypedefs* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.slot()->asCell());
    731     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     730    auto* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.slot()->asCell());
     731    auto& world = *static_cast<DOMWrapperWorld*>(context);
    732732    uncacheWrapper(world, &jsTestTypedefs->impl(), jsTestTypedefs);
    733733    jsTestTypedefs->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp

    r181024 r181156  
    155155        return throwGetterTypeError(*exec, "attribute", "readonly");
    156156    }
    157     attribute& impl = castedThis->impl();
     157    auto& impl = castedThis->impl();
    158158    JSValue result = jsStringWithCache(exec, impl.readonly());
    159159    return JSValue::encode(result);
     
    183183void JSattributeOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    184184{
    185     JSattribute* jsattribute = jsCast<JSattribute*>(handle.slot()->asCell());
    186     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     185    auto* jsattribute = jsCast<JSattribute*>(handle.slot()->asCell());
     186    auto& world = *static_cast<DOMWrapperWorld*>(context);
    187187    uncacheWrapper(world, &jsattribute->impl(), jsattribute);
    188188    jsattribute->releaseImpl();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp

    r181024 r181156  
    161161void JSreadonlyOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    162162{
    163     JSreadonly* jsreadonly = jsCast<JSreadonly*>(handle.slot()->asCell());
    164     DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
     163    auto* jsreadonly = jsCast<JSreadonly*>(handle.slot()->asCell());
     164    auto& world = *static_cast<DOMWrapperWorld*>(context);
    165165    uncacheWrapper(world, &jsreadonly->impl(), jsreadonly);
    166166    jsreadonly->releaseImpl();
  • trunk/Source/WebCore/dom/MessagePort.cpp

    r174225 r181156  
    225225}
    226226
     227bool MessagePort::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
     228{
     229    if (listener && listener->isAttribute() && eventType == eventNames().messageEvent)
     230        start();
     231    return EventTargetWithInlineData::addEventListener(eventType, listener, useCapture);
     232}
     233
    227234} // namespace WebCore
  • trunk/Source/WebCore/dom/MessagePort.h

    r175148 r181156  
    8686        {
    8787            setAttributeEventListener(eventNames().messageEvent, listener);
    88             start();
    8988        }
    9089        EventListener* onmessage() { return getAttributeEventListener(eventNames().messageEvent); }
     
    10099        // A port gets neutered when it is transferred to a new owner via postMessage().
    101100        bool isNeutered() { return !m_entangledChannel; }
     101
     102        bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
    102103
    103104    private:
Note: See TracChangeset for help on using the changeset viewer.