Make JavaScript binding get and set legacy event listener attributes directly
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 16:30:23 +0000 (16:30 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 16:30:23 +0000 (16:30 +0000)
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h
Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp
Source/WebCore/Modules/webaudio/ScriptProcessorNode.h
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSEventListener.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
Source/WebCore/dom/MessagePort.cpp
Source/WebCore/dom/MessagePort.h

index dcd47b3d623a5e0553b7446ce50968ffb4ff3573..615167243307b78caa662f0bf0fe3bcc3eb2ec03 100644 (file)
@@ -1,3 +1,80 @@
+2015-03-05  Darin Adler  <darin@apple.com>
+
+        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.
+
 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [iOS] SVG fonts are garbled
index f37199ff838199edd394e78acd72671732bab045..4c1207129a2023d5f293e16100153ac6ae781d42 100644 (file)
@@ -198,7 +198,6 @@ void AudioScheduledSourceNode::noteOff(double when, ExceptionCode& ec)
 
 void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener)
 {
-    m_hasEndedListener = listener;
     setAttributeEventListener(eventNames().endedEvent, listener);
 }
 
@@ -231,6 +230,28 @@ void AudioScheduledSourceNode::notifyEnded()
     listener->handleEvent(context()->scriptExecutionContext(), event.get());
 }
 
+bool AudioScheduledSourceNode::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+{
+    bool success = AudioNode::addEventListener(eventType, listener, useCapture);
+    if (success && eventType == eventNames().endedEvent)
+        m_hasEndedListener = hasEventListeners(eventNames().endedEvent);
+    return success;
+}
+
+bool AudioScheduledSourceNode::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
+{
+    bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
+    if (success && eventType == eventNames().endedEvent)
+        m_hasEndedListener = hasEventListeners(eventNames().endedEvent);
+    return success;
+}
+
+void AudioScheduledSourceNode::removeAllEventListeners()
+{
+    m_hasEndedListener = false;
+    AudioNode::removeAllEventListeners();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(WEB_AUDIO)
index 25709aab1edc0d1e68e1107c7c15cc259ee32f40..914e48919cb78e52202b897a8a984587f34075cb 100644 (file)
@@ -107,6 +107,11 @@ protected:
     bool m_hasEndedListener;
 
     static const double UnknownTime;
+
+private:
+    bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
+    bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) override;
+    void removeAllEventListeners() override;
 };
 
 } // namespace WebCore
index 94ce690788066c34755132f9911784ece7b2d704..fb34697530a89b1375ba99900c4962c88b04f2ef 100644 (file)
@@ -219,7 +219,6 @@ void ScriptProcessorNode::process(size_t framesToProcess)
 
 void ScriptProcessorNode::setOnaudioprocess(PassRefPtr<EventListener> listener)
 {
-    m_hasAudioProcessListener = listener;
     setAttributeEventListener(eventNames().audioprocessEvent, listener);
 }
 
@@ -286,6 +285,28 @@ double ScriptProcessorNode::latencyTime() const
     return std::numeric_limits<double>::infinity();
 }
 
+bool ScriptProcessorNode::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+{
+    bool success = AudioNode::addEventListener(eventType, listener, useCapture);
+    if (success && eventType == eventNames().audioprocessEvent)
+        m_hasAudioProcessListener = hasEventListeners(eventNames().audioprocessEvent);
+    return success;
+}
+
+bool ScriptProcessorNode::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
+{
+    bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
+    if (success && eventType == eventNames().audioprocessEvent)
+        m_hasAudioProcessListener = hasEventListeners(eventNames().audioprocessEvent);
+    return success;
+}
+
+void ScriptProcessorNode::removeAllEventListeners()
+{
+    m_hasAudioProcessListener = false;
+    AudioNode::removeAllEventListeners();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(WEB_AUDIO)
index 15bb27b29f3e6593f23517a530bcedc861e067f5..3f02bfb55f3cbbe37c320cc34734c93b1f246363 100644 (file)
@@ -77,6 +77,10 @@ private:
     static void fireProcessEventDispatch(void* userData);
     void fireProcessEvent();
 
+    bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
+    bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) override;
+    void removeAllEventListeners() override;
+
     // Double buffering
     unsigned doubleBufferIndex() const { return m_doubleBufferIndex; }
     void swapBuffers() { m_doubleBufferIndex = 1 - m_doubleBufferIndex; }
index a2cf268dd664f66ab8fc6a7d064bd2c0d07c1f88..959b2366743d79f63b0aac1bac812bd1bfd548cb 100644 (file)
@@ -23,6 +23,7 @@
 #include "BeforeUnloadEvent.h"
 #include "Event.h"
 #include "Frame.h"
+#include "HTMLElement.h"
 #include "JSEvent.h"
 #include "JSEventTarget.h"
 #include "JSMainThreadExecState.h"
@@ -170,4 +171,49 @@ Ref<JSEventListener> createJSEventListenerForAdd(JSC::ExecState& state, JSC::JSO
     return JSEventListener::create(&listener, &wrapper, false, currentWorld(&state));
 }
 
+static inline JSC::JSValue eventHandlerAttribute(EventListener* abstractListener, ScriptExecutionContext& context)
+{
+    if (!abstractListener)
+        return jsNull();
+
+    auto* listener = JSEventListener::cast(abstractListener);
+    if (!listener)
+        return jsNull();
+
+    auto* function = listener->jsFunction(&context);
+    if (!function)
+        return jsNull();
+
+    return function;
+}
+
+static inline RefPtr<JSEventListener> createEventListenerForEventHandlerAttribute(JSC::ExecState& state, JSC::JSValue listener, JSC::JSObject& wrapper)
+{
+    if (!listener.isObject())
+        return nullptr;
+    return JSEventListener::create(asObject(listener), &wrapper, true, currentWorld(&state));
+}
+
+JSC::JSValue eventHandlerAttribute(EventTarget& target, const AtomicString& eventType)
+{
+    return eventHandlerAttribute(target.getAttributeEventListener(eventType), *target.scriptExecutionContext());
+}
+
+void setEventHandlerAttribute(JSC::ExecState& state, JSC::JSObject& wrapper, EventTarget& target, const AtomicString& eventType, JSC::JSValue value)
+{
+    target.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, wrapper));
+}
+
+JSC::JSValue windowForwardedEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType)
+{
+    auto& document = element.document();
+    return eventHandlerAttribute(document.getWindowAttributeEventListener(eventType), document);
+}
+
+void setWindowForwardedEventHandlerAttribute(JSC::ExecState& state, JSC::JSObject& wrapper, HTMLElement& element, const AtomicString& eventType, JSC::JSValue value)
+{
+    ASSERT(wrapper.globalObject());
+    element.document().setWindowAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *wrapper.globalObject()));
+}
+
 } // namespace WebCore
index 1bcb96eef1fa001186cd8cd60743651f6e9d8fcc..ce3f923d7826a4e3be5179746c875c736e9a438c 100644 (file)
@@ -29,6 +29,8 @@
 
 namespace WebCore {
 
+    class EventTarget;
+    class HTMLElement;
     class JSDOMGlobalObject;
 
     class JSEventListener : public EventListener {
@@ -75,8 +77,13 @@ namespace WebCore {
         RefPtr<DOMWrapperWorld> m_isolatedWorld;
     };
 
-    // For "onXXX" event attributes.
-    RefPtr<JSEventListener> createJSEventListenerForAttribute(JSC::ExecState&, JSC::JSValue listener, JSC::JSObject& wrapper);
+    // For "onxxx" attributes that automatically set up JavaScript event listeners.
+    JSC::JSValue eventHandlerAttribute(EventTarget&, const AtomicString& eventType);
+    void setEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, EventTarget&, const AtomicString& eventType, JSC::JSValue);
+
+    // Like the functions above, but for attributes that forward event handlers to the window object rather than setting them on the target.
+    JSC::JSValue windowForwardedEventHandlerAttribute(HTMLElement&, const AtomicString& eventType);
+    void setWindowForwardedEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, HTMLElement&, const AtomicString& eventType, JSC::JSValue);
 
     Ref<JSEventListener> createJSEventListenerForAdd(JSC::ExecState&, JSC::JSObject& listener, JSC::JSObject& wrapper);
     Ref<JSEventListener> createJSEventListenerForRemove(JSC::ExecState&, JSC::JSObject& listener, JSC::JSObject& wrapper);
@@ -112,13 +119,6 @@ namespace WebCore {
         return m_jsFunction.get();
     }
 
-    inline RefPtr<JSEventListener> createJSEventListenerForAttribute(JSC::ExecState& state, JSC::JSValue listener, JSC::JSObject& wrapper)
-    {
-        if (!listener.isObject())
-            return nullptr;
-        return JSEventListener::create(asObject(listener), &wrapper, true, currentWorld(&state));
-    }
-
     inline Ref<JSEventListener> createJSEventListenerForRemove(JSC::ExecState& state, JSC::JSObject& listener, JSC::JSObject& wrapper)
     {
         return createJSEventListenerForAdd(state, listener, wrapper);
index ffcfd967b1ad5f9e0959a1d1463001e3deca9aa6..38f5076a78e2339bca7c2a16b54b695704cf3bfe 100644 (file)
@@ -140,16 +140,24 @@ sub GenerateInterface
     }
 }
 
-sub GenerateAttributeEventListenerCall
+sub EventHandlerAttributeEventName
 {
-    my $implSetterFunctionName = shift;
-    my $windowEventListener = shift;
+    my $attribute = shift;
 
-    my $wrapperObject = $windowEventListener ? "globalObject" : "castedThis";
-    my @GenerateEventListenerImpl = ();
+    # Remove the "on" prefix.
+    my $eventType = substr($attribute->signature->name, 2);
 
-    push(@GenerateEventListenerImpl, "    impl.set$implSetterFunctionName(createJSEventListenerForAttribute(*exec, value, *$wrapperObject));\n");
-    return @GenerateEventListenerImpl;
+    # FIXME: Consider adding a property in the IDL file instead of hard coding these names.
+
+    $eventType = "show" if $eventType eq "display";
+
+    # Note: These four names exist in HTMLElement.cpp.
+    $eventType = "webkitAnimationEnd" if $eventType eq "webkitanimationend";
+    $eventType = "webkitAnimationIteration" if $eventType eq "webkitanimationiteration";
+    $eventType = "webkitAnimationStart" if $eventType eq "webkitanimationstart";
+    $eventType = "webkitTransitionEnd" if $eventType eq "webkittransitionend";
+
+    return "eventNames().${eventType}Event";
 }
 
 sub GenerateEventListenerCall
@@ -1969,7 +1977,7 @@ sub GenerateImplementation
             push(@implContent, "{\n");
             push(@implContent, "    VM& vm = exec->vm();\n");
             push(@implContent, "    UNUSED_PARAM(vm);\n");
-            push(@implContent, "    ${className}Prototype* thisObject = jsCast<${className}Prototype*>(object);\n");
+            push(@implContent, "    auto* thisObject = jsCast<${className}Prototype*>(object);\n");
 
             if ($numConstants eq 0 && $numFunctions eq 0 && $numPrototypeAttributes eq 0) {
                 push(@implContent, "    return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);\n");        
@@ -2012,7 +2020,7 @@ sub GenerateImplementation
     if ($interface->extendedAttributes->{"JSCustomNamedGetterOnPrototype"}) {
         push(@implContent, "void ${className}Prototype::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    ${className}Prototype* thisObject = jsCast<${className}Prototype*>(cell);\n");
+        push(@implContent, "    auto* thisObject = jsCast<${className}Prototype*>(cell);\n");
         push(@implContent, "    if (thisObject->putDelegate(exec, propertyName, value, slot))\n");
         push(@implContent, "        return;\n");
         push(@implContent, "    Base::put(thisObject, exec, propertyName, value, slot);\n");
@@ -2106,7 +2114,7 @@ sub GenerateImplementation
         if (!$interface->extendedAttributes->{"CustomGetOwnPropertySlot"}) {
             push(@implContent, "bool ${className}::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)\n");
             push(@implContent, "{\n");
-            push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
+            push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
             push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
             push(@implContent, GenerateGetOwnPropertySlotBody($interface, $interfaceName, $className, $numInstanceAttributes > 0, 0));
             push(@implContent, "}\n\n");
@@ -2117,7 +2125,7 @@ sub GenerateImplementation
                 || $interface->extendedAttributes->{"JSCustomGetOwnPropertySlotAndDescriptor"}) {
             push(@implContent, "bool ${className}::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)\n");
             push(@implContent, "{\n");
-            push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
+            push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
             push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
 
             # Sink the int-to-string conversion that happens when we create a PropertyName
@@ -2190,9 +2198,9 @@ sub GenerateImplementation
             push(@implContent, "    UNUSED_PARAM(thisValue);\n");
             if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
                 if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) {
-                    push(@implContent, "    ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n");
+                    push(@implContent, "    auto* castedThis = to${className}(JSValue::decode(thisValue));\n");
                 } elsif (AttributeShouldBeOnInstance($interface, $attribute)) {
-                    push(@implContent, "    ${className}* castedThis = jsCast<JS${interfaceName}*>(slotBase);\n");
+                    push(@implContent, "    auto* castedThis = jsCast<JS${interfaceName}*>(slotBase);\n");
                     if (InterfaceRequiresAttributesOnInstanceForCompatibility($interface)) {
                         push(@implContent, "    ${className}* castedThisObject = " . GetCastingHelperForThisObject($interface) . "(JSValue::decode(thisValue));\n");
                         push(@implContent, "    if (UNLIKELY(!castedThisObject))\n");
@@ -2283,23 +2291,13 @@ sub GenerateImplementation
                 push(@implContent, "    return JSValue::encode(castedThis->$implGetterFunctionName(exec));\n");
             } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
                 $implIncludes{"JSDOMBinding.h"} = 1;
-                push(@implContent, "    $implType& impl = castedThis->impl();\n");
+                push(@implContent, "    auto& impl = castedThis->impl();\n");
                 push(@implContent, "    return JSValue::encode(shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
             } elsif ($type eq "EventListener") {
-                $implIncludes{"EventListener.h"} = 1;
+                my $getter = $attribute->signature->extendedAttributes->{"JSWindowEventListener"} ? "windowForwardedEventHandlerAttribute" : "eventHandlerAttribute";
+                my $eventName = EventHandlerAttributeEventName($attribute);
                 push(@implContent, "    UNUSED_PARAM(exec);\n");
-                push(@implContent, "    $implType& impl = castedThis->impl();\n");
-                push(@implContent, "    if (EventListener* listener = impl.$implGetterFunctionName()) {\n");
-                push(@implContent, "        if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {\n");
-                if ($interfaceName eq "Document" || $codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
-                    push(@implContent, "            if (JSObject* jsFunction = jsListener->jsFunction(&impl))\n");
-                } else {
-                    push(@implContent, "            if (JSObject* jsFunction = jsListener->jsFunction(impl.scriptExecutionContext()))\n");
-                }
-                push(@implContent, "                return JSValue::encode(jsFunction);\n");
-                push(@implContent, "        }\n");
-                push(@implContent, "    }\n");
-                push(@implContent, "    return JSValue::encode(jsNull());\n");
+                push(@implContent, "    return JSValue::encode($getter(castedThis->impl(), $eventName));\n");
             } elsif ($attribute->signature->type =~ /Constructor$/) {
                 my $constructorType = $attribute->signature->type;
                 $constructorType =~ s/Constructor$//;
@@ -2352,7 +2350,7 @@ sub GenerateImplementation
 
                     unshift(@arguments, @callWithArgs);
                     my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
-                    push(@implContent, "    $implType& impl = castedThis->impl();\n") if !$attribute->isStatic;
+                    push(@implContent, "    auto& impl = castedThis->impl();\n") if !$attribute->isStatic;
                     if ($codeGenerator->IsSVGAnimatedType($type)) {
                         push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
                         push(@implContent, "    JSValue result = toJS(exec, castedThis->globalObject(), obj.get());\n");
@@ -2381,7 +2379,7 @@ sub GenerateImplementation
                     push(@implContent, "    $svgPropertyOrListPropertyType impl(*castedThis->impl());\n");
                     push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
                 } else {
-                    push(@implContent, "    $implType& impl = castedThis->impl();\n");
+                    push(@implContent, "    auto& impl = castedThis->impl();\n");
                     push(@implContent, "    JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
                 }
 
@@ -2472,7 +2470,7 @@ sub GenerateImplementation
         if (!$interface->extendedAttributes->{"CustomPutFunction"}) {
             push(@implContent, "void ${className}::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
             push(@implContent, "{\n");
-            push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
+            push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
             push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
             if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
                 push(@implContent, "    unsigned index = propertyName.asIndex();\n");
@@ -2492,7 +2490,7 @@ sub GenerateImplementation
             if ($interface->extendedAttributes->{"CustomIndexedSetter"} || $interface->extendedAttributes->{"CustomNamedSetter"}) {
                 push(@implContent, "void ${className}::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow)\n");
                 push(@implContent, "{\n");
-                push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
+                push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
                 push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
 
                 if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
@@ -2548,7 +2546,7 @@ sub GenerateImplementation
                         push(@implContent, "    ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n");
                     } elsif (AttributeShouldBeOnInstance($interface, $attribute)) {
                         push(@implContent, "    UNUSED_PARAM(thisValue);\n");
-                        push(@implContent, "    ${className}* castedThis = jsCast<JS${interfaceName}*>(baseObject);\n");
+                        push(@implContent, "    auto* castedThis = jsCast<JS${interfaceName}*>(baseObject);\n");
                         if (InterfaceRequiresAttributesOnInstanceForCompatibility($interface)) {
                             push(@implContent, "    ${className}* castedThisObject = " . GetCastingHelperForThisObject($interface) . "(JSValue::decode(thisValue));\n");
                             push(@implContent, "    if (UNLIKELY(!castedThisObject))\n");
@@ -2580,18 +2578,15 @@ sub GenerateImplementation
                 if (HasCustomSetter($attribute->signature->extendedAttributes)) {
                     push(@implContent, "    castedThis->set$implSetterFunctionName(exec, value);\n");
                 } elsif ($type eq "EventListener") {
-                    $implIncludes{"JSEventListener.h"} = 1;
-                    push(@implContent, "    UNUSED_PARAM(exec);\n");
-                    my $windowEventListener = $attribute->signature->extendedAttributes->{"JSWindowEventListener"};
-                    if ($windowEventListener) {
-                        push(@implContent, "    JSDOMGlobalObject* globalObject = castedThis->globalObject();\n");
-                    }
-                    push(@implContent, "    $implType& impl = castedThis->impl();\n");
+                    my $eventName = EventHandlerAttributeEventName($attribute);
+                    # FIXME: Find a way to do this special case without hardcoding the class and attribute names here.
                     if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerGlobalScope")) and $name eq "onerror") {
                         $implIncludes{"JSErrorHandler.h"} = 1;
-                        push(@implContent, "    impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, castedThis));\n");
+                        push(@implContent, "    castedThis->impl().setAttributeEventListener($eventName, createJSErrorHandler(exec, value, castedThis));\n");
                     } else {
-                        push(@implContent, GenerateAttributeEventListenerCall($implSetterFunctionName, $windowEventListener));
+                        $implIncludes{"JSEventListener.h"} = 1;
+                        my $setter = $attribute->signature->extendedAttributes->{"JSWindowEventListener"} ? "setWindowForwardedEventHandlerAttribute" : "setEventHandlerAttribute";
+                        push(@implContent, "    $setter(*exec, *castedThis, castedThis->impl(), $eventName, value);\n");
                     }
                 } elsif ($attribute->signature->type =~ /Constructor$/) {
                     my $constructorType = $attribute->signature->type;
@@ -2602,14 +2597,14 @@ sub GenerateImplementation
                     if ($constructorType ne "any" and $constructorType !~ /Named$/) {
                         AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
                     }
-                    push(@implContent, "    // Shadowing a built-in constructor\n");
+                    push(@implContent, "    // Shadowing a built-in constructor.\n");
                     push(@implContent, "    castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");
                 } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) {
-                    push(@implContent, "    // Shadowing a built-in object\n");
+                    push(@implContent, "    // Shadowing a built-in object.\n");
                     push(@implContent, "    castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");
                 } else {
                     if (!$attribute->isStatic) {
-                        push(@implContent, "    $implType& impl = castedThis->impl();\n");
+                        push(@implContent, "    auto& impl = castedThis->impl();\n");
                     }
                     push(@implContent, "    ExceptionCode ec = 0;\n") if $setterRaisesException;
 
@@ -2712,7 +2707,7 @@ sub GenerateImplementation
     if ($indexedGetterFunction && !$interface->extendedAttributes->{"CustomEnumerateProperty"}) {
         push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
+        push(@implContent, "    auto* thisObject = jsCast<${className}*>(object);\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
         push(@implContent, "    for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i)\n");
         push(@implContent, "        propertyNames.add(Identifier::from(exec, i));\n");
@@ -2819,7 +2814,7 @@ sub GenerateImplementation
                 if ($isCustom) {
                     push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
                 } else {
-                    push(@implContent, "    $implType& impl = castedThis->impl();\n");
+                    push(@implContent, "    auto& impl = castedThis->impl();\n");
                     if ($svgPropertyType) {
                         push(@implContent, "    if (impl.isReadOnly()) {\n");
                         push(@implContent, "        setDOMException(exec, NO_MODIFICATION_ALLOWED_ERR);\n");
@@ -2869,7 +2864,7 @@ sub GenerateImplementation
     if ($needsVisitChildren) {
         push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(cell);\n");
+        push(@implContent, "    auto* thisObject = jsCast<${className}*>(cell);\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
         push(@implContent, "    Base::visitChildren(thisObject, visitor);\n");
         if ($interface->extendedAttributes->{"EventTarget"} || $interface->name eq "EventTarget") {
@@ -2913,8 +2908,8 @@ sub GenerateImplementation
             push(@implContent, "}\n\n");
             push(@implContent, "EncodedJSValue ${className}::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)\n");
             push(@implContent, "{\n");
-            push(@implContent, "    ${className}* thisObj = jsCast<$className*>(slotBase);\n");
-            push(@implContent, "    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");
+            push(@implContent, "    auto* thisObject = jsCast<$className*>(slotBase);\n");
+            push(@implContent, "    return JSValue::encode(toJS(exec, thisObject->globalObject(), thisObject->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");
             push(@implContent, "}\n\n");
         }
     }
@@ -2944,14 +2939,14 @@ sub GenerateImplementation
         # check below the isObservable check.
         my $emittedJSCast = 0;
         if ($codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) {
-            push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
+            push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
             $emittedJSCast = 1;
             push(@implContent, "    if (js${interfaceName}->impl().hasPendingActivity())\n");
             push(@implContent, "        return true;\n");
         }
         if ($codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) {
             if (!$emittedJSCast) {
-                push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
+                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
                 $emittedJSCast = 1;
             }
             push(@implContent, "    if (js${interfaceName}->impl().isFiringEventListeners())\n");
@@ -2959,7 +2954,7 @@ sub GenerateImplementation
         }
         if ($codeGenerator->InheritsInterface($interface, "Node")) {
             if (!$emittedJSCast) {
-                push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
+                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
                 $emittedJSCast = 1;
             }
             push(@implContent, "    if (JSNodeOwner::isReachableFromOpaqueRoots(handle, 0, visitor))\n");
@@ -2967,7 +2962,7 @@ sub GenerateImplementation
         }
         if (GetGenerateIsReachable($interface)) {
             if (!$emittedJSCast) {
-                push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
+                push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
                 $emittedJSCast = 1;
             }
             push(@implContent, "    if (!isObservable(js${interfaceName}))\n");
@@ -3024,8 +3019,8 @@ sub GenerateImplementation
          $codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject"))) {
         push(@implContent, "void JS${interfaceName}Owner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
-        push(@implContent, "    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);\n");
+        push(@implContent, "    auto* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.slot()->asCell());\n");
+        push(@implContent, "    auto& world = *static_cast<DOMWrapperWorld*>(context);\n");
         push(@implContent, "    uncacheWrapper(world, &js${interfaceName}->impl(), js${interfaceName});\n");
         push(@implContent, "    js${interfaceName}->releaseImpl();\n");
         push(@implContent, "}\n\n");
@@ -3132,7 +3127,7 @@ sub GenerateCallWith
         push(@callWithArgs, "exec");
     }
     if ($codeGenerator->ExtendedAttributeContains($callWith, "ScriptExecutionContext")) {
-        push(@$outputArray, "    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();\n");
+        push(@$outputArray, "    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();\n");
         push(@$outputArray, "    if (!scriptContext)\n");
         push(@$outputArray, "        return" . ($returnValue ? " " . $returnValue : "") . ";\n");
         push(@callWithArgs, "scriptContext");
@@ -4509,7 +4504,7 @@ sub GenerateConstructorDefinition
             push(@$outputArray, <<END);
 EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}(ExecState* exec)
 {
-    ${constructorClassName}* jsConstructor = jsCast<${constructorClassName}*>(exec->callee());
+    auto* jsConstructor = jsCast<${constructorClassName}*>(exec->callee());
 
     ScriptExecutionContext* executionContext = jsConstructor->scriptExecutionContext();
     if (!executionContext)
@@ -4576,7 +4571,7 @@ END
 
             push(@$outputArray, "EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}${overloadedIndexString}(ExecState* exec)\n");
             push(@$outputArray, "{\n");
-            push(@$outputArray, "    ${constructorClassName}* castedThis = jsCast<${constructorClassName}*>(exec->callee());\n");
+            push(@$outputArray, "    auto* castedThis = jsCast<${constructorClassName}*>(exec->callee());\n");
 
             my @constructorArgList;
 
@@ -4606,7 +4601,7 @@ END
                 push(@$outputArray, "    ScriptExecutionContext* context = castedThis->scriptExecutionContext();\n");
                 push(@$outputArray, "    if (!context)\n");
                 push(@$outputArray, "        return throwConstructorDocumentUnavailableError(*exec, \"${interfaceName}\");\n");
-                push(@$outputArray, "    Document& document = downcast<Document>(*context);\n");
+                push(@$outputArray, "    auto& document = downcast<Document>(*context);\n");
             }
             if ($generatingNamedConstructor) {
                 push(@constructorArgList, "*castedThis->document()");
index 2e75bd98f535341c9aab80b72ce793886502fb42..a7e0aeeeca46696388a91b416482d8a55aa1e552 100644 (file)
@@ -168,7 +168,7 @@ JSTestActiveDOMObject::~JSTestActiveDOMObject()
 
 bool JSTestActiveDOMObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestActiveDOMObject* thisObject = jsCast<JSTestActiveDOMObject*>(object);
+    auto* thisObject = jsCast<JSTestActiveDOMObject*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     return getStaticValueSlot<JSTestActiveDOMObject, Base>(exec, JSTestActiveDOMObjectTable, thisObject, propertyName, slot);
 }
@@ -178,10 +178,10 @@ EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, JSObject* slot
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestActiveDOMObject* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
+    auto* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
     if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
         return JSValue::encode(jsUndefined());
-    TestActiveDOMObject& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.excitingAttr());
     return JSValue::encode(result);
 }
@@ -211,7 +211,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
     if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
         return JSValue::encode(jsUndefined());
-    TestActiveDOMObject& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Node* nextChild(JSNode::toWrapped(exec->argument(0)));
@@ -228,7 +228,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(E
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestActiveDOMObject", "postMessage");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
-    TestActiveDOMObject& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& message(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -247,8 +247,8 @@ bool JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unk
 
 void JSTestActiveDOMObjectOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestActiveDOMObject* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestActiveDOMObject->impl(), jsTestActiveDOMObject);
     jsTestActiveDOMObject->releaseImpl();
 }
index 33a6f7a9e0a9020d0ea2cea30000a27b8fc2c914..74c2f79b2668c8d79b0cbbbb6afd2ba3465bb473 100644 (file)
@@ -161,7 +161,7 @@ JSTestCustomNamedGetter::~JSTestCustomNamedGetter()
 
 bool JSTestCustomNamedGetter::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
+    auto* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) {
         slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
@@ -172,7 +172,7 @@ bool JSTestCustomNamedGetter::getOwnPropertySlot(JSObject* object, ExecState* ex
 
 bool JSTestCustomNamedGetter::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)
 {
-    JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
+    auto* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     PropertyName propertyName = Identifier::from(exec, index);
     if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) {
@@ -202,7 +202,7 @@ EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunc
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestCustomNamedGetter", "anotherFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCustomNamedGetter::info());
-    TestCustomNamedGetter& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -221,8 +221,8 @@ bool JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::U
 
 void JSTestCustomNamedGetterOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestCustomNamedGetter* jsTestCustomNamedGetter = jsCast<JSTestCustomNamedGetter*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestCustomNamedGetter = jsCast<JSTestCustomNamedGetter*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestCustomNamedGetter->impl(), jsTestCustomNamedGetter);
     jsTestCustomNamedGetter->releaseImpl();
 }
index f1666d8c19014ca481b72f9a8feca7717c4f28e2..807b39830a6c470f6770d1642af09820aebf6cff 100644 (file)
@@ -91,7 +91,7 @@ protected:
 
 EncodedJSValue JSC_HOST_CALL JSTestEventConstructorConstructor::constructJSTestEventConstructor(ExecState* exec)
 {
-    JSTestEventConstructorConstructor* jsConstructor = jsCast<JSTestEventConstructorConstructor*>(exec->callee());
+    auto* jsConstructor = jsCast<JSTestEventConstructorConstructor*>(exec->callee());
 
     ScriptExecutionContext* executionContext = jsConstructor->scriptExecutionContext();
     if (!executionContext)
@@ -205,7 +205,7 @@ EncodedJSValue jsTestEventConstructorAttr1(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestEventConstructor", "attr1");
         return throwGetterTypeError(*exec, "TestEventConstructor", "attr1");
     }
-    TestEventConstructor& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.attr1());
     return JSValue::encode(result);
 }
@@ -222,7 +222,7 @@ EncodedJSValue jsTestEventConstructorAttr2(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestEventConstructor", "attr2");
         return throwGetterTypeError(*exec, "TestEventConstructor", "attr2");
     }
-    TestEventConstructor& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.attr2());
     return JSValue::encode(result);
 }
@@ -250,8 +250,8 @@ bool JSTestEventConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Un
 
 void JSTestEventConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestEventConstructor* jsTestEventConstructor = jsCast<JSTestEventConstructor*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestEventConstructor = jsCast<JSTestEventConstructor*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestEventConstructor->impl(), jsTestEventConstructor);
     jsTestEventConstructor->releaseImpl();
 }
index 5a214d07dd1060f9edead5c9cb2be79d899b7a94..1761d3397d516accd53d65a75c786bb17d206771 100644 (file)
@@ -173,7 +173,7 @@ JSTestEventTarget::~JSTestEventTarget()
 
 bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
+    auto* thisObject = jsCast<JSTestEventTarget*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     const HashTableValue* entry = getStaticValueSlotEntryWithoutCaching<JSTestEventTarget>(exec, propertyName);
     if (entry) {
@@ -195,7 +195,7 @@ bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* exec, Pr
 
 bool JSTestEventTarget::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)
 {
-    JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
+    auto* thisObject = jsCast<JSTestEventTarget*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     if (index < thisObject->impl().length()) {
         unsigned attributes = DontDelete | ReadOnly;
@@ -220,7 +220,7 @@ EncodedJSValue jsTestEventTargetConstructor(ExecState* exec, JSObject*, EncodedJ
 
 void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
 {
-    JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
+    auto* thisObject = jsCast<JSTestEventTarget*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i)
         propertyNames.add(Identifier::from(exec, i));
@@ -239,7 +239,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* e
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestEventTarget", "item");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int index(toUInt32(exec, exec->argument(0), NormalConversion));
@@ -260,7 +260,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionAddEventListener(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestEventTarget", "addEventListener");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (UNLIKELY(!listener.isObject()))
         return JSValue::encode(jsUndefined());
@@ -275,7 +275,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionRemoveEventListen
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestEventTarget", "removeEventListener");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (UNLIKELY(!listener.isObject()))
         return JSValue::encode(jsUndefined());
@@ -290,7 +290,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestEventTarget", "dispatchEvent");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -305,7 +305,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe
 
 void JSTestEventTarget::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(cell);
+    auto* thisObject = jsCast<JSTestEventTarget*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     thisObject->impl().visitJSEventListeners(visitor);
@@ -313,7 +313,7 @@ void JSTestEventTarget::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
 bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
-    JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
+    auto* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
     if (jsTestEventTarget->impl().isFiringEventListeners())
         return true;
     UNUSED_PARAM(visitor);
@@ -322,8 +322,8 @@ bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown
 
 void JSTestEventTargetOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestEventTarget->impl(), jsTestEventTarget);
     jsTestEventTarget->releaseImpl();
 }
index 2c3b6e9e698ca3b86caefc3d5d400df54e0de112..17939593b8a8614df8f0657f8a01ab6ca5389ed5 100644 (file)
@@ -158,7 +158,7 @@ JSTestException::~JSTestException()
 
 bool JSTestException::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestException* thisObject = jsCast<JSTestException*>(object);
+    auto* thisObject = jsCast<JSTestException*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     return getStaticValueSlot<JSTestException, Base>(exec, JSTestExceptionTable, thisObject, propertyName, slot);
 }
@@ -168,8 +168,8 @@ EncodedJSValue jsTestExceptionName(ExecState* exec, JSObject* slotBase, EncodedJ
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestException* castedThis = jsCast<JSTestException*>(slotBase);
-    TestException& impl = castedThis->impl();
+    auto* castedThis = jsCast<JSTestException*>(slotBase);
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.name());
     return JSValue::encode(result);
 }
@@ -197,8 +197,8 @@ bool JSTestExceptionOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>
 
 void JSTestExceptionOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestException* jsTestException = jsCast<JSTestException*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestException = jsCast<JSTestException*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestException->impl(), jsTestException);
     jsTestException->releaseImpl();
 }
index 47bbd7da905ca38093cf49f4e988cde46ab1d175..e4f88ff5b250471e11d02bccf7b4bd9fdb7292ca 100644 (file)
@@ -160,7 +160,7 @@ static inline bool isObservable(JSTestGenerateIsReachable* jsTestGenerateIsReach
 
 bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
-    JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
+    auto* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
     if (!isObservable(jsTestGenerateIsReachable))
         return false;
     TestGenerateIsReachable* root = &jsTestGenerateIsReachable->impl();
@@ -169,8 +169,8 @@ bool JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC:
 
 void JSTestGenerateIsReachableOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestGenerateIsReachable* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestGenerateIsReachable = jsCast<JSTestGenerateIsReachable*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestGenerateIsReachable->impl(), jsTestGenerateIsReachable);
     jsTestGenerateIsReachable->releaseImpl();
 }
index 660020ccd3aaeb6be7f1c03cfbe7f6c7f2d6f7bc..1eddbb0952ccf9fca96cd2aa4de6e8ccce034dae 100644 (file)
@@ -271,7 +271,7 @@ COMPILE_ASSERT(2 == TestSupplemental::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsW
 
 EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::constructJSTestInterface(ExecState* exec)
 {
-    JSTestInterfaceConstructor* castedThis = jsCast<JSTestInterfaceConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestInterfaceConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -442,7 +442,7 @@ JSTestInterface::~JSTestInterface()
 
 bool JSTestInterface::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestInterface* thisObject = jsCast<JSTestInterface*>(object);
+    auto* thisObject = jsCast<JSTestInterface*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     return getStaticValueSlot<JSTestInterface, Base>(exec, JSTestInterfaceTable, thisObject, propertyName, slot);
 }
@@ -483,7 +483,7 @@ EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestInterface", "implementsStr1");
         return throwGetterTypeError(*exec, "TestInterface", "implementsStr1");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.implementsStr1());
     return JSValue::encode(result);
 }
@@ -502,7 +502,7 @@ EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestInterface", "implementsStr2");
         return throwGetterTypeError(*exec, "TestInterface", "implementsStr2");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.implementsStr2());
     return JSValue::encode(result);
 }
@@ -515,7 +515,7 @@ EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* exec, JSObject* slotBase
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestInterface* castedThis = jsCast<JSTestInterface*>(slotBase);
+    auto* castedThis = jsCast<JSTestInterface*>(slotBase);
     return JSValue::encode(castedThis->implementsStr3(exec));
 }
 
@@ -533,7 +533,7 @@ EncodedJSValue jsTestInterfaceImplementsNode(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestInterface", "implementsNode");
         return throwGetterTypeError(*exec, "TestInterface", "implementsNode");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsNode()));
     return JSValue::encode(result);
 }
@@ -576,7 +576,7 @@ EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* exec, JSObject* slotBa
             return reportDeprecatedGetterError(*exec, "TestInterface", "supplementalStr1");
         return throwGetterTypeError(*exec, "TestInterface", "supplementalStr1");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr1(&impl));
     return JSValue::encode(result);
 }
@@ -595,7 +595,7 @@ EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* exec, JSObject* slotBa
             return reportDeprecatedGetterError(*exec, "TestInterface", "supplementalStr2");
         return throwGetterTypeError(*exec, "TestInterface", "supplementalStr2");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr2(&impl));
     return JSValue::encode(result);
 }
@@ -608,7 +608,7 @@ EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSObject* slotBa
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestInterface* castedThis = jsCast<JSTestInterface*>(slotBase);
+    auto* castedThis = jsCast<JSTestInterface*>(slotBase);
     return JSValue::encode(castedThis->supplementalStr3(exec));
 }
 
@@ -626,7 +626,7 @@ EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* exec, JSObject* slotBa
             return reportDeprecatedGetterError(*exec, "TestInterface", "supplementalNode");
         return throwGetterTypeError(*exec, "TestInterface", "supplementalNode");
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(&impl)));
     return JSValue::encode(result);
 }
@@ -643,7 +643,7 @@ EncodedJSValue jsTestInterfaceConstructor(ExecState* exec, JSObject* baseValue,
 
 void JSTestInterface::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
 {
-    JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell);
+    auto* thisObject = jsCast<JSTestInterface*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     if (thisObject->putDelegate(exec, propertyName, value, slot))
         return;
@@ -652,7 +652,7 @@ void JSTestInterface::put(JSCell* cell, ExecState* exec, PropertyName propertyNa
 
 void JSTestInterface::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow)
 {
-    JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell);
+    auto* thisObject = jsCast<JSTestInterface*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     PropertyName propertyName = Identifier::from(exec, index);
     PutPropertySlot slot(thisObject, shouldThrow);
@@ -687,7 +687,7 @@ void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* baseObject, Enc
             throwSetterTypeError(*exec, "TestInterface", "implementsStr2");
         return;
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -702,7 +702,7 @@ void setJSTestInterfaceImplementsStr3(ExecState* exec, JSObject* baseObject, Enc
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestInterface* castedThis = jsCast<JSTestInterface*>(baseObject);
+    auto* castedThis = jsCast<JSTestInterface*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
     castedThis->setImplementsStr3(exec, value);
@@ -723,7 +723,7 @@ void setJSTestInterfaceImplementsNode(ExecState* exec, JSObject* baseObject, Enc
             throwSetterTypeError(*exec, "TestInterface", "implementsNode");
         return;
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     Node* nativeValue(JSNode::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -758,7 +758,7 @@ void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* baseObject, E
             throwSetterTypeError(*exec, "TestInterface", "supplementalStr2");
         return;
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -773,7 +773,7 @@ void setJSTestInterfaceSupplementalStr3(ExecState* exec, JSObject* baseObject, E
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestInterface* castedThis = jsCast<JSTestInterface*>(baseObject);
+    auto* castedThis = jsCast<JSTestInterface*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
     castedThis->setSupplementalStr3(exec, value);
@@ -794,7 +794,7 @@ void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* baseObject, E
             throwSetterTypeError(*exec, "TestInterface", "supplementalNode");
         return;
     }
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     Node* nativeValue(JSNode::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -816,7 +816,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod1(E
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestInterface", "implementsMethod1");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.implementsMethod1();
     return JSValue::encode(jsUndefined());
 }
@@ -831,11 +831,11 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(E
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestInterface", "implementsMethod2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -882,7 +882,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestInterface", "supplementalMethod1");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestSupplemental::supplementalMethod1(&impl);
     return JSValue::encode(jsUndefined());
 }
@@ -897,11 +897,11 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestInterface", "supplementalMethod2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -942,7 +942,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfaceConstructorFunctionSupplementalMetho
 
 bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
-    JSTestInterface* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
+    auto* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
     if (jsTestInterface->impl().hasPendingActivity())
         return true;
     UNUSED_PARAM(visitor);
@@ -951,8 +951,8 @@ bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>
 
 void JSTestInterfaceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestInterface* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestInterface = jsCast<JSTestInterface*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestInterface->impl(), jsTestInterface);
     jsTestInterface->releaseImpl();
 }
index 6aec5505efdf386146ce116ec65341c3353d967a..5851fccb90289112909c5c15216c4ab55e8e0fa8 100644 (file)
@@ -166,7 +166,7 @@ EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestMediaQueryListListener", "method");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestMediaQueryListListener::info());
-    TestMediaQueryListListener& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -185,8 +185,8 @@ bool JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots(JSC::Handle<J
 
 void JSTestMediaQueryListListenerOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestMediaQueryListListener* jsTestMediaQueryListListener = jsCast<JSTestMediaQueryListListener*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestMediaQueryListListener = jsCast<JSTestMediaQueryListListener*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestMediaQueryListListener->impl(), jsTestMediaQueryListListener);
     jsTestMediaQueryListListener->releaseImpl();
 }
index 22b62f11d475049e00ba75ba545cf58f4de368d4..817db546c75696ef93a370fed3171b74a27ed1ad 100644 (file)
@@ -124,7 +124,7 @@ void JSTestNamedConstructorConstructor::finishCreation(VM& vm, JSDOMGlobalObject
 
 EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor(ExecState* exec)
 {
-    JSTestNamedConstructorNamedConstructor* castedThis = jsCast<JSTestNamedConstructorNamedConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestNamedConstructorNamedConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -230,7 +230,7 @@ JSValue JSTestNamedConstructor::getNamedConstructor(VM& vm, JSGlobalObject* glob
 
 bool JSTestNamedConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
-    JSTestNamedConstructor* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
+    auto* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
     if (jsTestNamedConstructor->impl().hasPendingActivity())
         return true;
     UNUSED_PARAM(visitor);
@@ -239,8 +239,8 @@ bool JSTestNamedConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Un
 
 void JSTestNamedConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestNamedConstructor* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestNamedConstructor->impl(), jsTestNamedConstructor);
     jsTestNamedConstructor->releaseImpl();
 }
index 3bb0e70672f032f52c51f05b7fd7c94859e5e8ae..2b5a552835498a69fa4c9993c1956918b97cb9f2 100644 (file)
@@ -86,7 +86,7 @@ protected:
 
 EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::constructJSTestNode(ExecState* exec)
 {
-    JSTestNodeConstructor* castedThis = jsCast<JSTestNodeConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestNodeConstructor*>(exec->callee());
     RefPtr<TestNode> object = TestNode::create();
     return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
 }
@@ -159,7 +159,7 @@ JSValue JSTestNode::getConstructor(VM& vm, JSGlobalObject* globalObject)
 
 void JSTestNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    JSTestNode* thisObject = jsCast<JSTestNode*>(cell);
+    auto* thisObject = jsCast<JSTestNode*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     thisObject->impl().visitJSEventListeners(visitor);
index 512e8f24a18fe536c2ebadd91f6aeb86ea575458..10766f160afc5bff7188f5f1ed4399badc1dfd25 100644 (file)
@@ -199,7 +199,7 @@ EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* exe
         }
     }
 #endif
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
     return JSValue::encode(result);
 }
@@ -236,7 +236,7 @@ EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* ex
         }
     }
 #endif
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.nondeterministicWriteableAttr());
     return JSValue::encode(result);
 }
@@ -273,7 +273,7 @@ EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* ex
         }
     }
 #endif
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.nondeterministicExceptionAttr());
     return JSValue::encode(result);
 }
@@ -313,7 +313,7 @@ EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecSta
         }
     }
 #endif
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.nondeterministicGetterExceptionAttr(ec));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -351,7 +351,7 @@ EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecSta
         }
     }
 #endif
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.nondeterministicSetterExceptionAttr());
     return JSValue::encode(result);
 }
@@ -377,7 +377,7 @@ void setJSTestNondeterministicNondeterministicWriteableAttr(ExecState* exec, JSO
             throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicWriteableAttr");
         return;
     }
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -397,7 +397,7 @@ void setJSTestNondeterministicNondeterministicExceptionAttr(ExecState* exec, JSO
             throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicExceptionAttr");
         return;
     }
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -417,7 +417,7 @@ void setJSTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* exe
             throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
         return;
     }
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -437,7 +437,7 @@ void setJSTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* exe
             throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
         return;
     }
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
@@ -459,7 +459,7 @@ EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondetermini
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestNondeterministic", "nondeterministicZeroArgFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNondeterministic::info());
-    TestNondeterministic& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result;
 #if ENABLE(WEB_REPLAY)
     InputCursor& cursor = exec->lexicalGlobalObject()->inputCursor();
@@ -492,8 +492,8 @@ bool JSTestNondeterministicOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Un
 
 void JSTestNondeterministicOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestNondeterministic* jsTestNondeterministic = jsCast<JSTestNondeterministic*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestNondeterministic = jsCast<JSTestNondeterministic*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestNondeterministic->impl(), jsTestNondeterministic);
     jsTestNondeterministic->releaseImpl();
 }
index 87b2d1b23b8bc25952dc7119708e991fa80ab095..570c061d082a7209ccb307c05f7c3ad688ebf055 100644 (file)
@@ -442,7 +442,7 @@ COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckCo
 
 EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
 {
-    JSTestObjConstructor* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -684,7 +684,7 @@ JSTestObj::~JSTestObj()
 
 bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestObj* thisObject = jsCast<JSTestObj*>(object);
+    auto* thisObject = jsCast<JSTestObj*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     return getStaticValueSlot<JSTestObj, Base>(exec, JSTestObjTable, thisObject, propertyName, slot);
 }
@@ -700,7 +700,7 @@ EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* exec, JSObject* slotBase, En
             return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyLongAttr");
         return throwGetterTypeError(*exec, "TestObj", "readOnlyLongAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.readOnlyLongAttr());
     return JSValue::encode(result);
 }
@@ -717,7 +717,7 @@ EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyStringAttr");
         return throwGetterTypeError(*exec, "TestObj", "readOnlyStringAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.readOnlyStringAttr());
     return JSValue::encode(result);
 }
@@ -734,7 +734,7 @@ EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyTestObjAttr");
         return throwGetterTypeError(*exec, "TestObj", "readOnlyTestObjAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
     return JSValue::encode(result);
 }
@@ -765,7 +765,7 @@ EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* exec, JSObject* slotBas
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
 }
 
@@ -775,7 +775,7 @@ EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, J
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     if (!castedThis->impl().frame())
         return JSValue::encode(jsUndefined());
     Settings& settings = castedThis->impl().frame()->settings();
@@ -796,7 +796,7 @@ EncodedJSValue jsTestObjEnumAttr(ExecState* exec, JSObject* slotBase, EncodedJSV
             return reportDeprecatedGetterError(*exec, "TestObj", "enumAttr");
         return throwGetterTypeError(*exec, "TestObj", "enumAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.enumAttr());
     return JSValue::encode(result);
 }
@@ -813,7 +813,7 @@ EncodedJSValue jsTestObjByteAttr(ExecState* exec, JSObject* slotBase, EncodedJSV
             return reportDeprecatedGetterError(*exec, "TestObj", "byteAttr");
         return throwGetterTypeError(*exec, "TestObj", "byteAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.byteAttr());
     return JSValue::encode(result);
 }
@@ -830,7 +830,7 @@ EncodedJSValue jsTestObjOctetAttr(ExecState* exec, JSObject* slotBase, EncodedJS
             return reportDeprecatedGetterError(*exec, "TestObj", "octetAttr");
         return throwGetterTypeError(*exec, "TestObj", "octetAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.octetAttr());
     return JSValue::encode(result);
 }
@@ -847,7 +847,7 @@ EncodedJSValue jsTestObjShortAttr(ExecState* exec, JSObject* slotBase, EncodedJS
             return reportDeprecatedGetterError(*exec, "TestObj", "shortAttr");
         return throwGetterTypeError(*exec, "TestObj", "shortAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.shortAttr());
     return JSValue::encode(result);
 }
@@ -864,7 +864,7 @@ EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* exec, JSObject* slotBase, E
             return reportDeprecatedGetterError(*exec, "TestObj", "unsignedShortAttr");
         return throwGetterTypeError(*exec, "TestObj", "unsignedShortAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.unsignedShortAttr());
     return JSValue::encode(result);
 }
@@ -881,7 +881,7 @@ EncodedJSValue jsTestObjLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSV
             return reportDeprecatedGetterError(*exec, "TestObj", "longAttr");
         return throwGetterTypeError(*exec, "TestObj", "longAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.longAttr());
     return JSValue::encode(result);
 }
@@ -898,7 +898,7 @@ EncodedJSValue jsTestObjLongLongAttr(ExecState* exec, JSObject* slotBase, Encode
             return reportDeprecatedGetterError(*exec, "TestObj", "longLongAttr");
         return throwGetterTypeError(*exec, "TestObj", "longLongAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.longLongAttr());
     return JSValue::encode(result);
 }
@@ -915,7 +915,7 @@ EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestObj", "unsignedLongLongAttr");
         return throwGetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.unsignedLongLongAttr());
     return JSValue::encode(result);
 }
@@ -932,7 +932,7 @@ EncodedJSValue jsTestObjStringAttr(ExecState* exec, JSObject* slotBase, EncodedJ
             return reportDeprecatedGetterError(*exec, "TestObj", "stringAttr");
         return throwGetterTypeError(*exec, "TestObj", "stringAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.stringAttr());
     return JSValue::encode(result);
 }
@@ -949,7 +949,7 @@ EncodedJSValue jsTestObjTestObjAttr(ExecState* exec, JSObject* slotBase, Encoded
             return reportDeprecatedGetterError(*exec, "TestObj", "testObjAttr");
         return throwGetterTypeError(*exec, "TestObj", "testObjAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.testObjAttr()));
     return JSValue::encode(result);
 }
@@ -966,7 +966,7 @@ EncodedJSValue jsTestObjXMLObjAttr(ExecState* exec, JSObject* slotBase, EncodedJ
             return reportDeprecatedGetterError(*exec, "TestObj", "XMLObjAttr");
         return throwGetterTypeError(*exec, "TestObj", "XMLObjAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.xmlObjAttr()));
     return JSValue::encode(result);
 }
@@ -983,7 +983,7 @@ EncodedJSValue jsTestObjCreate(ExecState* exec, JSObject* slotBase, EncodedJSVal
             return reportDeprecatedGetterError(*exec, "TestObj", "create");
         return throwGetterTypeError(*exec, "TestObj", "create");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsBoolean(impl.isCreate());
     return JSValue::encode(result);
 }
@@ -1000,7 +1000,7 @@ EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedStringAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
     return JSValue::encode(result);
 }
@@ -1017,7 +1017,7 @@ EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSObject* slotBas
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedIntegralAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
     return JSValue::encode(result);
 }
@@ -1034,7 +1034,7 @@ EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject*
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
     return JSValue::encode(result);
 }
@@ -1051,7 +1051,7 @@ EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedBooleanAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
     return JSValue::encode(result);
 }
@@ -1068,7 +1068,7 @@ EncodedJSValue jsTestObjReflectedURLAttr(ExecState* exec, JSObject* slotBase, En
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedURLAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedURLAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
     return JSValue::encode(result);
 }
@@ -1085,7 +1085,7 @@ EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase,
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedStringAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
     return JSValue::encode(result);
 }
@@ -1102,7 +1102,7 @@ EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* s
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomIntegralAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
     return JSValue::encode(result);
 }
@@ -1119,7 +1119,7 @@ EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* sl
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomBooleanAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
     return JSValue::encode(result);
 }
@@ -1136,7 +1136,7 @@ EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* slotBa
             return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomURLAttr");
         return throwGetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
     return JSValue::encode(result);
 }
@@ -1153,7 +1153,7 @@ EncodedJSValue jsTestObjTypedArrayAttr(ExecState* exec, JSObject* slotBase, Enco
             return reportDeprecatedGetterError(*exec, "TestObj", "typedArrayAttr");
         return throwGetterTypeError(*exec, "TestObj", "typedArrayAttr");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.typedArrayAttr()));
     return JSValue::encode(result);
 }
@@ -1171,7 +1171,7 @@ EncodedJSValue jsTestObjAttrWithGetterException(ExecState* exec, JSObject* slotB
         return throwGetterTypeError(*exec, "TestObj", "attrWithGetterException");
     }
     ExceptionCode ec = 0;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.attrWithGetterException(ec));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -1189,7 +1189,7 @@ EncodedJSValue jsTestObjAttrWithSetterException(ExecState* exec, JSObject* slotB
             return reportDeprecatedGetterError(*exec, "TestObj", "attrWithSetterException");
         return throwGetterTypeError(*exec, "TestObj", "attrWithSetterException");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.attrWithSetterException());
     return JSValue::encode(result);
 }
@@ -1207,7 +1207,7 @@ EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSObject*
         return throwGetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
     }
     ExceptionCode ec = 0;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -1225,7 +1225,7 @@ EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSObject*
             return reportDeprecatedGetterError(*exec, "TestObj", "stringAttrWithSetterException");
         return throwGetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
     return JSValue::encode(result);
 }
@@ -1236,7 +1236,7 @@ EncodedJSValue jsTestObjCustomAttr(ExecState* exec, JSObject* slotBase, EncodedJ
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     return JSValue::encode(castedThis->customAttr(exec));
 }
 
@@ -1252,7 +1252,7 @@ EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* exec, JSObject* slot
             return reportDeprecatedGetterError(*exec, "TestObj", "withScriptStateAttribute");
         return throwGetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.withScriptStateAttribute(exec));
     return JSValue::encode(result);
 }
@@ -1269,10 +1269,10 @@ EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSO
             return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAttribute");
         return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
     }
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(scriptContext)));
     return JSValue::encode(result);
 }
@@ -1290,7 +1290,7 @@ EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject
         return throwGetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
     }
     ExceptionCode ec = 0;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -1309,10 +1309,10 @@ EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exe
         return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
     }
     ExceptionCode ec = 0;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -1330,10 +1330,10 @@ EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecSt
             return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
         return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
     }
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
     return JSValue::encode(result);
 }
@@ -1351,10 +1351,10 @@ EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(
         return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
     }
     ExceptionCode ec = 0;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -1372,10 +1372,10 @@ EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttrib
             return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
         return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
     }
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
     return JSValue::encode(result);
 }
@@ -1392,7 +1392,7 @@ EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec
             return reportDeprecatedGetterError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
         return throwGetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
     return JSValue::encode(result);
 }
@@ -1410,7 +1410,7 @@ EncodedJSValue jsTestObjConditionalAttr1(ExecState* exec, JSObject* slotBase, En
             return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr1");
         return throwGetterTypeError(*exec, "TestObj", "conditionalAttr1");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.conditionalAttr1());
     return JSValue::encode(result);
 }
@@ -1429,7 +1429,7 @@ EncodedJSValue jsTestObjConditionalAttr2(ExecState* exec, JSObject* slotBase, En
             return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr2");
         return throwGetterTypeError(*exec, "TestObj", "conditionalAttr2");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.conditionalAttr2());
     return JSValue::encode(result);
 }
@@ -1448,7 +1448,7 @@ EncodedJSValue jsTestObjConditionalAttr3(ExecState* exec, JSObject* slotBase, En
             return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr3");
         return throwGetterTypeError(*exec, "TestObj", "conditionalAttr3");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.conditionalAttr3());
     return JSValue::encode(result);
 }
@@ -1461,7 +1461,7 @@ EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* s
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     return JSValue::encode(JSTestObjectA::getConstructor(exec->vm(), castedThis->globalObject()));
 }
 
@@ -1473,7 +1473,7 @@ EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* s
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     return JSValue::encode(JSTestObjectB::getConstructor(exec->vm(), castedThis->globalObject()));
 }
 
@@ -1485,7 +1485,7 @@ EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* s
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
     return JSValue::encode(JSTestObjectC::getConstructor(exec->vm(), castedThis->globalObject()));
 }
 
@@ -1504,7 +1504,7 @@ EncodedJSValue jsTestObjCachedAttribute1(ExecState* exec, JSObject* slotBase, En
     }
     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
         return JSValue::encode(cachedValue);
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = (impl.cachedAttribute1().hasNoValue() ? jsNull() : impl.cachedAttribute1().jsValue());
     castedThis->m_cachedAttribute1.set(exec->vm(), castedThis, result);
     return JSValue::encode(result);
@@ -1524,7 +1524,7 @@ EncodedJSValue jsTestObjCachedAttribute2(ExecState* exec, JSObject* slotBase, En
     }
     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
         return JSValue::encode(cachedValue);
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = (impl.cachedAttribute2().hasNoValue() ? jsNull() : impl.cachedAttribute2().jsValue());
     castedThis->m_cachedAttribute2.set(exec->vm(), castedThis, result);
     return JSValue::encode(result);
@@ -1542,7 +1542,7 @@ EncodedJSValue jsTestObjAnyAttribute(ExecState* exec, JSObject* slotBase, Encode
             return reportDeprecatedGetterError(*exec, "TestObj", "anyAttribute");
         return throwGetterTypeError(*exec, "TestObj", "anyAttribute");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = (impl.anyAttribute().hasNoValue() ? jsNull() : impl.anyAttribute().jsValue());
     return JSValue::encode(result);
 }
@@ -1553,8 +1553,8 @@ EncodedJSValue jsTestObjContentDocument(ExecState* exec, JSObject* slotBase, Enc
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
-    TestObj& impl = castedThis->impl();
+    auto* castedThis = jsCast<JSTestObj*>(slotBase);
+    auto& impl = castedThis->impl();
     return JSValue::encode(shouldAllowAccessToNode(exec, impl.contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
 }
 
@@ -1570,7 +1570,7 @@ EncodedJSValue jsTestObjMutablePoint(ExecState* exec, JSObject* slotBase, Encode
             return reportDeprecatedGetterError(*exec, "TestObj", "mutablePoint");
         return throwGetterTypeError(*exec, "TestObj", "mutablePoint");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint)));
     return JSValue::encode(result);
 }
@@ -1587,7 +1587,7 @@ EncodedJSValue jsTestObjImmutablePoint(ExecState* exec, JSObject* slotBase, Enco
             return reportDeprecatedGetterError(*exec, "TestObj", "immutablePoint");
         return throwGetterTypeError(*exec, "TestObj", "immutablePoint");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint())));
     return JSValue::encode(result);
 }
@@ -1604,7 +1604,7 @@ EncodedJSValue jsTestObjStrawberry(ExecState* exec, JSObject* slotBase, EncodedJ
             return reportDeprecatedGetterError(*exec, "TestObj", "strawberry");
         return throwGetterTypeError(*exec, "TestObj", "strawberry");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.blueberry());
     return JSValue::encode(result);
 }
@@ -1621,7 +1621,7 @@ EncodedJSValue jsTestObjStrictFloat(ExecState* exec, JSObject* slotBase, Encoded
             return reportDeprecatedGetterError(*exec, "TestObj", "strictFloat");
         return throwGetterTypeError(*exec, "TestObj", "strictFloat");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.strictFloat());
     return JSValue::encode(result);
 }
@@ -1638,7 +1638,7 @@ EncodedJSValue jsTestObjDescription(ExecState* exec, JSObject* slotBase, Encoded
             return reportDeprecatedGetterError(*exec, "TestObj", "description");
         return throwGetterTypeError(*exec, "TestObj", "description");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.description());
     return JSValue::encode(result);
 }
@@ -1655,7 +1655,7 @@ EncodedJSValue jsTestObjId(ExecState* exec, JSObject* slotBase, EncodedJSValue t
             return reportDeprecatedGetterError(*exec, "TestObj", "id");
         return throwGetterTypeError(*exec, "TestObj", "id");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.id());
     return JSValue::encode(result);
 }
@@ -1672,7 +1672,7 @@ EncodedJSValue jsTestObjHash(ExecState* exec, JSObject* slotBase, EncodedJSValue
             return reportDeprecatedGetterError(*exec, "TestObj", "hash");
         return throwGetterTypeError(*exec, "TestObj", "hash");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.hash());
     return JSValue::encode(result);
 }
@@ -1689,7 +1689,7 @@ EncodedJSValue jsTestObjReplaceableAttribute(ExecState* exec, JSObject* slotBase
             return reportDeprecatedGetterError(*exec, "TestObj", "replaceableAttribute");
         return throwGetterTypeError(*exec, "TestObj", "replaceableAttribute");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.replaceableAttribute());
     return JSValue::encode(result);
 }
@@ -1707,7 +1707,7 @@ EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* exec, JSObject* slotB
         return throwGetterTypeError(*exec, "TestObj", "nullableDoubleAttribute");
     }
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.nullableDoubleAttribute(isNull));
     if (isNull)
         return JSValue::encode(jsNull());
@@ -1727,7 +1727,7 @@ EncodedJSValue jsTestObjNullableLongAttribute(ExecState* exec, JSObject* slotBas
         return throwGetterTypeError(*exec, "TestObj", "nullableLongAttribute");
     }
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.nullableLongAttribute(isNull));
     if (isNull)
         return JSValue::encode(jsNull());
@@ -1747,7 +1747,7 @@ EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* exec, JSObject* slot
         return throwGetterTypeError(*exec, "TestObj", "nullableBooleanAttribute");
     }
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsBoolean(impl.nullableBooleanAttribute(isNull));
     if (isNull)
         return JSValue::encode(jsNull());
@@ -1767,7 +1767,7 @@ EncodedJSValue jsTestObjNullableStringAttribute(ExecState* exec, JSObject* slotB
         return throwGetterTypeError(*exec, "TestObj", "nullableStringAttribute");
     }
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.nullableStringAttribute(isNull));
     if (isNull)
         return JSValue::encode(jsNull());
@@ -1787,7 +1787,7 @@ EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, JSObject*
         return throwGetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
     }
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.nullableLongSettableAttribute(isNull));
     if (isNull)
         return JSValue::encode(jsNull());
@@ -1808,7 +1808,7 @@ EncodedJSValue jsTestObjNullableStringValue(ExecState* exec, JSObject* slotBase,
     }
     ExceptionCode ec = 0;
     bool isNull = false;
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
     setDOMException(exec, ec);
     if (isNull)
@@ -1828,7 +1828,7 @@ EncodedJSValue jsTestObjAttribute(ExecState* exec, JSObject* slotBase, EncodedJS
             return reportDeprecatedGetterError(*exec, "TestObj", "attribute");
         return throwGetterTypeError(*exec, "TestObj", "attribute");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.attribute());
     return JSValue::encode(result);
 }
@@ -1845,7 +1845,7 @@ EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject*
             return reportDeprecatedGetterError(*exec, "TestObj", "attributeWithReservedEnumType");
         return throwGetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.attributeWithReservedEnumType());
     return JSValue::encode(result);
 }
@@ -1875,10 +1875,10 @@ void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
+    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
-    // Shadowing a built-in constructor
+    // Shadowing a built-in constructor.
     castedThis->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value);
 }
 
@@ -1895,7 +1895,7 @@ void setJSTestObjEnumAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue
             throwSetterTypeError(*exec, "TestObj", "enumAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -1917,7 +1917,7 @@ void setJSTestObjByteAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue
             throwSetterTypeError(*exec, "TestObj", "byteAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int8_t nativeValue(toInt8(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -1937,7 +1937,7 @@ void setJSTestObjOctetAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue
             throwSetterTypeError(*exec, "TestObj", "octetAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -1957,7 +1957,7 @@ void setJSTestObjShortAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue
             throwSetterTypeError(*exec, "TestObj", "shortAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int16_t nativeValue(toInt16(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -1977,7 +1977,7 @@ void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* baseObject, Encode
             throwSetterTypeError(*exec, "TestObj", "unsignedShortAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     uint16_t nativeValue(toUInt16(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -1997,7 +1997,7 @@ void setJSTestObjLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue
             throwSetterTypeError(*exec, "TestObj", "longAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2017,7 +2017,7 @@ void setJSTestObjLongLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSVa
             throwSetterTypeError(*exec, "TestObj", "longLongAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     long long nativeValue(toInt64(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2037,7 +2037,7 @@ void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* baseObject, Enc
             throwSetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2057,7 +2057,7 @@ void setJSTestObjStringAttr(ExecState* exec, JSObject* baseObject, EncodedJSValu
             throwSetterTypeError(*exec, "TestObj", "stringAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2077,7 +2077,7 @@ void setJSTestObjTestObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSVal
             throwSetterTypeError(*exec, "TestObj", "testObjAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2097,7 +2097,7 @@ void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSValu
             throwSetterTypeError(*exec, "TestObj", "XMLObjAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2117,7 +2117,7 @@ void setJSTestObjCreate(ExecState* exec, JSObject* baseObject, EncodedJSValue th
             throwSetterTypeError(*exec, "TestObj", "create");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2137,7 +2137,7 @@ void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* baseObject, Enco
             throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2157,7 +2157,7 @@ void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* baseObject, En
             throwSetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2177,7 +2177,7 @@ void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* baseOb
             throwSetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     unsigned nativeValue(toUInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2197,7 +2197,7 @@ void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* baseObject, Enc
             throwSetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2217,7 +2217,7 @@ void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* baseObject, Encoded
             throwSetterTypeError(*exec, "TestObj", "reflectedURLAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2237,7 +2237,7 @@ void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* baseObject, Enco
             throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2257,7 +2257,7 @@ void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* baseObje
             throwSetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2277,7 +2277,7 @@ void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* baseObjec
             throwSetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2297,7 +2297,7 @@ void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* baseObject, E
             throwSetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2317,7 +2317,7 @@ void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* baseObject, EncodedJS
             throwSetterTypeError(*exec, "TestObj", "typedArrayAttr");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<Float32Array> nativeValue(toFloat32Array(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2337,7 +2337,7 @@ void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* baseObject,
             throwSetterTypeError(*exec, "TestObj", "attrWithGetterException");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2357,7 +2357,7 @@ void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* baseObject,
             throwSetterTypeError(*exec, "TestObj", "attrWithSetterException");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
@@ -2379,7 +2379,7 @@ void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* baseOb
             throwSetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2399,7 +2399,7 @@ void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* baseOb
             throwSetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
@@ -2414,7 +2414,7 @@ void setJSTestObjCustomAttr(ExecState* exec, JSObject* baseObject, EncodedJSValu
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
+    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
     castedThis->setCustomAttr(exec, value);
@@ -2433,7 +2433,7 @@ void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* baseObject,
             throwSetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2453,11 +2453,11 @@ void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject*
             throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return;
     impl.setWithScriptExecutionContextAttribute(scriptContext, nativeValue);
@@ -2476,7 +2476,7 @@ void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* baseO
             throwSetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2496,11 +2496,11 @@ void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSOb
             throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return;
     impl.setWithScriptExecutionContextAttributeRaises(scriptContext, nativeValue);
@@ -2519,11 +2519,11 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* ex
             throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return;
     impl.setWithScriptExecutionContextAndScriptStateAttribute(exec, scriptContext, nativeValue);
@@ -2542,11 +2542,11 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecSta
             throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return;
     impl.setWithScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, nativeValue);
@@ -2565,11 +2565,11 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(Exe
             throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return;
     impl.setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext, nativeValue);
@@ -2588,7 +2588,7 @@ void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObj
             throwSetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2609,7 +2609,7 @@ void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* baseObject, Encoded
             throwSetterTypeError(*exec, "TestObj", "conditionalAttr1");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2631,7 +2631,7 @@ void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* baseObject, Encoded
             throwSetterTypeError(*exec, "TestObj", "conditionalAttr2");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2653,7 +2653,7 @@ void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* baseObject, Encoded
             throwSetterTypeError(*exec, "TestObj", "conditionalAttr3");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2668,10 +2668,10 @@ void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* baseObje
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
+    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
-    // Shadowing a built-in constructor
+    // Shadowing a built-in constructor.
     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value);
 }
 
@@ -2683,10 +2683,10 @@ void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* baseObje
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
+    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
-    // Shadowing a built-in constructor
+    // Shadowing a built-in constructor.
     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value);
 }
 
@@ -2698,10 +2698,10 @@ void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* baseObje
     JSValue value = JSValue::decode(encodedValue);
     UNUSED_PARAM(baseObject);
     UNUSED_PARAM(thisValue);
-    JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
+    auto* castedThis = jsCast<JSTestObj*>(baseObject);
     UNUSED_PARAM(thisValue);
     UNUSED_PARAM(exec);
-    // Shadowing a built-in constructor
+    // Shadowing a built-in constructor.
     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value);
 }
 
@@ -2719,7 +2719,7 @@ void setJSTestObjAnyAttribute(ExecState* exec, JSObject* baseObject, EncodedJSVa
             throwSetterTypeError(*exec, "TestObj", "anyAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     Deprecated::ScriptValue nativeValue(exec->vm(), value);
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2739,7 +2739,7 @@ void setJSTestObjMutablePoint(ExecState* exec, JSObject* baseObject, EncodedJSVa
             throwSetterTypeError(*exec, "TestObj", "mutablePoint");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2759,7 +2759,7 @@ void setJSTestObjImmutablePoint(ExecState* exec, JSObject* baseObject, EncodedJS
             throwSetterTypeError(*exec, "TestObj", "immutablePoint");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2779,7 +2779,7 @@ void setJSTestObjStrawberry(ExecState* exec, JSObject* baseObject, EncodedJSValu
             throwSetterTypeError(*exec, "TestObj", "strawberry");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2799,7 +2799,7 @@ void setJSTestObjStrictFloat(ExecState* exec, JSObject* baseObject, EncodedJSVal
             throwSetterTypeError(*exec, "TestObj", "strictFloat");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     float nativeValue(value.toFloat(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2819,7 +2819,7 @@ void setJSTestObjId(ExecState* exec, JSObject* baseObject, EncodedJSValue thisVa
             throwSetterTypeError(*exec, "TestObj", "id");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2839,7 +2839,7 @@ void setJSTestObjReplaceableAttribute(ExecState* exec, JSObject* baseObject, Enc
             throwSetterTypeError(*exec, "TestObj", "replaceableAttribute");
         return;
     }
-    // Shadowing a built-in object
+    // Shadowing a built-in object.
     castedThis->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value);
 }
 
@@ -2856,7 +2856,7 @@ void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* baseOb
             throwSetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2876,7 +2876,7 @@ void setJSTestObjNullableStringValue(ExecState* exec, JSObject* baseObject, Enco
             throwSetterTypeError(*exec, "TestObj", "nullableStringValue");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2896,7 +2896,7 @@ void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* baseOb
             throwSetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
         return;
     }
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -2918,7 +2918,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "voidMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.voidMethod();
     return JSValue::encode(jsUndefined());
 }
@@ -2930,7 +2930,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "voidMethodWithArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -2953,7 +2953,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "byteMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.byteMethod());
     return JSValue::encode(result);
 }
@@ -2965,7 +2965,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "byteMethodWithArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int8_t byteArg(toInt8(exec, exec->argument(0), NormalConversion));
@@ -2988,7 +2988,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* ex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "octetMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.octetMethod());
     return JSValue::encode(result);
 }
@@ -3000,7 +3000,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecS
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "octetMethodWithArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     uint8_t octetArg(toUInt8(exec, exec->argument(0), NormalConversion));
@@ -3023,7 +3023,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "longMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.longMethod());
     return JSValue::encode(result);
 }
@@ -3035,7 +3035,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "longMethodWithArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3058,7 +3058,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "objMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
     return JSValue::encode(result);
 }
@@ -3070,7 +3070,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecSta
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "objMethodWithArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3093,7 +3093,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithSequenceArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<ScriptProfile>> sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &JSScriptProfile::toWrapped)));
@@ -3110,7 +3110,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(E
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodReturningSequence");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3127,7 +3127,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecSta
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithEnumArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -3146,7 +3146,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodThatRequiresAllArgsAndThrows");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -3169,7 +3169,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "serializedValue");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, exec->argument(0), 0, 0));
@@ -3186,7 +3186,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState*
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "optionsObject");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Dictionary oo(exec, exec->argument(0));
@@ -3206,7 +3206,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecS
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithException");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl.methodWithException(ec);
     setDOMException(exec, ec);
@@ -3240,7 +3240,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecStat
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "addEventListener");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (UNLIKELY(!listener.isObject()))
         return JSValue::encode(jsUndefined());
@@ -3255,7 +3255,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecS
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "removeEventListener");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (UNLIKELY(!listener.isObject()))
         return JSValue::encode(jsUndefined());
@@ -3270,7 +3270,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecS
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptStateVoid");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.withScriptStateVoid(exec);
     return JSValue::encode(jsUndefined());
 }
@@ -3282,7 +3282,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptStateObj");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
     if (UNLIKELY(exec->hadException()))
         return JSValue::encode(jsUndefined());
@@ -3296,7 +3296,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidExcept
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptStateVoidException");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl.withScriptStateVoidException(exec, ec);
     setDOMException(exec, ec);
@@ -3310,7 +3310,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjExcepti
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptStateObjException");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
 
@@ -3327,8 +3327,8 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContext");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto& impl = castedThis->impl();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     impl.withScriptExecutionContext(scriptContext);
@@ -3342,8 +3342,8 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptState");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto& impl = castedThis->impl();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     impl.withScriptExecutionContextAndScriptState(exec, scriptContext);
@@ -3357,9 +3357,9 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateObjException");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
@@ -3377,8 +3377,8 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
-    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+    auto& impl = castedThis->impl();
+    auto* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
@@ -3394,7 +3394,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCal
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStack");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(exec, 0));
     impl.withScriptArgumentsAndCallStack(scriptArguments.release());
     return JSValue::encode(jsUndefined());
@@ -3407,7 +3407,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithOptionalArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -3429,7 +3429,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndOptionalArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3456,7 +3456,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3491,7 +3491,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithOptionalString");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -3513,7 +3513,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsUndefined");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return JSValue::encode(jsUndefined());
@@ -3528,7 +3528,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsNullString");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& str(argumentOrNull(exec, 0).isEmpty() ? String() : argumentOrNull(exec, 0).toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return JSValue::encode(jsUndefined());
@@ -3543,7 +3543,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithCallbackArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -3560,7 +3560,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgA
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithNonCallbackArgAndCallbackArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonCallback(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3580,7 +3580,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOpti
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithCallbackAndOptionalArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<TestCallback> callback;
     if (!exec->argument(0).isUndefinedOrNull()) {
         if (!exec->uncheckedArgument(0).isFunction())
@@ -3622,7 +3622,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "conditionalMethod1");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.conditionalMethod1());
     return JSValue::encode(result);
 }
@@ -3637,7 +3637,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "conditionalMethod2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.conditionalMethod2();
     return JSValue::encode(jsUndefined());
 }
@@ -3652,7 +3652,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "conditionalMethod3");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.conditionalMethod3();
     return JSValue::encode(jsUndefined());
 }
@@ -3666,7 +3666,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
@@ -3686,7 +3686,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
@@ -3713,7 +3713,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -3730,7 +3730,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -3747,7 +3747,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -3764,7 +3764,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     RefPtr<DOMStringList> listArg(toDOMStringList(exec, exec->argument(0)));
@@ -3781,7 +3781,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -3798,7 +3798,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
@@ -3815,7 +3815,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -3832,7 +3832,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -3849,7 +3849,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -3974,7 +3974,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(Exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "classMethodWithClamp");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     unsigned short objArgsShort = 0;
@@ -4004,7 +4004,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSeq
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithUnsignedLongSequence");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> unsignedLongSequence(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -4021,7 +4021,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecS
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "stringArrayFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -4041,7 +4041,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "domStringListFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -4061,7 +4061,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNulla
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -4081,7 +4081,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNulla
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -4101,7 +4101,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState*
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "getSVGDocument");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     if (!shouldAllowAccessToNode(exec, impl.getSVGDocument(ec)))
         return JSValue::encode(jsNull());
@@ -4118,7 +4118,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "convert1");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
@@ -4135,7 +4135,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "convert2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
@@ -4152,7 +4152,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "convert4");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
@@ -4169,7 +4169,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "convert5");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
@@ -4186,7 +4186,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(Exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "mutablePointFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())));
     return JSValue::encode(result);
 }
@@ -4198,7 +4198,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(Ex
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "immutablePointFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
     return JSValue::encode(result);
 }
@@ -4210,7 +4210,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "orange");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     impl.banana();
     return JSValue::encode(jsUndefined());
 }
@@ -4222,7 +4222,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState*
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "strictFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -4248,7 +4248,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequenc
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "strictFunctionWithSequence");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -4273,7 +4273,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(E
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "strictFunctionWithArray");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -4298,7 +4298,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(Exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "variadicStringMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& head(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -4318,7 +4318,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(Exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "variadicDoubleMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     double head(exec->argument(0).toNumber(exec));
@@ -4338,7 +4338,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "variadicNodeMethod");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Node* head(JSNode::toWrapped(exec->argument(0)));
@@ -4361,7 +4361,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* exec)
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestObj", "any");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     float a(exec->argument(0).toFloat(exec));
@@ -4376,7 +4376,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* exec)
 
 void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
+    auto* thisObject = jsCast<JSTestObj*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     visitor.append(&thisObject->m_cachedAttribute1);
@@ -4392,8 +4392,8 @@ bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle
 
 void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestObj = jsCast<JSTestObj*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestObj->impl(), jsTestObj);
     jsTestObj->releaseImpl();
 }
index 97dc05a6a306e34148ee1053448f794a2a224963..311752aa7a0e06fb873e86abf7f9ee0616586aa1 100644 (file)
@@ -91,7 +91,7 @@ protected:
 
 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1(ExecState* exec)
 {
-    JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ArrayBuffer* arrayBuffer(toArrayBuffer(exec->argument(0)));
@@ -103,7 +103,7 @@ EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJ
 
 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2(ExecState* exec)
 {
-    JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     RefPtr<ArrayBufferView> arrayBufferView(toArrayBufferView(exec->argument(0)));
@@ -115,7 +115,7 @@ EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJ
 
 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3(ExecState* exec)
 {
-    JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Blob* blob(JSBlob::toWrapped(exec->argument(0)));
@@ -127,7 +127,7 @@ EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJ
 
 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4(ExecState* exec)
 {
-    JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& string(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -241,8 +241,8 @@ bool JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots(JSC::Handle<J
 
 void JSTestOverloadedConstructorsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestOverloadedConstructors* jsTestOverloadedConstructors = jsCast<JSTestOverloadedConstructors*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestOverloadedConstructors = jsCast<JSTestOverloadedConstructors*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestOverloadedConstructors->impl(), jsTestOverloadedConstructors);
     jsTestOverloadedConstructors->releaseImpl();
 }
index 206f2ffb5abd085bdd1ac75c47e0b7eb4cdc571c..86460a4cbdeed007da7bd1e823a33706bda3561e 100644 (file)
@@ -169,7 +169,7 @@ EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* exec, JSObje
             return reportDeprecatedGetterError(*exec, "TestSerializedScriptValueInterface", "value");
         return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "value");
     }
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = impl.value() ? impl.value()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return JSValue::encode(result);
 }
@@ -186,7 +186,7 @@ EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* exec
             return reportDeprecatedGetterError(*exec, "TestSerializedScriptValueInterface", "readonlyValue");
         return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "readonlyValue");
     }
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return JSValue::encode(result);
 }
@@ -205,7 +205,7 @@ EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* exec,
     }
     if (JSValue cachedValue = castedThis->m_cachedValue.get())
         return JSValue::encode(cachedValue);
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     castedThis->m_cachedValue.set(exec->vm(), castedThis, result);
     return JSValue::encode(result);
@@ -223,7 +223,7 @@ EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* exec, JSObje
             return reportDeprecatedGetterError(*exec, "TestSerializedScriptValueInterface", "ports");
         return throwGetterTypeError(*exec, "TestSerializedScriptValueInterface", "ports");
     }
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsArray(exec, castedThis->globalObject(), impl.ports());
     return JSValue::encode(result);
 }
@@ -242,7 +242,7 @@ EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState
     }
     if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
         return JSValue::encode(cachedValue);
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     castedThis->m_cachedReadonlyValue.set(exec->vm(), castedThis, result);
     return JSValue::encode(result);
@@ -269,7 +269,7 @@ void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, JSObject* bas
             throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "value");
         return;
     }
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -289,7 +289,7 @@ void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, JSObjec
             throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "cachedValue");
         return;
     }
-    TestSerializedScriptValueInterface& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -304,7 +304,7 @@ JSValue JSTestSerializedScriptValueInterface::getConstructor(VM& vm, JSGlobalObj
 
 void JSTestSerializedScriptValueInterface::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    JSTestSerializedScriptValueInterface* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell);
+    auto* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     visitor.append(&thisObject->m_cachedValue);
@@ -320,8 +320,8 @@ bool JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots(JSC::
 
 void JSTestSerializedScriptValueInterfaceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface = jsCast<JSTestSerializedScriptValueInterface*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestSerializedScriptValueInterface = jsCast<JSTestSerializedScriptValueInterface*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestSerializedScriptValueInterface->impl(), jsTestSerializedScriptValueInterface);
     jsTestSerializedScriptValueInterface->releaseImpl();
 }
index 61423f64a79852d1ebad1cb74a72effbb24e49e0..9a7b5dca0b6cfa8f777b2922736bd35fc92a62ce 100644 (file)
@@ -146,7 +146,7 @@ static const HashTableValue JSTestTypedefsConstructorTableValues[] =
 
 EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::constructJSTestTypedefs(ExecState* exec)
 {
-    JSTestTypedefsConstructor* castedThis = jsCast<JSTestTypedefsConstructor*>(exec->callee());
+    auto* castedThis = jsCast<JSTestTypedefsConstructor*>(exec->callee());
     if (UNLIKELY(exec->argumentCount() < 2))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& hello(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -243,7 +243,7 @@ JSTestTypedefs::~JSTestTypedefs()
 
 bool JSTestTypedefs::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
-    JSTestTypedefs* thisObject = jsCast<JSTestTypedefs*>(object);
+    auto* thisObject = jsCast<JSTestTypedefs*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     return getStaticValueSlot<JSTestTypedefs, Base>(exec, JSTestTypedefsTable, thisObject, propertyName, slot);
 }
@@ -259,7 +259,7 @@ EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* slo
             return reportDeprecatedGetterError(*exec, "TestTypedefs", "unsignedLongLongAttr");
         return throwGetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr");
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.unsignedLongLongAttr());
     return JSValue::encode(result);
 }
@@ -276,7 +276,7 @@ EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSO
             return reportDeprecatedGetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
         return throwGetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return JSValue::encode(result);
 }
@@ -287,7 +287,7 @@ EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSObject* sl
     UNUSED_PARAM(exec);
     UNUSED_PARAM(slotBase);
     UNUSED_PARAM(thisValue);
-    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(slotBase);
+    auto* castedThis = jsCast<JSTestTypedefs*>(slotBase);
     return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
 }
 
@@ -304,7 +304,7 @@ EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, JSObject*
         return throwGetterTypeError(*exec, "TestTypedefs", "attrWithGetterException");
     }
     ExceptionCode ec = 0;
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.attrWithGetterException(ec));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -322,7 +322,7 @@ EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* exec, JSObject*
             return reportDeprecatedGetterError(*exec, "TestTypedefs", "attrWithSetterException");
         return throwGetterTypeError(*exec, "TestTypedefs", "attrWithSetterException");
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsNumber(impl.attrWithSetterException());
     return JSValue::encode(result);
 }
@@ -340,7 +340,7 @@ EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* exec, JSOb
         return throwGetterTypeError(*exec, "TestTypedefs", "stringAttrWithGetterException");
     }
     ExceptionCode ec = 0;
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
     setDOMException(exec, ec);
     return JSValue::encode(result);
@@ -358,7 +358,7 @@ EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, JSOb
             return reportDeprecatedGetterError(*exec, "TestTypedefs", "stringAttrWithSetterException");
         return throwGetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException");
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
     return JSValue::encode(result);
 }
@@ -384,7 +384,7 @@ void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* baseObject
             throwSetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -404,7 +404,7 @@ void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject*
             throwSetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -424,7 +424,7 @@ void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* baseObj
             throwSetterTypeError(*exec, "TestTypedefs", "attrWithGetterException");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -444,7 +444,7 @@ void setJSTestTypedefsAttrWithSetterException(ExecState* exec, JSObject* baseObj
             throwSetterTypeError(*exec, "TestTypedefs", "attrWithSetterException");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (UNLIKELY(exec->hadException()))
@@ -466,7 +466,7 @@ void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* b
             throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithGetterException");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
         return;
@@ -486,7 +486,7 @@ void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* b
             throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException");
         return;
     }
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (UNLIKELY(exec->hadException()))
@@ -508,7 +508,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* exec
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "func");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -530,7 +530,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState*
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "setShadow");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 3))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     float width(exec->argument(0).toFloat(exec));
@@ -571,7 +571,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceAr
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "methodWithSequenceArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &JSSerializedScriptValue::toWrapped)));
@@ -588,7 +588,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(Exe
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "nullableArrayArg");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -605,7 +605,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecSt
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "funcWithClamp");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     unsigned long long arg1 = 0;
@@ -642,7 +642,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFuncti
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "immutablePointFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
     return JSValue::encode(result);
 }
@@ -654,7 +654,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -674,7 +674,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction2");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -694,7 +694,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThat
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "callWithSequenceThatRequiresInclude");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     if (UNLIKELY(exec->argumentCount() < 1))
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<TestEventTarget>> sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &JSTestEventTarget::toWrapped)));
@@ -711,7 +711,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(
     if (UNLIKELY(!castedThis))
         return throwThisTypeError(*exec, "TestTypedefs", "methodWithException");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl.methodWithException(ec);
     setDOMException(exec, ec);
@@ -727,8 +727,8 @@ bool JSTestTypedefsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> h
 
 void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSTestTypedefs* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsTestTypedefs->impl(), jsTestTypedefs);
     jsTestTypedefs->releaseImpl();
 }
index 9518822aea61ed763be94c6102d24bf01c785704..c89cf7e9d6c1bed142ddea00a27771d76fa686c2 100644 (file)
@@ -154,7 +154,7 @@ EncodedJSValue jsattributeReadonly(ExecState* exec, JSObject* slotBase, EncodedJ
             return reportDeprecatedGetterError(*exec, "attribute", "readonly");
         return throwGetterTypeError(*exec, "attribute", "readonly");
     }
-    attribute& impl = castedThis->impl();
+    auto& impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl.readonly());
     return JSValue::encode(result);
 }
@@ -182,8 +182,8 @@ bool JSattributeOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> hand
 
 void JSattributeOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSattribute* jsattribute = jsCast<JSattribute*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsattribute = jsCast<JSattribute*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsattribute->impl(), jsattribute);
     jsattribute->releaseImpl();
 }
index 08fc493eeb69e8fbe88e1f434e2343cf14eff89a..c861305592445bcd079824c5ca92cd97dc0a5167 100644 (file)
@@ -160,8 +160,8 @@ bool JSreadonlyOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handl
 
 void JSreadonlyOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSreadonly* jsreadonly = jsCast<JSreadonly*>(handle.slot()->asCell());
-    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
+    auto* jsreadonly = jsCast<JSreadonly*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
     uncacheWrapper(world, &jsreadonly->impl(), jsreadonly);
     jsreadonly->releaseImpl();
 }
index f88ae7785d17b5fb699b82d10a1e09722079bf3a..2dbabe59756209addd6f205f80f5bf6d4ff0f026 100644 (file)
@@ -224,4 +224,11 @@ std::unique_ptr<MessagePortArray> MessagePort::entanglePorts(ScriptExecutionCont
     return portArray;
 }
 
+bool MessagePort::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+{
+    if (listener && listener->isAttribute() && eventType == eventNames().messageEvent)
+        start();
+    return EventTargetWithInlineData::addEventListener(eventType, listener, useCapture);
+}
+
 } // namespace WebCore
index e1b96e6bc71314751fb32d5eb422ffb5df509a3a..bc7a4578134b1268057cd9c5d042564074fadf48 100644 (file)
@@ -85,7 +85,6 @@ namespace WebCore {
         void setOnmessage(PassRefPtr<EventListener> listener)
         {
             setAttributeEventListener(eventNames().messageEvent, listener);
-            start();
         }
         EventListener* onmessage() { return getAttributeEventListener(eventNames().messageEvent); }
 
@@ -100,6 +99,8 @@ namespace WebCore {
         // A port gets neutered when it is transferred to a new owner via postMessage().
         bool isNeutered() { return !m_entangledChannel; }
 
+        bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override;
+
     private:
         explicit MessagePort(ScriptExecutionContext&);