<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200448] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200448">200448</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-05-04 20:09:41 -0700 (Wed, 04 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Start on dictionary support for IDL, getting enough to work for one dictionary
https://bugs.webkit.org/show_bug.cgi?id=157336

Reviewed by Alex Christensen.

* bindings/js/JSDOMBinding.h: Return RefPtr instead of PassRefPtr for the return
value of toArrayBufferView. Not only is this the correct modern idiom, it also
works properly with auto, and PassRefPtr does not.

* bindings/js/JSDOMBuild.h: Added. This has the build function template in it.
It's used to build values like dictionaries. We specialize and call the tempate
in generated code. This is only the initial simplistic version; will be refining
for exception handling, optional handling, default value handling, and lots of
other things not yet needed for this first dictionary.

* bindings/scripts/CodeGenerator.pm:
(ProcessDocument): Handle dictionaries much like how we handle enumerations.
(SkipIncludeHeader): Moved small list of special types here from CodeGeneratorJS.
(IsDictionaryType): Added.
(IsRefPtrType): Make this return 0 for dictionary types.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInterface): Added handling for dictionaries.
(SkipIncludeHeader): Deleted.
(AddIncludesForType): Call the the SkipIncludeHeader from CodeGenerator.pm directly.
(GetNestedClassName): Factored out the work that was previously in
GetEnumerationClassName so we could reuse it for dictionaries too.
(GetEnumerationClassName): Changed to call GetNestedClassName.
(GetEnumerationClassIdentifier): Deleted. Instead of using this, we now use templates
so we can use the actual class name.
(GenerateEnumerationImplementationContent): Changed parse and expectedEnumerationValues
to use function template specialization instead of functions. This cleans up the code
a bit and makes it eaiser to use from other templates. Later we may want to merge the
parse function template build function template from JSDOMBuild.h. Added specialization
of the build function template.
(GetDictionaryClassName): Added. Calls GetNestedClassName.
(GenerateDictionaryImplementationContent): Added. Generates the build function for each
dictionary type. Initial simplistic version to be refined.
(GenerateImplementation): Added dictionaries argument and called the
GenerateDictionaryImplementationContent function. Also changed many functions to take
interface arguments and also removed redundant interfaceName arguments from functions
that formerly took both.
(GenerateParametersCheck): Updated for changes above. That includes calling the new
parse function template. Also changed to use auto and WTFMove, which makes the code
both more generic and potentially more efficient and obviates the need for a special
case for dictionary types.
(GenerateCallbackHeader): Updated for changes above.
(GenerateCallbackImplementation): Ditto.
(GenerateImplementationFunctionCall): Ditto.
(GetNativeTypeFromSignature): Ditto.
(GetNativeType): Changed this function to take the interface because that's needed to
get the type name right for enumeration types rather than returning &quot;auto&quot;. Made that
change as well. Moved one type, DOMStringList, into the nativeType hash instead of
having explicit code here for it. Didn't add a dictionary type case here yet, but
probably will need to do that in the next patch.
(ShouldPassWrapperByReference): Pass interface in to GetNativeType.
(GetNativeVectorInnerType): Removed unneeded special case for DOMString.
(GetNativeTypeForCallbacks): Changed to take the interface.
(GetNativeTypeForMemoization): Ditto.
(JSValueToNative): Changed expression for Dictionary (the thing I am working to make
obsolete) to name the type so it will work with auto. Added a case for dictionary
types and updated the case for enumeration types.
(NativeToJSValue): Updated to take an interface rather than an interface name, and to
pass that along as needed.

* bindings/scripts/IDLParser.pm:
(Parse): Add dictionaries to a list.
(parseDictionary): Put name, extended attributes, and members into the dictionary.
(parseDictionaryMembers): Build up a members array.
(parseDictionaryMember): Put isOptional, type, name, and default value into the
dictionary member.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
Regenerated.

* bindings/scripts/test/TestObj.idl: Added some test cases that I was using to
get the bindings script to work. Right now this is basically identical to the
actual use of this in Element.idl, but over time I will modify it to cover more
features of dictionaries. Also fixed some incorrect test cases trying to use
the type &quot;bool&quot;, which doesn't exist in IDL.

* dom/Element.cpp:
(WebCore::Element::canHaveUserAgentShadowRoot): Added. The existing code used a
combination of a virtual function on HTMLElement and type checking. It's better
to just use a virtual function on Element.
(WebCore::Element::attachShadow): Updated to take a ShadowRootInit struct instead
of a Dictionary. Also tweaked the code in a couple other minor ways.

* dom/Element.h: Added the ShadowRootMode enum class and the ShadowRootInit struct,
and changed attachShadow to take ShadowRootInit instead of Dictionary. Also added
the private canHaveUserAgentShadowRoot virtual function.

* dom/Element.idl: Added ShadowRootMode, ShadowRootInit, and used them in as the
arguemnt type for attachShadow.

* html/HTMLElement.h: Made canHaveUserAgentShadowRoot a private override instead
of a public virtual function.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLParserpm">trunk/Source/WebCore/bindings/scripts/IDLParser.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomElementidl">trunk/Source/WebCore/dom/Element.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementh">trunk/Source/WebCore/html/HTMLElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBuildh">trunk/Source/WebCore/bindings/js/JSDOMBuild.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/ChangeLog        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -1,3 +1,119 @@
</span><ins>+2016-05-03  Darin Adler  &lt;darin@apple.com&gt;
+
+        Start on dictionary support for IDL, getting enough to work for one dictionary
+        https://bugs.webkit.org/show_bug.cgi?id=157336
+
+        Reviewed by Alex Christensen.
+
+        * bindings/js/JSDOMBinding.h: Return RefPtr instead of PassRefPtr for the return
+        value of toArrayBufferView. Not only is this the correct modern idiom, it also
+        works properly with auto, and PassRefPtr does not.
+
+        * bindings/js/JSDOMBuild.h: Added. This has the build function template in it.
+        It's used to build values like dictionaries. We specialize and call the tempate
+        in generated code. This is only the initial simplistic version; will be refining
+        for exception handling, optional handling, default value handling, and lots of
+        other things not yet needed for this first dictionary.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (ProcessDocument): Handle dictionaries much like how we handle enumerations.
+        (SkipIncludeHeader): Moved small list of special types here from CodeGeneratorJS.
+        (IsDictionaryType): Added.
+        (IsRefPtrType): Make this return 0 for dictionary types.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateInterface): Added handling for dictionaries.
+        (SkipIncludeHeader): Deleted.
+        (AddIncludesForType): Call the the SkipIncludeHeader from CodeGenerator.pm directly.
+        (GetNestedClassName): Factored out the work that was previously in
+        GetEnumerationClassName so we could reuse it for dictionaries too.
+        (GetEnumerationClassName): Changed to call GetNestedClassName.
+        (GetEnumerationClassIdentifier): Deleted. Instead of using this, we now use templates
+        so we can use the actual class name.
+        (GenerateEnumerationImplementationContent): Changed parse and expectedEnumerationValues
+        to use function template specialization instead of functions. This cleans up the code
+        a bit and makes it eaiser to use from other templates. Later we may want to merge the
+        parse function template build function template from JSDOMBuild.h. Added specialization
+        of the build function template.
+        (GetDictionaryClassName): Added. Calls GetNestedClassName.
+        (GenerateDictionaryImplementationContent): Added. Generates the build function for each
+        dictionary type. Initial simplistic version to be refined.
+        (GenerateImplementation): Added dictionaries argument and called the
+        GenerateDictionaryImplementationContent function. Also changed many functions to take
+        interface arguments and also removed redundant interfaceName arguments from functions
+        that formerly took both.
+        (GenerateParametersCheck): Updated for changes above. That includes calling the new
+        parse function template. Also changed to use auto and WTFMove, which makes the code
+        both more generic and potentially more efficient and obviates the need for a special
+        case for dictionary types.
+        (GenerateCallbackHeader): Updated for changes above.
+        (GenerateCallbackImplementation): Ditto.
+        (GenerateImplementationFunctionCall): Ditto.
+        (GetNativeTypeFromSignature): Ditto.
+        (GetNativeType): Changed this function to take the interface because that's needed to
+        get the type name right for enumeration types rather than returning &quot;auto&quot;. Made that
+        change as well. Moved one type, DOMStringList, into the nativeType hash instead of
+        having explicit code here for it. Didn't add a dictionary type case here yet, but
+        probably will need to do that in the next patch.
+        (ShouldPassWrapperByReference): Pass interface in to GetNativeType.
+        (GetNativeVectorInnerType): Removed unneeded special case for DOMString.
+        (GetNativeTypeForCallbacks): Changed to take the interface.
+        (GetNativeTypeForMemoization): Ditto.
+        (JSValueToNative): Changed expression for Dictionary (the thing I am working to make
+        obsolete) to name the type so it will work with auto. Added a case for dictionary
+        types and updated the case for enumeration types.
+        (NativeToJSValue): Updated to take an interface rather than an interface name, and to
+        pass that along as needed.
+
+        * bindings/scripts/IDLParser.pm:
+        (Parse): Add dictionaries to a list.
+        (parseDictionary): Put name, extended attributes, and members into the dictionary.
+        (parseDictionaryMembers): Build up a members array.
+        (parseDictionaryMember): Put isOptional, type, name, and default value into the
+        dictionary member.
+
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        Regenerated.
+
+        * bindings/scripts/test/TestObj.idl: Added some test cases that I was using to
+        get the bindings script to work. Right now this is basically identical to the
+        actual use of this in Element.idl, but over time I will modify it to cover more
+        features of dictionaries. Also fixed some incorrect test cases trying to use
+        the type &quot;bool&quot;, which doesn't exist in IDL.
+
+        * dom/Element.cpp:
+        (WebCore::Element::canHaveUserAgentShadowRoot): Added. The existing code used a
+        combination of a virtual function on HTMLElement and type checking. It's better
+        to just use a virtual function on Element.
+        (WebCore::Element::attachShadow): Updated to take a ShadowRootInit struct instead
+        of a Dictionary. Also tweaked the code in a couple other minor ways.
+
+        * dom/Element.h: Added the ShadowRootMode enum class and the ShadowRootInit struct,
+        and changed attachShadow to take ShadowRootInit instead of Dictionary. Also added
+        the private canHaveUserAgentShadowRoot virtual function.
+
+        * dom/Element.idl: Added ShadowRootMode, ShadowRootInit, and used them in as the
+        arguemnt type for attachShadow.
+
+        * html/HTMLElement.h: Made canHaveUserAgentShadowRoot a private override instead
+        of a public virtual function.
+
</ins><span class="cx"> 2016-05-04  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Playback does not pause when locking screen after playing to AirPlay.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -551,9 +551,9 @@
</span><span class="cx"> 
</span><span class="cx"> WEBCORE_EXPORT JSC::JSValue jsArray(JSC::ExecState*, JSDOMGlobalObject*, PassRefPtr&lt;DOMStringList&gt;);
</span><span class="cx"> 
</span><del>-inline PassRefPtr&lt;JSC::ArrayBufferView&gt; toArrayBufferView(JSC::JSValue value)
</del><ins>+inline RefPtr&lt;JSC::ArrayBufferView&gt; toArrayBufferView(JSC::JSValue value)
</ins><span class="cx"> {
</span><del>-    JSC::JSArrayBufferView* wrapper = JSC::jsDynamicCast&lt;JSC::JSArrayBufferView*&gt;(value);
</del><ins>+    auto* wrapper = JSC::jsDynamicCast&lt;JSC::JSArrayBufferView*&gt;(value);
</ins><span class="cx">     if (!wrapper)
</span><span class="cx">         return nullptr;
</span><span class="cx">     return wrapper-&gt;impl();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBuildh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMBuild.h (0 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBuild.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBuild.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+
+Copyright (C) 2016 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+#pragma once
+
+namespace WebCore {
+
+template&lt;typename T&gt; T build(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;typename T, unsigned characterCount&gt; T build(JSC::ExecState&amp;, JSC::JSValue, const char (&amp;propertyName)[characterCount]);
+
+template&lt;typename T, unsigned characterCount&gt; inline T build(JSC::ExecState&amp; state, JSC::JSValue value, const char (&amp;propertyName)[characterCount])
+{
+    return build&lt;T&gt;(state, value.get(&amp;state, JSC::Identifier::fromString(&amp;state, propertyName)));
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> );
</span><span class="cx"> 
</span><span class="cx"> my %enumTypeHash = ();
</span><ins>+my %dictionaryTypes = ();
</ins><span class="cx"> 
</span><span class="cx"> my %typedArrayTypes = (
</span><span class="cx">     &quot;ArrayBuffer&quot; =&gt; 1,
</span><span class="lines">@@ -162,6 +163,7 @@
</span><span class="cx">     require $ifaceName . &quot;.pm&quot;;
</span><span class="cx"> 
</span><span class="cx">     %enumTypeHash = map { $_-&gt;name =&gt; $_-&gt;values } @{$useDocument-&gt;enumerations};
</span><ins>+    %dictionaryTypes = map { $_-&gt;name =&gt; 1 } @{$useDocument-&gt;dictionaries};
</ins><span class="cx"> 
</span><span class="cx">     # Dynamically load external code generation perl module
</span><span class="cx">     $codeGenerator = $ifaceName-&gt;new($object, $writeDependencies, $verbose, $targetIdlFilePath);
</span><span class="lines">@@ -176,9 +178,9 @@
</span><span class="cx">     my $interfaces = $useDocument-&gt;interfaces;
</span><span class="cx">     foreach my $interface (@$interfaces) {
</span><span class="cx">         print &quot;Generating $useGenerator bindings code for IDL interface \&quot;&quot; . $interface-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</span><del>-        # FIXME: Repeating each enumeration for every interface would not work if we actually were using
</del><ins>+        # FIXME: Repeating each enumeration and dictionaries for every interface would not work if we actually were using
</ins><span class="cx">         # multiple interfaces per file, but we aren't, so this is fine for now.
</span><del>-        $codeGenerator-&gt;GenerateInterface($interface, $defines, $useDocument-&gt;enumerations);
</del><ins>+        $codeGenerator-&gt;GenerateInterface($interface, $defines, $useDocument-&gt;enumerations, $useDocument-&gt;dictionaries);
</ins><span class="cx">         $codeGenerator-&gt;WriteData($interface, $useOutputDir, $useOutputHeadersDir);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -324,14 +326,16 @@
</span><span class="cx">     my $object = shift;
</span><span class="cx">     my $type = shift;
</span><span class="cx"> 
</span><ins>+    # FIXME: This is a lot like !IsRefPtrType. Maybe they could share code?
+
</ins><span class="cx">     return 1 if $object-&gt;IsPrimitiveType($type);
</span><ins>+    return 1 if $object-&gt;IsTypedArrayType($type);
+    return 1 if $type eq &quot;Array&quot;;
+    return 1 if $type eq &quot;DOMString&quot;;
+    return 1 if $type eq &quot;DOMTimeStamp&quot;;
+    return 1 if $type eq &quot;SVGNumber&quot;;
+    return 1 if $type eq &quot;any&quot;;
</ins><span class="cx"> 
</span><del>-    # Special case: SVGNumber.h does not exist.
-    return 1 if $type eq &quot;SVGNumber&quot;;
-    
-    # Typed arrays already included by JSDOMBinding.h.
-    return 1 if $object-&gt;IsTypedArrayType($type);
-    
</del><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -390,6 +394,13 @@
</span><span class="cx">     return @{$enumTypeHash{$type}};
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub IsDictionaryType
+{
+    my ($object, $type) = @_;
+
+    return $dictionaryTypes{$type} || 0;
+}
+
</ins><span class="cx"> sub IsNonPointerType
</span><span class="cx"> {
</span><span class="cx">     my $object = shift;
</span><span class="lines">@@ -432,8 +443,9 @@
</span><span class="cx">     my $type = shift;
</span><span class="cx"> 
</span><span class="cx">     return 0 if $object-&gt;IsPrimitiveType($type);
</span><ins>+    return 0 if $object-&gt;IsDictionaryType($type);
+    return 0 if $object-&gt;IsEnumType($type);
</ins><span class="cx">     return 0 if $object-&gt;GetArrayOrSequenceType($type);
</span><del>-    return 0 if $object-&gt;IsEnumType($type);
</del><span class="cx">     return 0 if $type eq &quot;DOMString&quot;;
</span><span class="cx">     return 0 if $type eq &quot;any&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -120,20 +120,15 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateInterface
</span><span class="cx"> {
</span><del>-    my $object = shift;
-    my $interface = shift;
-    my $defines = shift;
-    my $enumerations = shift;
</del><ins>+    my ($object, $interface, $defines, $enumerations, $dictionaries) = @_;
</ins><span class="cx"> 
</span><span class="cx">     $codeGenerator-&gt;LinkOverloadedFunctions($interface);
</span><del>-
-    # Start actual generation
</del><span class="cx">     if ($interface-&gt;isCallback) {
</span><span class="cx">         $object-&gt;GenerateCallbackHeader($interface);
</span><del>-        $object-&gt;GenerateCallbackImplementation($interface, $enumerations);
</del><ins>+        $object-&gt;GenerateCallbackImplementation($interface, $enumerations, $dictionaries);
</ins><span class="cx">     } else {
</span><span class="cx">         $object-&gt;GenerateHeader($interface);
</span><del>-        $object-&gt;GenerateImplementation($interface, $enumerations);
</del><ins>+        $object-&gt;GenerateImplementation($interface, $enumerations, $dictionaries);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -208,21 +203,6 @@
</span><span class="cx">     AddIncludesForType($type, $isCallback, \%headerIncludes);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-my %typesWithoutHeader = (
-    &quot;Array&quot; =&gt; 1,
-    &quot;DOMString&quot; =&gt; 1,
-    &quot;DOMTimeStamp&quot; =&gt; 1,
-    &quot;any&quot; =&gt; 1
-);
-
-sub SkipIncludeHeader
-{
-    my $type = shift;
-
-    return 1 if $codeGenerator-&gt;SkipIncludeHeader($type);
-    return $typesWithoutHeader{$type};
-}
-
</del><span class="cx"> sub GetExportMacroForJSClass
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="lines">@@ -237,7 +217,7 @@
</span><span class="cx">     my $isCallback = shift;
</span><span class="cx">     my $includesRef = shift;
</span><span class="cx"> 
</span><del>-    return if SkipIncludeHeader($type);
</del><ins>+    return if $codeGenerator-&gt;SkipIncludeHeader($type);
</ins><span class="cx">     
</span><span class="cx">     # When we're finished with the one-file-per-class reorganization, we won't need these special cases.
</span><span class="cx">     if ($type eq &quot;XPathNSResolver&quot;) {
</span><span class="lines">@@ -820,35 +800,33 @@
</span><span class="cx">             || IsClassNameWordBoundary($class, -$i) &amp;&amp; substr($class, -$i) eq substr($name, 0, $i));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GetEnumerationClassName
</del><ins>+sub GetNestedClassName
</ins><span class="cx"> {
</span><span class="cx">     my ($interface, $name) = @_;
</span><span class="cx"> 
</span><span class="cx">     my $class = GetImplClassName($interface-&gt;name);
</span><del>-    my $enum = $codeGenerator-&gt;WK_ucfirst($name);
</del><ins>+    my $member = $codeGenerator-&gt;WK_ucfirst($name);
</ins><span class="cx"> 
</span><span class="cx">     # Since the enumeration name will be nested in the class name's namespace, remove any words
</span><span class="cx">     # that happen to match the start or end of the class name. If an enumeration is named TrackType or
</span><span class="cx">     # TextTrackType, and the class is named TextTrack, then we will get a name like TextTrack::Type.
</span><del>-    my $enumLength = length($enum);
</del><ins>+    my $memberLength = length($member);
</ins><span class="cx">     my $longestPrefixLength = 0;
</span><del>-    if ($enum =~ /^[A-Z]./) {
-        for (my $i = 2; $i &lt; $enumLength - 1; $i++) {
-            $longestPrefixLength = $i if IsPrefixRemovable($class, $enum, $i);
</del><ins>+    if ($member =~ /^[A-Z]./) {
+        for (my $i = 2; $i &lt; $memberLength - 1; $i++) {
+            $longestPrefixLength = $i if IsPrefixRemovable($class, $member, $i);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><del>-    $enum = substr($enum, $longestPrefixLength);
</del><ins>+    $member = substr($member, $longestPrefixLength);
</ins><span class="cx"> 
</span><del>-    return &quot;${class}::$enum&quot;;
</del><ins>+    return &quot;${class}::$member&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GetEnumerationClassIdentifier
</del><ins>+sub GetEnumerationClassName
</ins><span class="cx"> {
</span><span class="cx">     my ($interface, $name) = @_;
</span><span class="cx"> 
</span><del>-    my $identifier = GetEnumerationClassName($interface, $name);
-    $identifier =~ s/:://;
-    return $identifier;
</del><ins>+    return GetNestedClassName($interface, $name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetEnumerationValueName
</span><span class="lines">@@ -865,15 +843,20 @@
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $enumerations) = @_;
</span><span class="cx"> 
</span><ins>+    return &quot;&quot; unless @$enumerations;
+
</ins><span class="cx">     # FIXME: Could optimize this to only generate the parts of each enumeration that are actually
</span><span class="cx">     # used, which would require iterating over everything in the interface.
</span><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><ins>+
+    $result .= &quot;template&lt;typename T&gt; Optional&lt;T&gt; parse(ExecState&amp;, JSValue);\n&quot;;
+    $result .= &quot;template&lt;typename T&gt; const char* expectedEnumerationValues();\n\n&quot;;
+
</ins><span class="cx">     foreach my $enumeration (@$enumerations) {
</span><span class="cx">         my $name = $enumeration-&gt;name;
</span><span class="cx"> 
</span><span class="cx">         my $className = GetEnumerationClassName($interface, $name);
</span><del>-        my $classIdentifier = GetEnumerationClassIdentifier($interface, $name);
</del><span class="cx"> 
</span><span class="cx">         # FIXME: A little ugly to have this be a side effect instead of a return value.
</span><span class="cx">         AddToImplIncludes(&quot;&lt;runtime/JSString.h&gt;&quot;);
</span><span class="lines">@@ -881,11 +864,9 @@
</span><span class="cx">         my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($enumeration);
</span><span class="cx">         $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><span class="cx"> 
</span><del>-        # Declare these instead of using &quot;static&quot; because these may be unused and we don't
-        # want to get warnings about them.
</del><ins>+        # Declare this instead of using &quot;static&quot; because it may be unused and we don't
+        # want to get warnings about it.
</ins><span class="cx">         $result .= &quot;JSString* jsStringWithCache(ExecState*, $className);\n&quot;;
</span><del>-        $result .= &quot;Optional&lt;$className&gt; parse$classIdentifier(ExecState&amp;, JSValue);\n&quot;;
-        $result .= &quot;extern const char expectedEnumerationValues${classIdentifier}[];\n\n&quot;;
</del><span class="cx"> 
</span><span class="cx">         # Take an ExecState* instead of an ExecState&amp; to match the jsStringWithCache from JSString.h.
</span><span class="cx">         # FIXME: Change to take VM&amp; instead of ExecState*.
</span><span class="lines">@@ -919,7 +900,7 @@
</span><span class="cx">         # FIXME: Change to take VM&amp; instead of ExecState&amp;.
</span><span class="cx">         # FIXME: Consider using toStringOrNull to make exception checking faster.
</span><span class="cx">         # FIXME: Consider finding a more efficient way to match against all the strings quickly.
</span><del>-        $result .= &quot;Optional&lt;$className&gt; parse$classIdentifier(ExecState&amp; state, JSValue value)\n&quot;;
</del><ins>+        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; parse&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
</ins><span class="cx">         $result .= &quot;{\n&quot;;
</span><span class="cx">         $result .= &quot;    auto stringValue = value.toWTFString(&amp;state);\n&quot;;
</span><span class="cx">         foreach my $value (@{$enumeration-&gt;values}) {
</span><span class="lines">@@ -934,13 +915,68 @@
</span><span class="cx">         $result .= &quot;    return Nullopt;\n&quot;;
</span><span class="cx">         $result .= &quot;}\n\n&quot;;
</span><span class="cx"> 
</span><del>-        $result .= &quot;const char expectedEnumerationValues${classIdentifier}[] = \&quot;\\\&quot;&quot; . join (&quot;\\\&quot;, \\\&quot;&quot;, @{$enumeration-&gt;values}) . &quot;\\\&quot;\&quot;;\n\n&quot;;
</del><ins>+        # FIXME: A little ugly to have this be a side effect instead of a return value.
+        AddToImplIncludes(&quot;JSDOMBuild.h&quot;);
</ins><span class="cx"> 
</span><ins>+        $result .= &quot;template&lt;&gt; $className build&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
+        $result .= &quot;{\n&quot;;
+        $result .= &quot;    auto result = parse&lt;$className&gt;(state, value);\n&quot;;
+        $result .= &quot;    if (UNLIKELY(!result)) {\n&quot;;
+        $result .= &quot;        throwTypeError(&amp;state);\n&quot;;
+        $result .= &quot;        return { };\n&quot;;
+        $result .= &quot;    }\n&quot;;
+        $result .= &quot;    return result.value();\n&quot;;
+        $result .= &quot;}\n\n&quot;;
+
+        $result .= &quot;template&lt;&gt; inline const char* expectedEnumerationValues&lt;$className&gt;()\n&quot;;
+        $result .= &quot;{\n&quot;;
+        $result .= &quot;    return \&quot;\\\&quot;&quot; . join (&quot;\\\&quot;, \\\&quot;&quot;, @{$enumeration-&gt;values}) . &quot;\\\&quot;\&quot;;\n&quot;;
+        $result .= &quot;}\n\n&quot;;
+
</ins><span class="cx">         $result .= &quot;#endif\n\n&quot; if $conditionalString;
</span><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub GetDictionaryClassName
+{
+    my ($interface, $name) = @_;
+
+    return GetNestedClassName($interface, $name);
+}
+
+sub GenerateDictionaryImplementationContent
+{
+    my ($interface, $dictionaries) = @_;
+
+    my $result = &quot;&quot;;
+    foreach my $dictionary (@$dictionaries) {
+        my $name = $dictionary-&gt;name;
+
+        my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+        $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
+
+        my $className = GetDictionaryClassName($interface, $name);
+
+        # FIXME: A little ugly to have this be a side effect instead of a return value.
+        AddToImplIncludes(&quot;JSDOMBuild.h&quot;);
+
+        $result .= &quot;template&lt;&gt; $className build&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
+        $result .= &quot;{\n&quot;;
+        $result .= &quot;    return { \n&quot;;
+
+        foreach my $member (@{$dictionary-&gt;members}) {
+            $result .= &quot;        build&lt;&quot; . GetNativeTypeFromSignature($interface, $member) . &quot;&gt;(state, value, \&quot;&quot; . $member-&gt;name . &quot;\&quot;),\n&quot;;
+        }
+
+        $result .= &quot;    };\n&quot;;
+        $result .= &quot;}\n\n&quot;;
+
+        $result .= &quot;#endif\n\n&quot; if $conditionalString;
+    }
+    return $result;
+}
+
</ins><span class="cx"> sub GenerateHeader
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface) = @_;
</span><span class="lines">@@ -1899,7 +1935,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateImplementation
</span><span class="cx"> {
</span><del>-    my ($object, $interface, $enumerations) = @_;
</del><ins>+    my ($object, $interface, $enumerations, $dictionaries) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $interfaceName = $interface-&gt;name;
</span><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="lines">@@ -1932,6 +1968,7 @@
</span><span class="cx">     push(@implContent, &quot;namespace WebCore {\n\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     push(@implContent, GenerateEnumerationImplementationContent($interface, $enumerations));
</span><ins>+    push(@implContent, GenerateDictionaryImplementationContent($interface, $dictionaries));
</ins><span class="cx"> 
</span><span class="cx">     my @functions = @{$interface-&gt;functions};
</span><span class="cx">     push(@functions, @{$interface-&gt;iterable-&gt;functions}) if $interface-&gt;iterable;
</span><span class="lines">@@ -2528,14 +2565,14 @@
</span><span class="cx">                 push(@implContent, &quot;    JSGlobalObject* globalObject = state-&gt;lexicalGlobalObject();\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    InputCursor&amp; cursor = globalObject-&gt;inputCursor();\n&quot;);
</span><span class="cx"> 
</span><del>-                my $nativeType = GetNativeType($type);
-                my $memoizedType = GetNativeTypeForMemoization($type);
</del><ins>+                my $nativeType = GetNativeType($interface, $type);
+                my $memoizedType = GetNativeTypeForMemoization($interface, $type);
</ins><span class="cx">                 my $exceptionCode = $getterExceptionsWithMessage ? &quot;ec.code&quot; : ($getterExceptions ? &quot;ec&quot; : &quot;0&quot;);
</span><span class="cx">                 push(@implContent, &quot;    static NeverDestroyed&lt;const AtomicString&gt; bindingName(\&quot;$interfaceName.$name\&quot;, AtomicString::ConstructFromLiteral);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    if (cursor.isCapturing()) {\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;        $memoizedType memoizedResult = castedThis-&gt;wrapped().$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;        cursor.appendInput&lt;MemoizedDOMResult&lt;$memoizedType&gt;&gt;(bindingName.get().string(), memoizedResult, $exceptionCode);\n&quot;);
</span><del>-                push(@implContent, &quot;        JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;memoizedResult&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                push(@implContent, &quot;        JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;memoizedResult&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                 push(@implContent, &quot;        setDOMException(state, ec);\n&quot;) if $getterExceptions;
</span><span class="cx">                 push(@implContent, &quot;        return JSValue::encode(result);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    }\n&quot;);
</span><span class="lines">@@ -2545,7 +2582,7 @@
</span><span class="cx">                 push(@implContent, &quot;        MemoizedDOMResultBase* input = cursor.fetchInput&lt;MemoizedDOMResultBase&gt;();\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;        if (input &amp;&amp; input-&gt;convertTo&lt;$memoizedType&gt;(memoizedResult)) {\n&quot;);
</span><span class="cx">                 # FIXME: the generated code should report an error if an input cannot be fetched or converted.
</span><del>-                push(@implContent, &quot;            JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;memoizedResult&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                push(@implContent, &quot;            JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;memoizedResult&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                 push(@implContent, &quot;            setDOMException(state, input-&gt;exceptionCode());\n&quot;) if $getterExceptions;
</span><span class="cx">                 push(@implContent, &quot;            return JSValue::encode(result);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;        }\n&quot;);
</span><span class="lines">@@ -2558,7 +2595,7 @@
</span><span class="cx">             } elsif ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CheckSecurityForNode&quot;}) {
</span><span class="cx">                 $implIncludes{&quot;JSDOMBinding.h&quot;} = 1;
</span><span class="cx">                 push(@implContent, &quot;    auto&amp; impl = castedThis-&gt;wrapped();\n&quot;);
</span><del>-                push(@implContent, &quot;    return JSValue::encode(shouldAllowAccessToNode(state, impl.&quot; . $attribute-&gt;signature-&gt;name . &quot;()) ? &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;impl.$implGetterFunctionName()&quot;, &quot;castedThis&quot;) . &quot; : jsNull());\n&quot;);
</del><ins>+                push(@implContent, &quot;    return JSValue::encode(shouldAllowAccessToNode(state, impl.&quot; . $attribute-&gt;signature-&gt;name . &quot;()) ? &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;impl.$implGetterFunctionName()&quot;, &quot;castedThis&quot;) . &quot; : jsNull());\n&quot;);
</ins><span class="cx">             } elsif ($type eq &quot;EventHandler&quot;) {
</span><span class="cx">                 my $getter = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;WindowEventHandler&quot;} ? &quot;windowEventHandlerAttribute&quot;
</span><span class="cx">                     : $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DocumentEventHandler&quot;} ? &quot;documentEventHandlerAttribute&quot;
</span><span class="lines">@@ -2591,13 +2628,13 @@
</span><span class="cx">                 my @callWithArgs = GenerateCallWith($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CallWith&quot;}, \@implContent, &quot;JSValue::encode(jsUndefined())&quot;);
</span><span class="cx"> 
</span><span class="cx">                 if ($svgListPropertyType) {
</span><del>-                    push(@implContent, &quot;    JSValue result =  &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;castedThis-&gt;wrapped().$implGetterFunctionName(&quot; . (join &quot;, &quot;, @callWithArgs) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                    push(@implContent, &quot;    JSValue result =  &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;castedThis-&gt;wrapped().$implGetterFunctionName(&quot; . (join &quot;, &quot;, @callWithArgs) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                 } elsif ($svgPropertyOrListPropertyType) {
</span><span class="cx">                     push(@implContent, &quot;    $svgPropertyOrListPropertyType&amp; impl = castedThis-&gt;wrapped().propertyReference();\n&quot;);
</span><span class="cx">                     if ($svgPropertyOrListPropertyType eq &quot;float&quot;) { # Special case for JSSVGNumber
</span><del>-                        push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;impl&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                        push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;impl&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                     } else {
</span><del>-                        push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;impl.$implGetterFunctionName(&quot; . (join &quot;, &quot;, @callWithArgs) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                        push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;impl.$implGetterFunctionName(&quot; . (join &quot;, &quot;, @callWithArgs) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">                     }
</span><span class="cx">                 } else {
</span><span class="lines">@@ -2614,7 +2651,7 @@
</span><span class="cx">                     }
</span><span class="cx"> 
</span><span class="cx">                     unshift(@arguments, @callWithArgs);
</span><del>-                    my $jsType = NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;${functionName}(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;);
</del><ins>+                    my $jsType = NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;${functionName}(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;);
</ins><span class="cx">                     push(@implContent, &quot;    auto&amp; impl = castedThis-&gt;wrapped();\n&quot;) if !$attribute-&gt;isStatic;
</span><span class="cx">                     if ($codeGenerator-&gt;IsSVGAnimatedType($type)) {
</span><span class="cx">                         push(@implContent, &quot;    RefPtr&lt;$type&gt; obj = $jsType;\n&quot;);
</span><span class="lines">@@ -2632,10 +2669,10 @@
</span><span class="cx"> 
</span><span class="cx">                 if ($svgPropertyOrListPropertyType) {
</span><span class="cx">                     push(@implContent, &quot;    $svgPropertyOrListPropertyType impl(*castedThis-&gt;wrapped());\n&quot;);
</span><del>-                    push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;impl.$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                    push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;impl.$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                 } else {
</span><span class="cx">                     push(@implContent, &quot;    auto&amp; impl = castedThis-&gt;wrapped();\n&quot;);
</span><del>-                    push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interfaceName, &quot;impl.$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</del><ins>+                    push(@implContent, &quot;    JSValue result = &quot; . NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;impl.$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;) . &quot;;\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 push(@implContent, &quot;    setDOMException(state, ec);\n&quot;);
</span><span class="lines">@@ -2858,7 +2895,7 @@
</span><span class="cx">                 my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $attribute-&gt;signature, &quot;value&quot;, $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;});
</span><span class="cx">                 if ($codeGenerator-&gt;IsWrapperType($type) &amp;&amp; $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;StrictTypeChecking&quot;} &amp;&amp; $attribute-&gt;signature-&gt;isNullable) {
</span><span class="cx">                     $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><del>-                    push(@implContent, &quot;    &quot; . GetNativeTypeFromSignature($attribute-&gt;signature) . &quot; nativeValue = nullptr;\n&quot;);
</del><ins>+                    push(@implContent, &quot;    &quot; . GetNativeTypeFromSignature($interface, $attribute-&gt;signature) . &quot; nativeValue = nullptr;\n&quot;);
</ins><span class="cx">                     push(@implContent, &quot;    if (!value.isUndefinedOrNull()) {\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;        nativeValue = $nativeValue;\n&quot;);
</span><span class="cx">                     if ($mayThrowException) {
</span><span class="lines">@@ -2871,7 +2908,7 @@
</span><span class="cx">                     push(@implContent, &quot;        }\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;    }\n&quot;);
</span><span class="cx">                 } else {
</span><del>-                    push(@implContent, &quot;    &quot; . GetNativeTypeFromSignature($attribute-&gt;signature) . &quot; nativeValue = $nativeValue;\n&quot;);
</del><ins>+                    push(@implContent, &quot;    auto nativeValue = $nativeValue;\n&quot;);
</ins><span class="cx">                     if ($mayThrowException) {
</span><span class="cx">                         push(@implContent, &quot;    if (UNLIKELY(state-&gt;hadException()))\n&quot;);
</span><span class="cx">                         push(@implContent, &quot;        return false;\n&quot;);
</span><span class="lines">@@ -2934,7 +2971,7 @@
</span><span class="cx">                     } elsif ($codeGenerator-&gt;IsEnumType($type)) {
</span><span class="cx">                         push(@arguments, &quot;nativeValue.value()&quot;);
</span><span class="cx">                     } else {
</span><del>-                        push(@arguments, $shouldPassByReference ? &quot;*nativeValue&quot; : &quot;nativeValue&quot;);
</del><ins>+                        push(@arguments, $shouldPassByReference ? &quot;*nativeValue&quot; : &quot;WTFMove(nativeValue)&quot;);
</ins><span class="cx">                     }
</span><span class="cx">                     if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedBy&quot;}) {
</span><span class="cx">                         my $implementedBy = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedBy&quot;};
</span><span class="lines">@@ -3083,7 +3120,7 @@
</span><span class="cx"> 
</span><span class="cx">                     my $numParameters = @{$function-&gt;parameters};
</span><span class="cx">                     my ($functionString, $dummy) = GenerateParametersCheck(\@implContent, $function, $interface, $numParameters, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType);
</span><del>-                    GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interfaceName);
</del><ins>+                    GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interface);
</ins><span class="cx">                 }
</span><span class="cx">             } else {
</span><span class="cx">                 GenerateFunctionCastedThis($interface, $className, $function);
</span><span class="lines">@@ -3137,7 +3174,7 @@
</span><span class="cx"> 
</span><span class="cx">                         my $numParameters = @{$function-&gt;parameters};
</span><span class="cx">                         my ($functionString, $dummy) = GenerateParametersCheck(\@implContent, $function, $interface, $numParameters, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType);
</span><del>-                        GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interfaceName);
</del><ins>+                        GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interface);
</ins><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -3629,7 +3666,7 @@
</span><span class="cx">             if ($argType eq &quot;DOMString&quot;) {
</span><span class="cx">                 $nativeElementType = &quot;String&quot;;
</span><span class="cx">             } else {
</span><del>-                $nativeElementType = GetNativeType($argType);
</del><ins>+                $nativeElementType = GetNativeType($interface, $argType);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             if (!IsNativeType($argType)) {
</span><span class="lines">@@ -3647,7 +3684,6 @@
</span><span class="cx">             }
</span><span class="cx">         } elsif ($codeGenerator-&gt;IsEnumType($argType)) {
</span><span class="cx">             my $className = GetEnumerationClassName($interface, $argType);
</span><del>-            my $classIdentifier = GetEnumerationClassIdentifier($interface, $argType);
</del><span class="cx"> 
</span><span class="cx">             $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><span class="cx"> 
</span><span class="lines">@@ -3675,11 +3711,11 @@
</span><span class="cx">                 $indent = &quot;    &quot;;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            push(@$outputArray, &quot;$indent    $defineOptionalValue = parse$classIdentifier(*state, ${name}Value);\n&quot;);
</del><ins>+            push(@$outputArray, &quot;$indent    $defineOptionalValue = parse&lt;$className&gt;(*state, ${name}Value);\n&quot;);
</ins><span class="cx">             push(@$outputArray, &quot;$indent    if (UNLIKELY(state-&gt;hadException()))\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent        return JSValue::encode(jsUndefined());\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent    if (UNLIKELY(!$optionalValue))\n&quot;);
</span><del>-            push(@$outputArray, &quot;$indent        return throwArgumentMustBeEnumError(*state, $argsIndex, \&quot;$name\&quot;, \&quot;$interfaceName\&quot;, $quotedFunctionName, expectedEnumerationValues$classIdentifier);\n&quot;);
</del><ins>+            push(@$outputArray, &quot;$indent        return throwArgumentMustBeEnumError(*state, $argsIndex, \&quot;$name\&quot;, \&quot;$interfaceName\&quot;, $quotedFunctionName, expectedEnumerationValues&lt;$className&gt;());\n&quot;);
</ins><span class="cx">             push(@$outputArray, &quot;$indent    $name = optionalValue.value();\n&quot;) if $optionalValue ne $name;
</span><span class="cx"> 
</span><span class="cx">             push(@$outputArray, &quot;    }\n&quot;) if $indent ne &quot;&quot;;
</span><span class="lines">@@ -3709,7 +3745,7 @@
</span><span class="cx">             } else {
</span><span class="cx">                 my $outer;
</span><span class="cx">                 my $inner;
</span><del>-                my $nativeType = GetNativeTypeFromSignature($parameter);
</del><ins>+                my $nativeType = GetNativeTypeFromSignature($interface, $parameter);
</ins><span class="cx"> 
</span><span class="cx">                 if ($optional &amp;&amp; defined($parameter-&gt;default) &amp;&amp; !WillConvertUndefinedToDefaultParameterValue($parameter-&gt;type, $parameter-&gt;default)) {
</span><span class="cx">                     my $defaultValue = $parameter-&gt;default;
</span><span class="lines">@@ -3736,16 +3772,15 @@
</span><span class="cx">                 } elsif ($optional &amp;&amp; !defined($parameter-&gt;default)) {
</span><span class="cx">                     # Use WTF::Optional&lt;&gt;() for optional parameters that are missing or undefined and that do not have
</span><span class="cx">                     # a default value in the IDL.
</span><del>-                    my $defaultValue = &quot;Optional&lt;$nativeType&gt;()&quot;;
-                    $nativeType = &quot;Optional&lt;$nativeType&gt;&quot;;
-                    $outer = &quot;state-&gt;argument($argsIndex).isUndefined() ? $defaultValue : &quot;;
</del><ins>+                    $outer = &quot;state-&gt;argument($argsIndex).isUndefined() ? Optional&lt;$nativeType&gt;() : &quot;;
</ins><span class="cx">                     $inner = &quot;state-&gt;uncheckedArgument($argsIndex)&quot;;
</span><span class="cx">                 } else {
</span><span class="cx">                     $outer = &quot;&quot;;
</span><span class="cx">                     $inner = &quot;state-&gt;argument($argsIndex)&quot;;
</span><span class="cx">                 }
</span><span class="cx">                 my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $parameter, $inner, $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;});
</span><del>-                push(@$outputArray, &quot;    $nativeType $name = ${outer}${nativeValue};\n&quot;);
</del><ins>+                push(@$outputArray, &quot;    auto $name = ${outer}${nativeValue};\n&quot;);
+                $value = &quot;WTFMove($name)&quot;;
</ins><span class="cx">                 if ($mayThrowException) {
</span><span class="cx">                     push(@$outputArray, &quot;    if (UNLIKELY(state-&gt;hadException()))\n&quot;);
</span><span class="cx">                     push(@$outputArray, &quot;        return JSValue::encode(jsUndefined());\n&quot;);
</span><span class="lines">@@ -3844,9 +3879,9 @@
</span><span class="cx">         foreach my $function (@{$interface-&gt;functions}) {
</span><span class="cx">             my @arguments = ();
</span><span class="cx">             foreach my $parameter (@{$function-&gt;parameters}) {
</span><del>-                push(@arguments, GetNativeTypeForCallbacks($parameter-&gt;type) . &quot; &quot; . $parameter-&gt;name);
</del><ins>+                push(@arguments, GetNativeTypeForCallbacks($interface, $parameter-&gt;type) . &quot; &quot; . $parameter-&gt;name);
</ins><span class="cx">             }
</span><del>-            push(@headerContent, &quot;    virtual &quot; . GetNativeTypeForCallbacks($function-&gt;signature-&gt;type) . &quot; &quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</del><ins>+            push(@headerContent, &quot;    virtual &quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;type) . &quot; &quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3978,20 +4013,20 @@
</span><span class="cx">         push(@implContent, &quot;\n// Functions\n&quot;);
</span><span class="cx">         foreach my $function (@{$interface-&gt;functions}) {
</span><span class="cx">             my @params = @{$function-&gt;parameters};
</span><del>-            if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Custom&quot;} || GetNativeType($function-&gt;signature-&gt;type) ne &quot;bool&quot;) {
</del><ins>+            if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Custom&quot;} || GetNativeType($interface, $function-&gt;signature-&gt;type) ne &quot;bool&quot;) {
</ins><span class="cx">                 next;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             AddIncludesForTypeInImpl($function-&gt;signature-&gt;type);
</span><span class="cx">             my $functionName = $function-&gt;signature-&gt;name;
</span><del>-            push(@implContent, &quot;\n&quot; . GetNativeTypeForCallbacks($function-&gt;signature-&gt;type) . &quot; ${className}::${functionName}(&quot;);
</del><ins>+            push(@implContent, &quot;\n&quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;type) . &quot; ${className}::${functionName}(&quot;);
</ins><span class="cx"> 
</span><span class="cx">             my @args = ();
</span><span class="cx">             my @argsCheck = ();
</span><span class="cx">             foreach my $param (@params) {
</span><span class="cx">                 my $paramName = $param-&gt;name;
</span><span class="cx">                 AddIncludesForTypeInImpl($param-&gt;type, 1);
</span><del>-                push(@args, GetNativeTypeForCallbacks($param-&gt;type) . &quot; &quot; . $paramName);
</del><ins>+                push(@args, GetNativeTypeForCallbacks($interface, $param-&gt;type) . &quot; &quot; . $paramName);
</ins><span class="cx">             }
</span><span class="cx">             push(@implContent, join(&quot;, &quot;, @args));
</span><span class="cx">             push(@implContent, &quot;)\n&quot;);
</span><span class="lines">@@ -4007,7 +4042,7 @@
</span><span class="cx"> 
</span><span class="cx">             foreach my $param (@params) {
</span><span class="cx">                 my $paramName = $param-&gt;name;
</span><del>-                push(@implContent, &quot;    args.append(&quot; . NativeToJSValue($param, 1, $interfaceName, $paramName, &quot;m_data&quot;) . &quot;);\n&quot;);
</del><ins>+                push(@implContent, &quot;    args.append(&quot; . NativeToJSValue($param, 1, $interface, $paramName, &quot;m_data&quot;) . &quot;);\n&quot;);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             push(@implContent, &quot;\n    NakedPtr&lt;Exception&gt; returnedException;\n&quot;);
</span><span class="lines">@@ -4056,11 +4091,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateImplementationFunctionCall()
</span><span class="cx"> {
</span><del>-    my $function = shift;
-    my $functionString = shift;
-    my $indent = shift;
-    my $svgPropertyType = shift;
-    my $interfaceName = shift;
</del><ins>+    my ($function, $functionString, $indent, $svgPropertyType, $interface) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $nondeterministic = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Nondeterministic&quot;};
</span><span class="cx">     my $raisesExceptionWithMessage = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</span><span class="lines">@@ -4104,9 +4135,9 @@
</span><span class="cx">             AddToImplIncludes(&quot;&lt;replay/InputCursor.h&gt;&quot;, &quot;WEB_REPLAY&quot;);
</span><span class="cx">             AddToImplIncludes(&quot;&lt;wtf/NeverDestroyed.h&gt;&quot;, &quot;WEB_REPLAY&quot;);
</span><span class="cx"> 
</span><del>-            my $nativeType = GetNativeTypeFromSignature($function-&gt;signature);
-            my $memoizedType = GetNativeTypeForMemoization($function-&gt;signature-&gt;type);
-            my $bindingName = $interfaceName . &quot;.&quot; . $function-&gt;signature-&gt;name;
</del><ins>+            my $nativeType = GetNativeTypeFromSignature($interface, $function-&gt;signature);
+            my $memoizedType = GetNativeTypeForMemoization($interface, $function-&gt;signature-&gt;type);
+            my $bindingName = $interface-&gt;name . &quot;.&quot; . $function-&gt;signature-&gt;name;
</ins><span class="cx">             push(@implContent, $indent . &quot;JSValue result;\n&quot;);
</span><span class="cx">             push(@implContent, &quot;#if ENABLE(WEB_REPLAY)\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;InputCursor&amp; cursor = state-&gt;lexicalGlobalObject()-&gt;inputCursor();\n&quot;);
</span><span class="lines">@@ -4115,24 +4146,24 @@
</span><span class="cx">             push(@implContent, $indent . &quot;    $nativeType memoizedResult = $functionString;\n&quot;);
</span><span class="cx">             my $exceptionCode = $raisesExceptionWithMessage ? &quot;ec.code&quot; : ($raisesException ? &quot;ec&quot; : &quot;0&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    cursor.appendInput&lt;MemoizedDOMResult&lt;$memoizedType&gt;&gt;(bindingName.get().string(), memoizedResult, $exceptionCode);\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;    result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;    result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">             push(@implContent, $indent . &quot;} else if (cursor.isReplaying()) {\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    MemoizedDOMResultBase* input = cursor.fetchInput&lt;MemoizedDOMResultBase&gt;();\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    $memoizedType memoizedResult;\n&quot;);
</span><span class="cx">             # FIXME: the generated code should report an error if an input cannot be fetched or converted.
</span><span class="cx">             push(@implContent, $indent . &quot;    if (input &amp;&amp; input-&gt;convertTo&lt;$memoizedType&gt;(memoizedResult)) {\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">             push(@implContent, $indent . &quot;        ec.code = input-&gt;exceptionCode();\n&quot;) if $raisesExceptionWithMessage;
</span><span class="cx">             push(@implContent, $indent . &quot;        ec = input-&gt;exceptionCode();\n&quot;) if $raisesException &amp;&amp; !$raisesExceptionWithMessage;
</span><span class="cx">             push(@implContent, $indent . &quot;    } else\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, $functionString, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">             push(@implContent, $indent . &quot;} else\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;    result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;    result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, $functionString, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;#else\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, $functionString, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;#endif\n&quot;);
</span><span class="cx">         } else {
</span><del>-            push(@implContent, $indent . &quot;JSValue result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</del><ins>+            push(@implContent, $indent . &quot;JSValue result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interface, $functionString, $thisObject) . &quot;;\n&quot;);
</ins><span class="cx">         }
</span><span class="cx">         push(@implContent, &quot;\n&quot; . $indent . &quot;setDOMException(state, ec);\n&quot;) if $raisesException;
</span><span class="cx"> 
</span><span class="lines">@@ -4200,14 +4231,14 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetNativeTypeFromSignature
</span><span class="cx"> {
</span><del>-    my $signature = shift;
-    my $type = $signature-&gt;type;
</del><ins>+    my ($interface, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return GetNativeType($type);
</del><ins>+    return GetNativeType($interface, $signature-&gt;type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> my %nativeType = (
</span><span class="cx">     &quot;DOMString&quot; =&gt; &quot;String&quot;,
</span><ins>+    &quot;DOMStringList&quot; =&gt; &quot;RefPtr&lt;DOMStringList&gt;&quot;,
</ins><span class="cx">     &quot;DOMTimeStamp&quot; =&gt; &quot;DOMTimeStamp&quot;,
</span><span class="cx">     &quot;Date&quot; =&gt; &quot;double&quot;,
</span><span class="cx">     &quot;Dictionary&quot; =&gt; &quot;Dictionary&quot;,
</span><span class="lines">@@ -4231,22 +4262,20 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetNativeType
</span><span class="cx"> {
</span><del>-    my $type = shift;
</del><ins>+    my ($interface, $type) = @_;
</ins><span class="cx"> 
</span><del>-    # FIXME: Maybe we can start using &quot;auto&quot; for most of these?
-
-    my $svgNativeType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
-    return &quot;${svgNativeType}*&quot; if $svgNativeType;
-    return &quot;RefPtr&lt;DOMStringList&gt;&quot; if $type eq &quot;DOMStringList&quot;;
-    return &quot;RefPtr&lt;${type}&gt;&quot; if $codeGenerator-&gt;IsTypedArrayType($type) and not $type eq &quot;ArrayBuffer&quot;;
</del><span class="cx">     return $nativeType{$type} if exists $nativeType{$type};
</span><span class="cx"> 
</span><ins>+    return GetEnumerationClassName($interface, $type) if $codeGenerator-&gt;IsEnumType($type);
+
+    my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
+    return &quot;${tearOffType}*&quot; if $tearOffType;
+
+    return &quot;RefPtr&lt;${type}&gt;&quot; if $codeGenerator-&gt;IsTypedArrayType($type) and $type ne &quot;ArrayBuffer&quot;;
+
</ins><span class="cx">     my $arrayOrSequenceType = $codeGenerator-&gt;GetArrayOrSequenceType($type);
</span><del>-
</del><span class="cx">     return &quot;Vector&lt;&quot; . GetNativeVectorInnerType($arrayOrSequenceType) . &quot;&gt;&quot; if $arrayOrSequenceType;
</span><del>-    return &quot;auto&quot; if $codeGenerator-&gt;IsEnumType($type);
</del><span class="cx"> 
</span><del>-    # For all other types, the native type is a pointer with same type name as the IDL type.
</del><span class="cx">     return &quot;${type}*&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4255,8 +4284,7 @@
</span><span class="cx">     my $parameter = shift;
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><del>-    my $nativeType = GetNativeType($parameter-&gt;type);
-
</del><ins>+    my $nativeType = GetNativeType($interface, $parameter-&gt;type);
</ins><span class="cx">     return $codeGenerator-&gt;ShouldPassWrapperByReference($parameter, $interface) &amp;&amp; (substr($nativeType, -1) eq '*' || $nativeType =~ /^RefPtr/);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4264,27 +4292,25 @@
</span><span class="cx"> {
</span><span class="cx">     my $arrayOrSequenceType = shift;
</span><span class="cx"> 
</span><del>-    return &quot;String&quot; if $arrayOrSequenceType eq &quot;DOMString&quot;;
</del><span class="cx">     return $nativeType{$arrayOrSequenceType} if exists $nativeType{$arrayOrSequenceType};
</span><span class="cx">     return &quot;RefPtr&lt;${arrayOrSequenceType}&gt;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetNativeTypeForCallbacks
</span><span class="cx"> {
</span><del>-    my $type = shift;
</del><ins>+    my ($interface, $type) = @_;
+
</ins><span class="cx">     return &quot;PassRefPtr&lt;SerializedScriptValue&gt;&quot; if $type eq &quot;SerializedScriptValue&quot;;
</span><span class="cx">     return &quot;PassRefPtr&lt;DOMStringList&gt;&quot; if $type eq &quot;DOMStringList&quot;;
</span><span class="cx">     return &quot;const String&amp;&quot; if $type eq &quot;DOMString&quot;;
</span><del>-
-    return GetNativeType($type);
</del><ins>+    return GetNativeType($interface, $type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetNativeTypeForMemoization
</span><span class="cx"> {
</span><del>-    my $type = shift;
-    return &quot;String&quot; if $type eq &quot;DOMString&quot;;
</del><ins>+    my ($interface, $type) = @_;
</ins><span class="cx"> 
</span><del>-    return GetNativeType($type);
</del><ins>+    return GetNativeType($interface, $type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetSVGPropertyTypes
</span><span class="lines">@@ -4373,7 +4399,7 @@
</span><span class="cx"> 
</span><span class="cx">     if ($type eq &quot;Dictionary&quot;) {
</span><span class="cx">         AddToImplIncludes(&quot;Dictionary.h&quot;, $conditional);
</span><del>-        return (&quot;{ state, $value }&quot;, 0);
</del><ins>+        return (&quot;Dictionary(state, $value)&quot;, 0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     my $arrayOrSequenceType = $codeGenerator-&gt;GetArrayOrSequenceType($type);
</span><span class="lines">@@ -4393,7 +4419,8 @@
</span><span class="cx">     return (&quot;valueToDate(state, $value)&quot;, 1) if $type eq &quot;Date&quot;;
</span><span class="cx"> 
</span><span class="cx">     return (&quot;to$type($value)&quot;, 1) if $codeGenerator-&gt;IsTypedArrayType($type);
</span><del>-    return (&quot;parse&quot; . GetEnumerationClassIdentifier($interface, $type) . &quot;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
</del><ins>+    return (&quot;parse&lt;&quot; . GetEnumerationClassName($interface, $type) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
+    return (&quot;build&lt;&quot; . GetDictionaryClassName($interface, $type) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsDictionaryType($type);
</ins><span class="cx"> 
</span><span class="cx">     AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
</span><span class="cx"> 
</span><span class="lines">@@ -4405,11 +4432,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValue
</span><span class="cx"> {
</span><del>-    my $signature = shift;
-    my $inFunctionCall = shift;
-    my $interfaceName = shift;
-    my $value = shift;
-    my $thisValue = shift;
</del><ins>+    my ($signature, $inFunctionCall, $interface, $value, $thisValue) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $conditional = $signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
</span><span class="cx">     my $type = $signature-&gt;type;
</span><span class="lines">@@ -4481,28 +4504,29 @@
</span><span class="cx"> 
</span><span class="cx">     return $value if $codeGenerator-&gt;IsSVGAnimatedType($type);
</span><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsSVGAnimatedType($interfaceName) or ($interfaceName eq &quot;SVGViewSpec&quot; and $type eq &quot;SVGTransformList&quot;)) {
</del><ins>+    if ($codeGenerator-&gt;IsSVGAnimatedType($interface-&gt;name) or ($interface-&gt;name eq &quot;SVGViewSpec&quot; and $type eq &quot;SVGTransformList&quot;)) {
</ins><span class="cx">         # Convert from abstract RefPtr&lt;ListProperty&gt; to real type, so the right toJS() method can be invoked.
</span><del>-        $value = &quot;static_cast&lt;&quot; . GetNativeType($type) . &quot;&gt;($value.get())&quot;;
-    } elsif ($interfaceName eq &quot;SVGViewSpec&quot;) {
</del><ins>+        $value = &quot;static_cast&lt;&quot; . GetNativeType($interface, $type) . &quot;&gt;($value.get())&quot;;
+    } elsif ($interface-&gt;name eq &quot;SVGViewSpec&quot;) {
</ins><span class="cx">         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
</span><del>-        $value = &quot;static_cast&lt;&quot; . GetNativeType($type) . &quot;&gt;($value)&quot;;
-    } elsif ($codeGenerator-&gt;IsSVGTypeNeedingTearOff($type) and not $interfaceName =~ /List$/) {
</del><ins>+        $value = &quot;static_cast&lt;&quot; . GetNativeType($interface, $type) . &quot;&gt;($value)&quot;;
+    } elsif ($codeGenerator-&gt;IsSVGTypeNeedingTearOff($type) and not $interface-&gt;name =~ /List$/) {
</ins><span class="cx">         my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
</span><span class="cx">         if ($codeGenerator-&gt;IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and !$inFunctionCall and not defined $signature-&gt;extendedAttributes-&gt;{&quot;Immutable&quot;}) {
</span><span class="cx">             my $getter = $value;
</span><span class="cx">             $getter =~ s/impl\.//;
</span><span class="cx">             $getter =~ s/impl-&gt;//;
</span><span class="cx">             $getter =~ s/\(\)//;
</span><del>-            my $updateMethod = &quot;&amp;${interfaceName}::update&quot; . $codeGenerator-&gt;WK_ucfirst($getter);
</del><ins>+            my $updateMethod = &quot;&amp;&quot; . $interface-&gt;name . &quot;::update&quot; . $codeGenerator-&gt;WK_ucfirst($getter);
</ins><span class="cx"> 
</span><del>-            my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interfaceName);
</del><ins>+            my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interface-&gt;name);
</ins><span class="cx">             if ($selfIsTearOffType) {
</span><span class="cx">                 # FIXME: Why SVGMatrix specifically?
</span><span class="cx">                 AddToImplIncludes(&quot;SVGMatrixTearOff.h&quot;, $conditional);
</span><span class="cx">                 $value = &quot;SVGMatrixTearOff::create(castedThis-&gt;wrapped(), $value)&quot;;
</span><span class="cx">             } else {
</span><span class="cx">                 AddToImplIncludes(&quot;SVGStaticPropertyTearOff.h&quot;, $conditional);
</span><ins>+                my $interfaceName = $interface-&gt;name;
</ins><span class="cx">                 $tearOffType =~ s/SVGPropertyTearOff&lt;/SVGStaticPropertyTearOff&lt;$interfaceName, /;
</span><span class="cx">                 $value = &quot;${tearOffType}::create(impl, $value, $updateMethod)&quot;;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLParserpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -35,9 +35,10 @@
</span><span class="cx"> 
</span><span class="cx"> # Used to represent a parsed IDL document
</span><span class="cx"> struct( idlDocument =&gt; {
</span><del>-    interfaces =&gt; '@', # All parsed interfaces
-    enumerations =&gt; '@', # All parsed enumerations
-    fileName =&gt; '$', # file name
</del><ins>+    interfaces =&gt; '@', # List of 'domInterface'
+    enumerations =&gt; '@', # List of 'domEnum'
+    dictionaries =&gt; '@', # List of 'domDictionary'
+    fileName =&gt; '$',
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> # Used to represent 'interface' blocks
</span><span class="lines">@@ -110,6 +111,12 @@
</span><span class="cx">     extendedAttributes =&gt; '$',
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+struct( domDictionary =&gt; {
+    name =&gt; '$',
+    members =&gt; '@', # List of 'domSignature'
+    extendedAttributes =&gt; '$',
+});
+
</ins><span class="cx"> struct( Token =&gt; {
</span><span class="cx">     type =&gt; '$', # type of token
</span><span class="cx">     value =&gt; '$' # value of token
</span><span class="lines">@@ -217,6 +224,8 @@
</span><span class="cx">             push(@{$document-&gt;interfaces}, $definition);
</span><span class="cx">         } elsif (ref($definition) eq &quot;domEnum&quot;) {
</span><span class="cx">             push(@{$document-&gt;enumerations}, $definition);
</span><ins>+        } elsif (ref($definition) eq &quot;domDictionary&quot;) {
+            push(@{$document-&gt;dictionaries}, $definition);
</ins><span class="cx">         } else {
</span><span class="cx">             die &quot;Unrecognized IDL definition kind: \&quot;&quot; . ref($definition) . &quot;\&quot;&quot;;
</span><span class="cx">         }
</span><span class="lines">@@ -623,14 +632,18 @@
</span><span class="cx"> 
</span><span class="cx">     my $next = $self-&gt;nextToken();
</span><span class="cx">     if ($next-&gt;value() eq &quot;dictionary&quot;) {
</span><ins>+        my $dictionary = domDictionary-&gt;new();
+        $dictionary-&gt;extendedAttributes($extendedAttributeList);
</ins><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;dictionary&quot;, __LINE__);
</span><del>-        $self-&gt;assertTokenType($self-&gt;getToken(), IdentifierToken);
</del><ins>+        my $nameToken = $self-&gt;getToken();
+        $self-&gt;assertTokenType($nameToken, IdentifierToken);
+        $dictionary-&gt;name($nameToken-&gt;value());
</ins><span class="cx">         $self-&gt;parseInheritance();
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;{&quot;, __LINE__);
</span><del>-        $self-&gt;parseDictionaryMembers();
</del><ins>+        $dictionary-&gt;members($self-&gt;parseDictionaryMembers());
</ins><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;}&quot;, __LINE__);
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;;&quot;, __LINE__);
</span><del>-        return;
</del><ins>+        return $dictionary;
</ins><span class="cx">     }
</span><span class="cx">     $self-&gt;assertUnexpectedToken($next-&gt;value(), __LINE__);
</span><span class="cx"> }
</span><span class="lines">@@ -639,15 +652,19 @@
</span><span class="cx"> {
</span><span class="cx">     my $self = shift;
</span><span class="cx"> 
</span><ins>+    my @members = ();
+
</ins><span class="cx">     while (1) {
</span><span class="cx">         my $extendedAttributeList = $self-&gt;parseExtendedAttributeListAllowEmpty();
</span><span class="cx">         my $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;type() == IdentifierToken || $next-&gt;value() =~ /$nextExceptionField_1/) {
</span><del>-            $self-&gt;parseDictionaryMember($extendedAttributeList);
</del><ins>+            push(@members, $self-&gt;parseDictionaryMember($extendedAttributeList));
</ins><span class="cx">         } else {
</span><span class="cx">             last;
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+
+    return \@members;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub parseDictionaryMember
</span><span class="lines">@@ -657,11 +674,20 @@
</span><span class="cx"> 
</span><span class="cx">     my $next = $self-&gt;nextToken();
</span><span class="cx">     if ($next-&gt;type() == IdentifierToken || $next-&gt;value() =~ /$nextExceptionField_1/) {
</span><del>-        $self-&gt;parseType();
-        $self-&gt;assertTokenType($self-&gt;getToken(), IdentifierToken);
-        $self-&gt;parseDefault();
</del><ins>+        my $member = domSignature-&gt;new();
+        if ($next-&gt;value ne &quot;required&quot;) {
+            $member-&gt;isOptional(1);
+        } else {
+            $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;required&quot;, __LINE__);
+            $member-&gt;isOptional(0);
+        }
+        $member-&gt;type($self-&gt;parseType());
+        my $nameToken = $self-&gt;getToken();
+        $self-&gt;assertTokenType($nameToken, IdentifierToken);
+        $member-&gt;name($nameToken-&gt;value);
+        $member-&gt;default($self-&gt;parseDefault());
</ins><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;;&quot;, __LINE__);
</span><del>-        return;
</del><ins>+        return $member;
</ins><span class="cx">     }
</span><span class="cx">     $self-&gt;assertUnexpectedToken($next-&gt;value(), __LINE__);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -34,10 +34,10 @@
</span><span class="cx"> #include &quot;WebKitDOMNodePrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMSVGPointPrivate.h&quot;
</span><ins>+#include &quot;WebKitDOMShadowRootInitPrivate.h&quot;
</ins><span class="cx"> #include &quot;WebKitDOMTestEnumTypePrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMTestNodePrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMTestObjPrivate.h&quot;
</span><del>-#include &quot;WebKitDOMboolPrivate.h&quot;
</del><span class="cx"> #include &quot;gobject/ConvertToUTF8String.h&quot;
</span><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="lines">@@ -1925,40 +1925,40 @@
</span><span class="cx">     item-&gt;banana();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebKitDOMbool* webkit_dom_test_obj_strict_function(WebKitDOMTestObj* self, const gchar* str, gfloat a, glong b, GError** error)
</del><ins>+gboolean webkit_dom_test_obj_strict_function(WebKitDOMTestObj* self, const gchar* str, gfloat a, glong b, GError** error)
</ins><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><del>-    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
-    g_return_val_if_fail(str, 0);
-    g_return_val_if_fail(!error || !*error, 0);
</del><ins>+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), FALSE);
+    g_return_val_if_fail(str, FALSE);
+    g_return_val_if_fail(!error || !*error, FALSE);
</ins><span class="cx">     WebCore::TestObj* item = WebKit::core(self);
</span><span class="cx">     WTF::String convertedStr = WTF::String::fromUTF8(str);
</span><span class="cx">     WebCore::ExceptionCode ec = 0;
</span><del>-    RefPtr&lt;WebCore::bool&gt; gobjectResult = WTF::getPtr(item-&gt;strictFunction(convertedStr, a, b, ec));
</del><ins>+    gboolean result = item-&gt;strictFunction(convertedStr, a, b, ec);
</ins><span class="cx">     if (ec) {
</span><span class="cx">         WebCore::ExceptionCodeDescription ecdesc(ec);
</span><span class="cx">         g_set_error_literal(error, g_quark_from_string(&quot;WEBKIT_DOM&quot;), ecdesc.code, ecdesc.name);
</span><span class="cx">     }
</span><del>-    return WebKit::kit(gobjectResult.get());
</del><ins>+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebKitDOMbool* webkit_dom_test_obj_strict_function_with_array(WebKitDOMTestObj* self, WebKitDOMTestObj* objArg, glong array, GError** error)
</del><ins>+gboolean webkit_dom_test_obj_strict_function_with_array(WebKitDOMTestObj* self, WebKitDOMTestObj* objArg, glong array, GError** error)
</ins><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><del>-    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
-    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(objArg), 0);
-    g_return_val_if_fail(WEBKIT_DOM_IS_LONG[](array), 0);
-    g_return_val_if_fail(!error || !*error, 0);
</del><ins>+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), FALSE);
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(objArg), FALSE);
+    g_return_val_if_fail(WEBKIT_DOM_IS_LONG[](array), FALSE);
+    g_return_val_if_fail(!error || !*error, FALSE);
</ins><span class="cx">     WebCore::TestObj* item = WebKit::core(self);
</span><span class="cx">     WebCore::TestObj* convertedObjArg = WebKit::core(objArg);
</span><span class="cx">     WebCore::long[]* convertedArray = WebKit::core(array);
</span><span class="cx">     WebCore::ExceptionCode ec = 0;
</span><del>-    RefPtr&lt;WebCore::bool&gt; gobjectResult = WTF::getPtr(item-&gt;strictFunctionWithArray(*convertedObjArg, array, ec));
</del><ins>+    gboolean result = item-&gt;strictFunctionWithArray(*convertedObjArg, array, ec);
</ins><span class="cx">     if (ec) {
</span><span class="cx">         WebCore::ExceptionCodeDescription ecdesc(ec);
</span><span class="cx">         g_set_error_literal(error, g_quark_from_string(&quot;WEBKIT_DOM&quot;), ecdesc.code, ecdesc.name);
</span><span class="cx">     }
</span><del>-    return WebKit::kit(gobjectResult.get());
</del><ins>+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void webkit_dom_test_obj_variadic_string_method(WebKitDOMTestObj* self, const gchar* head, const gchar* tail)
</span><span class="lines">@@ -2001,6 +2001,16 @@
</span><span class="cx">     item-&gt;any(a, b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkit_dom_test_obj_attach_shadow_root(WebKitDOMTestObj* self, WebKitDOMShadowRootInit* init)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_SHADOW_ROOT_INIT(init));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::ShadowRootInit* convertedInit = WebKit::core(init);
+    item-&gt;attachShadowRoot(convertedInit);
+}
+
</ins><span class="cx"> glong webkit_dom_test_obj_get_read_only_long_attr(WebKitDOMTestObj* self)
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -847,11 +847,11 @@
</span><span class="cx">  * @b: A #glong
</span><span class="cx">  * @error: #GError
</span><span class="cx">  *
</span><del>- * Returns: (transfer none): A #WebKitDOMbool
</del><ins>+ * Returns: A #gboolean
</ins><span class="cx">  *
</span><span class="cx">  * Stability: Unstable
</span><span class="cx"> **/
</span><del>-WEBKIT_API WebKitDOMbool*
</del><ins>+WEBKIT_API gboolean
</ins><span class="cx"> webkit_dom_test_obj_strict_function(WebKitDOMTestObj* self, const gchar* str, gfloat a, glong b, GError** error);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -861,11 +861,11 @@
</span><span class="cx">  * @array: A #glong
</span><span class="cx">  * @error: #GError
</span><span class="cx">  *
</span><del>- * Returns: (transfer none): A #WebKitDOMbool
</del><ins>+ * Returns: A #gboolean
</ins><span class="cx">  *
</span><span class="cx">  * Stability: Unstable
</span><span class="cx"> **/
</span><del>-WEBKIT_API WebKitDOMbool*
</del><ins>+WEBKIT_API gboolean
</ins><span class="cx"> webkit_dom_test_obj_strict_function_with_array(WebKitDOMTestObj* self, WebKitDOMTestObj* objArg, glong array, GError** error);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -913,6 +913,16 @@
</span><span class="cx"> webkit_dom_test_obj_any(WebKitDOMTestObj* self, gfloat a, glong b);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_attach_shadow_root:
+ * @self: A #WebKitDOMTestObj
+ * @init: A #WebKitDOMShadowRootInit
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_attach_shadow_root(WebKitDOMTestObj* self, WebKitDOMShadowRootInit* init);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_get_read_only_long_attr:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  *
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Node* nextChild = JSNode::toWrapped(state-&gt;argument(0));
</del><ins>+    auto nextChild = JSNode::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!nextChild))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     impl.excitingFunction(*nextChild);
</span><span class="lines">@@ -220,10 +220,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String message = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto message = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.postMessage(message);
</del><ins>+    impl.postMessage(WTFMove(message));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -193,10 +193,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String str = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.anotherFunction(str);
</del><ins>+    impl.anotherFunction(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -205,10 +205,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    unsigned index = toUInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto index = toUInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.item(index)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.item(WTFMove(index))));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -214,10 +214,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;regularAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setRegularAttribute(nativeValue);
</del><ins>+    impl.setRegularAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -232,10 +232,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestGlobalObject&quot;, &quot;enabledAtRuntimeAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setEnabledAtRuntimeAttribute(nativeValue);
</del><ins>+    impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -256,10 +256,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String testParam = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto testParam = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.regularOperation(testParam);
</del><ins>+    impl.regularOperation(WTFMove(testParam));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -274,10 +274,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String testParam = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto testParam = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.enabledAtRuntimeOperation(testParam);
</del><ins>+    impl.enabledAtRuntimeOperation(WTFMove(testParam));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -294,10 +294,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int testParam = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto testParam = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.enabledAtRuntimeOperation(testParam);
</del><ins>+    impl.enabledAtRuntimeOperation(WTFMove(testParam));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -226,10 +226,10 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String str1 = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto str1 = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</del><ins>+    auto str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     ScriptExecutionContext* context = castedThis-&gt;scriptExecutionContext();
</span><span class="lines">@@ -630,10 +630,10 @@
</span><span class="cx"> bool setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    TestInterface::setImplementsStaticAttr(nativeValue);
</del><ins>+    TestInterface::setImplementsStaticAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -649,10 +649,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestInterface&quot;, &quot;implementsStr2&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setImplementsStr2(nativeValue);
</del><ins>+    impl.setImplementsStr2(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -683,7 +683,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestInterface&quot;, &quot;implementsNode&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Node* nativeValue = JSNode::toWrapped(value);
</del><ins>+    auto nativeValue = JSNode::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -698,10 +698,10 @@
</span><span class="cx"> bool setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    WebCore::TestSupplemental::setSupplementalStaticAttr(nativeValue);
</del><ins>+    WebCore::TestSupplemental::setSupplementalStaticAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -717,10 +717,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestInterface&quot;, &quot;supplementalStr2&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    WebCore::TestSupplemental::setSupplementalStr2(impl, nativeValue);
</del><ins>+    WebCore::TestSupplemental::setSupplementalStr2(impl, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -751,7 +751,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestInterface&quot;, &quot;supplementalNode&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Node* nativeValue = JSNode::toWrapped(value);
</del><ins>+    auto nativeValue = JSNode::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -797,13 +797,13 @@
</span><span class="cx">     auto* context = jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject())-&gt;scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.implementsMethod2(*context, strArg, *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.implementsMethod2(*context, WTFMove(strArg), *objArg, ec)));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -863,13 +863,13 @@
</span><span class="cx">     auto* context = jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject())-&gt;scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalMethod2(impl, *context, strArg, *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalMethod2(impl, *context, WTFMove(strArg), *objArg, ec)));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -86,13 +86,13 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String str1 = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto str1 = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</del><ins>+    auto str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String str3 = state-&gt;argument(2).isUndefined() ? String() : state-&gt;uncheckedArgument(2).toWTFString(state);
</del><ins>+    auto str3 = state-&gt;argument(2).isUndefined() ? String() : state-&gt;uncheckedArgument(2).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     RefPtr&lt;TestNamedConstructor&gt; object = TestNamedConstructor::createForJSConstructor(*castedThis-&gt;document(), str1, str2, str3, ec);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -165,10 +165,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestNode&quot;, &quot;name&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setName(nativeValue);
</del><ins>+    impl.setName(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -352,10 +352,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestNondeterministic&quot;, &quot;nondeterministicWriteableAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNondeterministicWriteableAttr(nativeValue);
</del><ins>+    impl.setNondeterministicWriteableAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -369,10 +369,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestNondeterministic&quot;, &quot;nondeterministicExceptionAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNondeterministicExceptionAttr(nativeValue);
</del><ins>+    impl.setNondeterministicExceptionAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -386,10 +386,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestNondeterministic&quot;, &quot;nondeterministicGetterExceptionAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNondeterministicGetterExceptionAttr(nativeValue);
</del><ins>+    impl.setNondeterministicGetterExceptionAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -404,10 +404,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNondeterministicSetterExceptionAttr(nativeValue, ec);
</del><ins>+    impl.setNondeterministicSetterExceptionAttr(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><ins>+#include &quot;JSDOMBuild.h&quot;
</ins><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><span class="cx"> #include &quot;JSDOMIterator.h&quot;
</span><span class="cx"> #include &quot;JSDOMPromise.h&quot;
</span><span class="lines">@@ -45,7 +46,6 @@
</span><span class="cx"> #include &quot;JSTestNode.h&quot;
</span><span class="cx"> #include &quot;JSTestObj.h&quot;
</span><span class="cx"> #include &quot;JSTestSubObj.h&quot;
</span><del>-#include &quot;JSbool.h&quot;
</del><span class="cx"> #include &quot;LifecycleCallbackQueue.h&quot;
</span><span class="cx"> #include &quot;RuntimeEnabledFeatures.h&quot;
</span><span class="cx"> #include &quot;SVGDocument.h&quot;
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> #include &quot;TestObj.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;WebCoreJSClientData.h&quot;
</span><del>-#include &quot;bool.h&quot;
</del><span class="cx"> #include &lt;inspector/ScriptArguments.h&gt;
</span><span class="cx"> #include &lt;inspector/ScriptCallStackFactory.h&gt;
</span><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><span class="lines">@@ -87,10 +86,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+template&lt;typename T&gt; Optional&lt;T&gt; parse(ExecState&amp;, JSValue);
+template&lt;typename T&gt; const char* expectedEnumerationValues();
+
</ins><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::EnumType);
</span><del>-Optional&lt;TestObj::EnumType&gt; parseTestObjEnumType(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjEnumType[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::EnumType enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -111,7 +110,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumType value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::EnumType&gt; parseTestObjEnumType(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumType&gt; parse&lt;TestObj::EnumType&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue.isEmpty())
</span><span class="lines">@@ -125,12 +124,22 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjEnumType[] = &quot;\&quot;\&quot;, \&quot;EnumValue1\&quot;, \&quot;EnumValue2\&quot;, \&quot;EnumValue3\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::EnumType build&lt;TestObj::EnumType&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::EnumType&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::EnumType&gt;()
+{
+    return &quot;\&quot;\&quot;, \&quot;EnumValue1\&quot;, \&quot;EnumValue2\&quot;, \&quot;EnumValue3\&quot;&quot;;
+}
+
</ins><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::Optional);
</span><del>-Optional&lt;TestObj::Optional&gt; parseTestObjOptional(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjOptional[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::Optional enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -151,7 +160,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Optional value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::Optional&gt; parseTestObjOptional(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Optional&gt; parse&lt;TestObj::Optional&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue.isEmpty())
</span><span class="lines">@@ -165,14 +174,24 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjOptional[] = &quot;\&quot;\&quot;, \&quot;OptionalValue1\&quot;, \&quot;OptionalValue2\&quot;, \&quot;OptionalValue3\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::Optional build&lt;TestObj::Optional&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::Optional&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::Optional&gt;()
+{
+    return &quot;\&quot;\&quot;, \&quot;OptionalValue1\&quot;, \&quot;OptionalValue2\&quot;, \&quot;OptionalValue3\&quot;&quot;;
+}
+
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> 
</span><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::EnumA);
</span><del>-Optional&lt;TestObj::EnumA&gt; parseTestObjEnumA(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjEnumA[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::EnumA enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -187,7 +206,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumA value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::EnumA&gt; parseTestObjEnumA(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumA&gt; parse&lt;TestObj::EnumA&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;A&quot;)
</span><span class="lines">@@ -195,16 +214,26 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjEnumA[] = &quot;\&quot;A\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::EnumA build&lt;TestObj::EnumA&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::EnumA&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::EnumA&gt;()
+{
+    return &quot;\&quot;A\&quot;&quot;;
+}
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
</span><span class="cx"> 
</span><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::EnumB);
</span><del>-Optional&lt;TestObj::EnumB&gt; parseTestObjEnumB(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjEnumB[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::EnumB enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -219,7 +248,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumB value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::EnumB&gt; parseTestObjEnumB(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumB&gt; parse&lt;TestObj::EnumB&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;B&quot;)
</span><span class="lines">@@ -227,16 +256,26 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjEnumB[] = &quot;\&quot;B\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::EnumB build&lt;TestObj::EnumB&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::EnumB&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::EnumB&gt;()
+{
+    return &quot;\&quot;B\&quot;&quot;;
+}
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><span class="cx"> 
</span><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::EnumC);
</span><del>-Optional&lt;TestObj::EnumC&gt; parseTestObjEnumC(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjEnumC[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::EnumC enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -251,7 +290,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumC value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::EnumC&gt; parseTestObjEnumC(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumC&gt; parse&lt;TestObj::EnumC&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;C&quot;)
</span><span class="lines">@@ -259,14 +298,24 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjEnumC[] = &quot;\&quot;C\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::EnumC build&lt;TestObj::EnumC&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::EnumC&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::EnumC&gt;()
+{
+    return &quot;\&quot;C\&quot;&quot;;
+}
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::Kind);
</span><del>-Optional&lt;TestObj::Kind&gt; parseTestObjKind(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjKind[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::Kind enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -283,7 +332,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Kind value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::Kind&gt; parseTestObjKind(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Kind&gt; parse&lt;TestObj::Kind&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;quick&quot;)
</span><span class="lines">@@ -293,12 +342,22 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjKind[] = &quot;\&quot;quick\&quot;, \&quot;dead\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::Kind build&lt;TestObj::Kind&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::Kind&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::Kind&gt;()
+{
+    return &quot;\&quot;quick\&quot;, \&quot;dead\&quot;&quot;;
+}
+
</ins><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::Size);
</span><del>-Optional&lt;TestObj::Size&gt; parseTestObjSize(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjSize[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::Size enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -315,7 +374,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Size value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::Size&gt; parseTestObjSize(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Size&gt; parse&lt;TestObj::Size&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;small&quot;)
</span><span class="lines">@@ -325,12 +384,22 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjSize[] = &quot;\&quot;small\&quot;, \&quot;much-much-larger\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::Size build&lt;TestObj::Size&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::Size&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::Size&gt;()
+{
+    return &quot;\&quot;small\&quot;, \&quot;much-much-larger\&quot;&quot;;
+}
+
</ins><span class="cx"> JSString* jsStringWithCache(ExecState*, TestObj::Confidence);
</span><del>-Optional&lt;TestObj::Confidence&gt; parseTestObjConfidence(ExecState&amp;, JSValue);
-extern const char expectedEnumerationValuesTestObjConfidence[];
-
</del><span class="cx"> JSString* jsStringWithCache(ExecState* state, TestObj::Confidence enumerationValue)
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; values[] = {
</span><span class="lines">@@ -347,7 +416,7 @@
</span><span class="cx">     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Confidence value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Optional&lt;TestObj::Confidence&gt; parseTestObjConfidence(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Confidence&gt; parse&lt;TestObj::Confidence&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     auto stringValue = value.toWTFString(&amp;state);
</span><span class="cx">     if (stringValue == &quot;high&quot;)
</span><span class="lines">@@ -357,8 +426,70 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char expectedEnumerationValuesTestObjConfidence[] = &quot;\&quot;high\&quot;, \&quot;kinda-low\&quot;&quot;;
</del><ins>+template&lt;&gt; TestObj::Confidence build&lt;TestObj::Confidence&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::Confidence&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::Confidence&gt;()
+{
+    return &quot;\&quot;high\&quot;, \&quot;kinda-low\&quot;&quot;;
+}
+
+JSString* jsStringWithCache(ExecState*, TestObj::ShadowRootMode);
+JSString* jsStringWithCache(ExecState* state, TestObj::ShadowRootMode enumerationValue)
+{
+    static NeverDestroyed&lt;const String&gt; values[] = {
+        ASCIILiteral(&quot;open&quot;),
+        ASCIILiteral(&quot;closed&quot;),
+    };
+    static_assert(static_cast&lt;size_t&gt;(TestObj::ShadowRootMode::Open) == 0, &quot;TestObj::ShadowRootMode::Open is not 0 as expected&quot;);
+    static_assert(static_cast&lt;size_t&gt;(TestObj::ShadowRootMode::Closed) == 1, &quot;TestObj::ShadowRootMode::Closed is not 1 as expected&quot;);
+    ASSERT(static_cast&lt;size_t&gt;(enumerationValue) &lt; WTF_ARRAY_LENGTH(values));
+    return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
+}
+
+template&lt;&gt; struct JSValueTraits&lt;TestObj::ShadowRootMode&gt; {
+    static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::ShadowRootMode value) { return jsStringWithCache(state, value); }
+};
+
+template&lt;&gt; Optional&lt;TestObj::ShadowRootMode&gt; parse&lt;TestObj::ShadowRootMode&gt;(ExecState&amp; state, JSValue value)
+{
+    auto stringValue = value.toWTFString(&amp;state);
+    if (stringValue == &quot;open&quot;)
+        return TestObj::ShadowRootMode::Open;
+    if (stringValue == &quot;closed&quot;)
+        return TestObj::ShadowRootMode::Closed;
+    return Nullopt;
+}
+
+template&lt;&gt; TestObj::ShadowRootMode build&lt;TestObj::ShadowRootMode&gt;(ExecState&amp; state, JSValue value)
+{
+    auto result = parse&lt;TestObj::ShadowRootMode&gt;(state, value);
+    if (UNLIKELY(!result)) {
+        throwTypeError(&amp;state);
+        return { };
+    }
+    return result.value();
+}
+
+template&lt;&gt; inline const char* expectedEnumerationValues&lt;TestObj::ShadowRootMode&gt;()
+{
+    return &quot;\&quot;open\&quot;, \&quot;closed\&quot;&quot;;
+}
+
+template&lt;&gt; TestObj::ShadowRootInit build&lt;TestObj::ShadowRootInit&gt;(ExecState&amp; state, JSValue value)
+{
+    return { 
+        build&lt;TestObj::ShadowRootMode&gt;(state, value, &quot;mode&quot;),
+    };
+}
+
</ins><span class="cx"> // Functions
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TEST_FEATURE)
</span><span class="lines">@@ -485,6 +616,7 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunction(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSymbolIterator(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEntries(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionKeys(JSC::ExecState*);
</span><span class="lines">@@ -1057,6 +1189,7 @@
</span><span class="cx">     { &quot;testPromiseFunctionWithOptionalIntArgument&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } },
</span><span class="cx">     { &quot;testPromiseOverloadedFunction&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } },
</span><span class="cx">     { &quot;methodWithNeedsLifecycleProcessingStack&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack), (intptr_t) (0) } },
</span><ins>+    { &quot;attachShadowRoot&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionAttachShadowRoot), (intptr_t) (1) } },
</ins><span class="cx">     { &quot;entries&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionEntries), (intptr_t) (0) } },
</span><span class="cx">     { &quot;keys&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionKeys), (intptr_t) (0) } },
</span><span class="cx">     { &quot;values&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionValues), (intptr_t) (0) } },
</span><span class="lines">@@ -2464,10 +2597,10 @@
</span><span class="cx"> bool setJSTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    TestObj::setStaticStringAttr(nativeValue);
</del><ins>+    TestObj::setStaticStringAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2494,7 +2627,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;enumAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = parseTestObjEnumType(*state, value);
</del><ins>+    auto nativeValue = parse&lt;TestObj::EnumType&gt;(*state, value);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="lines">@@ -2513,10 +2646,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;byteAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int8_t nativeValue = toInt8(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt8(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setByteAttr(nativeValue);
</del><ins>+    impl.setByteAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2530,10 +2663,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;octetAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    uint8_t nativeValue = toUInt8(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toUInt8(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setOctetAttr(nativeValue);
</del><ins>+    impl.setOctetAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2547,10 +2680,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;shortAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int16_t nativeValue = toInt16(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt16(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setShortAttr(nativeValue);
</del><ins>+    impl.setShortAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2564,10 +2697,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;clampedShortAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int16_t nativeValue = toInt16(state, value, Clamp);
</del><ins>+    auto nativeValue = toInt16(state, value, Clamp);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setClampedShortAttr(nativeValue);
</del><ins>+    impl.setClampedShortAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2581,10 +2714,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;enforceRangeShortAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int16_t nativeValue = toInt16(state, value, EnforceRange);
</del><ins>+    auto nativeValue = toInt16(state, value, EnforceRange);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setEnforceRangeShortAttr(nativeValue);
</del><ins>+    impl.setEnforceRangeShortAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2598,10 +2731,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;unsignedShortAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    uint16_t nativeValue = toUInt16(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toUInt16(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setUnsignedShortAttr(nativeValue);
</del><ins>+    impl.setUnsignedShortAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2615,10 +2748,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;longAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setLongAttr(nativeValue);
</del><ins>+    impl.setLongAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2632,10 +2765,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;longLongAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    long long nativeValue = toInt64(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt64(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setLongLongAttr(nativeValue);
</del><ins>+    impl.setLongLongAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2649,10 +2782,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;unsignedLongLongAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    unsigned long long nativeValue = toUInt64(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toUInt64(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setUnsignedLongLongAttr(nativeValue);
</del><ins>+    impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2666,10 +2799,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;stringAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttr(nativeValue);
</del><ins>+    impl.setStringAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2683,7 +2816,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;testObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -2702,8 +2835,8 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;testNullableObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
-    impl.setTestNullableObjAttr(nativeValue);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
+    impl.setTestNullableObjAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2717,7 +2850,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -2736,10 +2869,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;stringAttrTreatingNullAsEmptyString&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = valueToStringTreatingNullAsEmptyString(state, value);
</del><ins>+    auto nativeValue = valueToStringTreatingNullAsEmptyString(state, value);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttrTreatingNullAsEmptyString(nativeValue);
</del><ins>+    impl.setStringAttrTreatingNullAsEmptyString(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2753,7 +2886,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;XMLObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -2772,10 +2905,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;create&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    bool nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = value.toBoolean(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setCreate(nativeValue);
</del><ins>+    impl.setCreate(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2789,10 +2922,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedStringAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, nativeValue);
</del><ins>+    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2806,10 +2939,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedIntegralAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, nativeValue);
</del><ins>+    impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2823,10 +2956,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedUnsignedIntegralAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    unsigned nativeValue = toUInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toUInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, nativeValue);
</del><ins>+    impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2840,10 +2973,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedBooleanAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    bool nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = value.toBoolean(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, nativeValue);
</del><ins>+    impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2857,10 +2990,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedURLAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, nativeValue);
</del><ins>+    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2874,10 +3007,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedStringAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, nativeValue);
</del><ins>+    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2891,10 +3024,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedCustomIntegralAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, nativeValue);
</del><ins>+    impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2908,10 +3041,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedCustomBooleanAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    bool nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = value.toBoolean(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, nativeValue);
</del><ins>+    impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2925,10 +3058,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;reflectedCustomURLAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, nativeValue);
</del><ins>+    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2943,10 +3076,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;enabledAtRuntimeAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setEnabledAtRuntimeAttribute(nativeValue);
</del><ins>+    impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2961,7 +3094,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;typedArrayAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    RefPtr&lt;Float32Array&gt; nativeValue = toFloat32Array(value);
</del><ins>+    auto nativeValue = toFloat32Array(value);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="lines">@@ -2982,10 +3115,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithGetterException&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithGetterException(nativeValue);
</del><ins>+    impl.setAttrWithGetterException(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2999,10 +3132,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithGetterExceptionWithMessage&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithGetterExceptionWithMessage(nativeValue);
</del><ins>+    impl.setAttrWithGetterExceptionWithMessage(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3017,10 +3150,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithSetterException(nativeValue, ec);
</del><ins>+    impl.setAttrWithSetterException(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3036,10 +3169,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCodeWithMessage ec;
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithSetterExceptionWithMessage(nativeValue, ec);
</del><ins>+    impl.setAttrWithSetterExceptionWithMessage(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3054,10 +3187,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;stringAttrWithGetterException&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttrWithGetterException(nativeValue);
</del><ins>+    impl.setStringAttrWithGetterException(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3072,10 +3205,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttrWithSetterException(nativeValue, ec);
</del><ins>+    impl.setStringAttrWithSetterException(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3098,7 +3231,7 @@
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    impl.setStrictTypeCheckingAttribute(nativeValue);
</del><ins>+    impl.setStrictTypeCheckingAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3151,10 +3284,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptStateAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setWithScriptStateAttribute(*state, nativeValue);
</del><ins>+    impl.setWithScriptStateAttribute(*state, WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3168,10 +3301,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withCallWithAndSetterCallWithAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setWithCallWithAndSetterCallWithAttribute(*state, activeDOMWindow(state), firstDOMWindow(state), nativeValue);
</del><ins>+    impl.setWithCallWithAndSetterCallWithAttribute(*state, activeDOMWindow(state), firstDOMWindow(state), WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3185,7 +3318,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptExecutionContextAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3207,7 +3340,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptStateAttributeRaises&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3226,7 +3359,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptExecutionContextAttributeRaises&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3248,7 +3381,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptExecutionContextAndScriptStateAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3270,7 +3403,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptExecutionContextAndScriptStateAttributeRaises&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3292,7 +3425,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptExecutionContextAndScriptStateWithSpacesAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3314,7 +3447,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptArgumentsAndCallStackAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* nativeValue = JSTestObj::toWrapped(value);
</del><ins>+    auto nativeValue = JSTestObj::toWrapped(value);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwVMTypeError(state);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3334,10 +3467,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;conditionalAttr1&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setConditionalAttr1(nativeValue);
</del><ins>+    impl.setConditionalAttr1(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3353,10 +3486,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;conditionalAttr2&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setConditionalAttr2(nativeValue);
</del><ins>+    impl.setConditionalAttr2(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3372,10 +3505,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;conditionalAttr3&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setConditionalAttr3(nativeValue);
</del><ins>+    impl.setConditionalAttr3(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3435,8 +3568,8 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;anyAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSC::JSValue nativeValue = value;
-    impl.setAnyAttribute(nativeValue);
</del><ins>+    auto nativeValue = value;
+    impl.setAnyAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3450,8 +3583,8 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;mutablePoint&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    SVGPropertyTearOff&lt;SVGPoint&gt;* nativeValue = JSSVGPoint::toWrapped(value);
-    impl.setMutablePoint(nativeValue);
</del><ins>+    auto nativeValue = JSSVGPoint::toWrapped(value);
+    impl.setMutablePoint(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3465,8 +3598,8 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;immutablePoint&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    SVGPropertyTearOff&lt;SVGPoint&gt;* nativeValue = JSSVGPoint::toWrapped(value);
-    impl.setImmutablePoint(nativeValue);
</del><ins>+    auto nativeValue = JSSVGPoint::toWrapped(value);
+    impl.setImmutablePoint(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3480,10 +3613,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;strawberry&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setBlueberry(nativeValue);
</del><ins>+    impl.setBlueberry(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3497,10 +3630,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;strictFloat&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    float nativeValue = value.toFloat(state);
</del><ins>+    auto nativeValue = value.toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStrictFloat(nativeValue);
</del><ins>+    impl.setStrictFloat(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3514,10 +3647,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;id&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setId(nativeValue);
</del><ins>+    impl.setId(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3544,10 +3677,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;nullableLongSettableAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNullableLongSettableAttribute(nativeValue);
</del><ins>+    impl.setNullableLongSettableAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3561,10 +3694,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;nullableStringSettableAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = valueToStringWithUndefinedOrNullCheck(state, value);
</del><ins>+    auto nativeValue = valueToStringWithUndefinedOrNullCheck(state, value);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNullableStringSettableAttribute(nativeValue);
</del><ins>+    impl.setNullableStringSettableAttribute(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3578,10 +3711,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;nullableStringValue&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setNullableStringValue(nativeValue);
</del><ins>+    impl.setNullableStringValue(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3595,7 +3728,7 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;attributeWithReservedEnumType&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = parseTestObjOptional(*state, value);
</del><ins>+    auto nativeValue = parse&lt;TestObj::Optional&gt;(*state, value);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="lines">@@ -3615,10 +3748,10 @@
</span><span class="cx">     }
</span><span class="cx">     Ref&lt;TestNode&gt; forwardedImpl = castedThis-&gt;wrapped().putForwardsAttribute();
</span><span class="cx">     auto&amp; impl = forwardedImpl.get();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setName(nativeValue);
</del><ins>+    impl.setName(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3635,10 +3768,10 @@
</span><span class="cx">     if (!forwardedImpl)
</span><span class="cx">         return false;
</span><span class="cx">     auto&amp; impl = *forwardedImpl;
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setName(nativeValue);
</del><ins>+    impl.setName(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3668,10 +3801,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String testParam = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto testParam = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.enabledAtRuntimeOperation(testParam);
</del><ins>+    impl.enabledAtRuntimeOperation(WTFMove(testParam));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3688,10 +3821,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int testParam = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto testParam = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.enabledAtRuntimeOperation(testParam);
</del><ins>+    impl.enabledAtRuntimeOperation(WTFMove(testParam));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3737,16 +3870,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    impl.voidMethodWithArgs(longArg, strArg, *objArg);
</del><ins>+    impl.voidMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg);
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3772,16 +3905,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int8_t byteArg = toInt8(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto byteArg = toInt8(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, *objArg));
</del><ins>+    JSValue result = jsNumber(impl.byteMethodWithArgs(WTFMove(byteArg), WTFMove(strArg), *objArg));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3807,16 +3940,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    uint8_t octetArg = toUInt8(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto octetArg = toUInt8(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, *objArg));
</del><ins>+    JSValue result = jsNumber(impl.octetMethodWithArgs(WTFMove(octetArg), WTFMove(strArg), *objArg));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3842,16 +3975,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, *objArg));
</del><ins>+    JSValue result = jsNumber(impl.longMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3877,16 +4010,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, *objArg)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.objMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3912,10 +4045,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String arg = valueToStringTreatingNullAsEmptyString(state, state-&gt;argument(0));
</del><ins>+    auto arg = valueToStringTreatingNullAsEmptyString(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithArgTreatingNullAsEmptyString(arg);
</del><ins>+    impl.methodWithArgTreatingNullAsEmptyString(WTFMove(arg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3947,10 +4080,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    unsigned index = toUInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto index = toUInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(index));
</del><ins>+    JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(WTFMove(index)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3964,10 +4097,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;RefPtr&lt;ScriptProfile&gt;&gt; sequenceArg = (toRefPtrNativeArray&lt;ScriptProfile, JSScriptProfile&gt;(state, state-&gt;argument(0), &amp;JSScriptProfile::toWrapped));
</del><ins>+    auto sequenceArg = (toRefPtrNativeArray&lt;ScriptProfile, JSScriptProfile&gt;(state, state-&gt;argument(0), &amp;JSScriptProfile::toWrapped));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithSequenceArg(sequenceArg);
</del><ins>+    impl.methodWithSequenceArg(WTFMove(sequenceArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3981,10 +4114,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.methodReturningSequence(longArg));
</del><ins>+    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.methodReturningSequence(WTFMove(longArg)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4000,11 +4133,11 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto enumArgValue = state-&gt;argument(0);
</span><span class="cx">     TestObj::EnumType enumArg;
</span><del>-    auto optionalValue = parseTestObjEnumType(*state, enumArgValue);
</del><ins>+    auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!optionalValue))
</span><del>-        return throwArgumentMustBeEnumError(*state, 0, &quot;enumArg&quot;, &quot;TestObj&quot;, &quot;methodWithEnumArg&quot;, expectedEnumerationValuesTestObjEnumType);
</del><ins>+        return throwArgumentMustBeEnumError(*state, 0, &quot;enumArg&quot;, &quot;TestObj&quot;, &quot;methodWithEnumArg&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</ins><span class="cx">     enumArg = optionalValue.value();
</span><span class="cx">     impl.methodWithEnumArg(enumArg);
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -4023,11 +4156,11 @@
</span><span class="cx">     if (enumArgValue.isUndefined()) {
</span><span class="cx">         enumArg = TestObj::EnumType::EnumValue1;
</span><span class="cx">     } else {
</span><del>-        auto optionalValue = parseTestObjEnumType(*state, enumArgValue);
</del><ins>+        auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</ins><span class="cx">         if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">             return JSValue::encode(jsUndefined());
</span><span class="cx">         if (UNLIKELY(!optionalValue))
</span><del>-            return throwArgumentMustBeEnumError(*state, 0, &quot;enumArg&quot;, &quot;TestObj&quot;, &quot;methodWithOptionalEnumArgAndDefaultValue&quot;, expectedEnumerationValuesTestObjEnumType);
</del><ins>+            return throwArgumentMustBeEnumError(*state, 0, &quot;enumArg&quot;, &quot;TestObj&quot;, &quot;methodWithOptionalEnumArgAndDefaultValue&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</ins><span class="cx">         enumArg = optionalValue.value();
</span><span class="cx">     }
</span><span class="cx">     impl.methodWithOptionalEnumArgAndDefaultValue(enumArg);
</span><span class="lines">@@ -4045,13 +4178,13 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String strArg = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(WTFMove(strArg), *objArg, ec)));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -4067,10 +4200,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; serializedArg = SerializedScriptValue::create(state, state-&gt;argument(0), 0, 0);
</del><ins>+    auto serializedArg = SerializedScriptValue::create(state, state-&gt;argument(0), 0, 0);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.serializedValue(serializedArg);
</del><ins>+    impl.serializedValue(WTFMove(serializedArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4084,9 +4217,9 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Dictionary oo = { state, state-&gt;argument(0) };
-    Dictionary ooo = { state, state-&gt;argument(1) };
-    impl.optionsObject(oo, ooo);
</del><ins>+    auto oo = Dictionary(state, state-&gt;argument(0));
+    auto ooo = Dictionary(state, state-&gt;argument(1));
+    impl.optionsObject(WTFMove(oo), WTFMove(ooo));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4148,10 +4281,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String argument = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto argument = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsStringWithCache(state, impl.privateMethod(argument));
</del><ins>+    JSValue result = jsStringWithCache(state, impl.privateMethod(WTFMove(argument)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4347,10 +4480,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArg&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;int&gt; opt = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalArg(opt);
</del><ins>+    impl.methodWithOptionalArg(WTFMove(opt));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4362,10 +4495,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArgAndDefaultValue&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int opt = state-&gt;argument(0).isUndefined() ? 666 : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(0).isUndefined() ? 666 : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalArgAndDefaultValue(opt);
</del><ins>+    impl.methodWithOptionalArgAndDefaultValue(WTFMove(opt));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4379,13 +4512,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int nonOpt = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto nonOpt = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Optional&lt;int&gt; opt = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
</del><ins>+    impl.methodWithNonOptionalArgAndOptionalArg(WTFMove(nonOpt), WTFMove(opt));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4399,16 +4532,16 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int nonOpt = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto nonOpt = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Optional&lt;int&gt; opt1 = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto opt1 = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Optional&lt;int&gt; opt2 = state-&gt;argument(2).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(2), NormalConversion);
</del><ins>+    auto opt2 = state-&gt;argument(2).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(2), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
</del><ins>+    impl.methodWithNonOptionalArgAndTwoOptionalArgs(WTFMove(nonOpt), WTFMove(opt1), WTFMove(opt2));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4420,10 +4553,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalString&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalString(str);
</del><ins>+    impl.methodWithOptionalString(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4435,10 +4568,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAtomicString&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalAtomicString(str);
</del><ins>+    impl.methodWithOptionalAtomicString(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4450,10 +4583,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalStringAndDefaultValue&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;foo&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;foo&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalStringAndDefaultValue(str);
</del><ins>+    impl.methodWithOptionalStringAndDefaultValue(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4465,10 +4598,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAtomicStringAndDefaultValue&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? AtomicString(&quot;foo&quot;, AtomicString::ConstructFromLiteral) : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? AtomicString(&quot;foo&quot;, AtomicString::ConstructFromLiteral) : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalAtomicStringAndDefaultValue(str);
</del><ins>+    impl.methodWithOptionalAtomicStringAndDefaultValue(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4480,10 +4613,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalStringIsNull&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalStringIsNull(str);
</del><ins>+    impl.methodWithOptionalStringIsNull(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4495,10 +4628,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalStringIsUndefined&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalStringIsUndefined(str);
</del><ins>+    impl.methodWithOptionalStringIsUndefined(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4510,10 +4643,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAtomicStringIsNull&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalAtomicStringIsNull(str);
</del><ins>+    impl.methodWithOptionalAtomicStringIsNull(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4525,10 +4658,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalStringIsEmptyString&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? emptyString() : state-&gt;uncheckedArgument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? emptyString() : state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalStringIsEmptyString(str);
</del><ins>+    impl.methodWithOptionalStringIsEmptyString(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4540,10 +4673,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAtomicStringIsEmptyString&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String str = state-&gt;argument(0).isUndefined() ? emptyAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</del><ins>+    auto str = state-&gt;argument(0).isUndefined() ? emptyAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalAtomicStringIsEmptyString(str);
</del><ins>+    impl.methodWithOptionalAtomicStringIsEmptyString(WTFMove(str));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4555,10 +4688,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalDoubleIsNaN&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    double number = state-&gt;argument(0).toNumber(state);
</del><ins>+    auto number = state-&gt;argument(0).toNumber(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalDoubleIsNaN(number);
</del><ins>+    impl.methodWithOptionalDoubleIsNaN(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4570,10 +4703,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalFloatIsNaN&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    float number = state-&gt;argument(0).toFloat(state);
</del><ins>+    auto number = state-&gt;argument(0).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalFloatIsNaN(number);
</del><ins>+    impl.methodWithOptionalFloatIsNaN(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4585,10 +4718,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalSequence&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Vector&lt;String&gt; sequence = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto sequence = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalSequence(sequence);
</del><ins>+    impl.methodWithOptionalSequence(WTFMove(sequence));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4600,10 +4733,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalLongLong&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;long long&gt; number = state-&gt;argument(0).isUndefined() ? Optional&lt;long long&gt;() : toInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;long long&gt;() : toInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalLongLong(number);
</del><ins>+    impl.methodWithOptionalLongLong(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4615,10 +4748,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalLongLongIsZero&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    long long number = toInt64(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto number = toInt64(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalLongLongIsZero(number);
</del><ins>+    impl.methodWithOptionalLongLongIsZero(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4630,10 +4763,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalUnsignedLongLong&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;unsigned long long&gt; number = state-&gt;argument(0).isUndefined() ? Optional&lt;unsigned long long&gt;() : toUInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;unsigned long long&gt;() : toUInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalUnsignedLongLong(number);
</del><ins>+    impl.methodWithOptionalUnsignedLongLong(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4645,10 +4778,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalUnsignedLongLongIsZero&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    unsigned long long number = toUInt64(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto number = toUInt64(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalUnsignedLongLongIsZero(number);
</del><ins>+    impl.methodWithOptionalUnsignedLongLongIsZero(WTFMove(number));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4660,10 +4793,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArray&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;Vector&lt;String&gt;&gt; array = state-&gt;argument(0).isUndefined() ? Optional&lt;Vector&lt;String&gt;&gt;() : toNativeArray&lt;String&gt;(state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto array = state-&gt;argument(0).isUndefined() ? Optional&lt;Vector&lt;String&gt;&gt;() : toNativeArray&lt;String&gt;(state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalArray(array);
</del><ins>+    impl.methodWithOptionalArray(WTFMove(array));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4675,10 +4808,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArrayIsEmpty&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Vector&lt;String&gt; array = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto array = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalArrayIsEmpty(array);
</del><ins>+    impl.methodWithOptionalArrayIsEmpty(WTFMove(array));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4690,10 +4823,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalBoolean&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;bool&gt; b = state-&gt;argument(0).isUndefined() ? Optional&lt;bool&gt;() : state-&gt;uncheckedArgument(0).toBoolean(state);
</del><ins>+    auto b = state-&gt;argument(0).isUndefined() ? Optional&lt;bool&gt;() : state-&gt;uncheckedArgument(0).toBoolean(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalBoolean(b);
</del><ins>+    impl.methodWithOptionalBoolean(WTFMove(b));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4705,10 +4838,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalBooleanIsFalse&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    bool b = state-&gt;argument(0).toBoolean(state);
</del><ins>+    auto b = state-&gt;argument(0).toBoolean(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithOptionalBooleanIsFalse(b);
</del><ins>+    impl.methodWithOptionalBooleanIsFalse(WTFMove(b));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4720,8 +4853,8 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAny&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSC::JSValue a = state-&gt;argument(0);
-    impl.methodWithOptionalAny(a);
</del><ins>+    auto a = state-&gt;argument(0);
+    impl.methodWithOptionalAny(WTFMove(a));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4733,8 +4866,8 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalNullableWrapper&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* obj = JSTestObj::toWrapped(state-&gt;argument(0));
-    impl.methodWithOptionalNullableWrapper(obj);
</del><ins>+    auto obj = JSTestObj::toWrapped(state-&gt;argument(0));
+    impl.methodWithOptionalNullableWrapper(WTFMove(obj));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4746,8 +4879,8 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalNullableWrapperIsNull&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    TestObj* obj = JSTestObj::toWrapped(state-&gt;argument(0));
-    impl.methodWithOptionalNullableWrapperIsNull(obj);
</del><ins>+    auto obj = JSTestObj::toWrapped(state-&gt;argument(0));
+    impl.methodWithOptionalNullableWrapperIsNull(WTFMove(obj));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4778,13 +4911,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int nonCallback = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto nonCallback = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackArg&quot;);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><del>-    impl.methodWithNonCallbackArgAndCallbackArg(nonCallback, WTFMove(callback));
</del><ins>+    impl.methodWithNonCallbackArgAndCallbackArg(WTFMove(nonCallback), WTFMove(callback));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4833,13 +4966,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int nonCallback = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto nonCallback = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
</span><span class="cx">     RefPtr&lt;TestCallbackFunction&gt; callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><del>-    impl.methodWithNonCallbackArgAndCallbackFunctionArg(nonCallback, WTFMove(callback));
</del><ins>+    impl.methodWithNonCallbackArgAndCallbackFunctionArg(WTFMove(nonCallback), WTFMove(callback));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4939,11 +5072,11 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
-    String strArg = state-&gt;argument(1).toWTFString(state);
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
+    auto strArg = state-&gt;argument(1).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(objArg, strArg);
</del><ins>+    impl.overloadedMethod(WTFMove(objArg), WTFMove(strArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4957,11 +5090,11 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
-    Optional&lt;int&gt; longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
+    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(objArg, longArg);
</del><ins>+    impl.overloadedMethod(WTFMove(objArg), WTFMove(longArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4975,10 +5108,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String strArg = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(strArg);
</del><ins>+    impl.overloadedMethod(WTFMove(strArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4992,10 +5125,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto longArg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(longArg);
</del><ins>+    impl.overloadedMethod(WTFMove(longArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5026,10 +5159,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    RefPtr&lt;DOMStringList&gt; listArg = toDOMStringList(state, state-&gt;argument(0));
</del><ins>+    auto listArg = toDOMStringList(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(listArg);
</del><ins>+    impl.overloadedMethod(WTFMove(listArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5043,10 +5176,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;String&gt; arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(arrayArg);
</del><ins>+    impl.overloadedMethod(WTFMove(arrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5060,7 +5193,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     impl.overloadedMethod(*objArg);
</span><span class="lines">@@ -5077,10 +5210,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;String&gt; arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(arrayArg);
</del><ins>+    impl.overloadedMethod(WTFMove(arrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5094,10 +5227,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;unsigned&gt; arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(arrayArg);
</del><ins>+    impl.overloadedMethod(WTFMove(arrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5111,10 +5244,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String strArg = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto strArg = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethod(strArg);
</del><ins>+    impl.overloadedMethod(WTFMove(strArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5151,7 +5284,7 @@
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod4(state);
</span><span class="cx">     if ((argsCount == 1 &amp;&amp; (arg0.isNull() || arg0.isObject())))
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod5(state);
</span><del>-    if ((argsCount == 1 &amp;&amp; (arg0.isNull() || (arg0.isObject() &amp;&amp; asObject(arg0)-&gt;inherits(JSDOMStringList::info())))))
</del><ins>+    if (argsCount == 1)
</ins><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod6(state);
</span><span class="cx">     if ((argsCount == 1 &amp;&amp; (arg0.isNull() || (arg0.isObject() &amp;&amp; isJSArray(arg0)))))
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod7(state);
</span><span class="lines">@@ -5180,9 +5313,9 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestObj* objArg1 = JSTestObj::toWrapped(state-&gt;argument(0));
-    TestObj* objArg2 = JSTestObj::toWrapped(state-&gt;argument(1));
-    impl.overloadedMethodWithOptionalParameter(objArg1, objArg2);
</del><ins>+    auto objArg1 = JSTestObj::toWrapped(state-&gt;argument(0));
+    auto objArg2 = JSTestObj::toWrapped(state-&gt;argument(1));
+    impl.overloadedMethodWithOptionalParameter(WTFMove(objArg1), WTFMove(objArg2));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5196,11 +5329,11 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
-    Optional&lt;int&gt; longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
+    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.overloadedMethodWithOptionalParameter(objArg, longArg);
</del><ins>+    impl.overloadedMethodWithOptionalParameter(WTFMove(objArg), WTFMove(longArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5226,10 +5359,10 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(ExecState* state)
</span><span class="cx"> {
</span><del>-    Optional&lt;int&gt; arg = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto arg = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
</del><ins>+    JSValue result = jsNumber(TestObj::classMethodWithOptional(WTFMove(arg)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5245,10 +5378,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    int arg = toInt32(state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto arg = toInt32(state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj::overloadedMethod1(arg);
</del><ins>+    TestObj::overloadedMethod1(WTFMove(arg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5259,10 +5392,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String type = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto type = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    TestObj::overloadedMethod1(type);
</del><ins>+    TestObj::overloadedMethod1(WTFMove(type));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5297,13 +5430,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    uint16_t objArgsShort = toUInt16(state, state-&gt;argument(0), Clamp);
</del><ins>+    auto objArgsShort = toUInt16(state, state-&gt;argument(0), Clamp);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    unsigned objArgsLong = toUInt32(state, state-&gt;argument(1), Clamp);
</del><ins>+    auto objArgsLong = toUInt32(state, state-&gt;argument(1), Clamp);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.classMethodWithClamp(objArgsShort, objArgsLong);
</del><ins>+    impl.classMethodWithClamp(WTFMove(objArgsShort), WTFMove(objArgsLong));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5317,13 +5450,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    uint16_t objArgsShort = toUInt16(state, state-&gt;argument(0), EnforceRange);
</del><ins>+    auto objArgsShort = toUInt16(state, state-&gt;argument(0), EnforceRange);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    unsigned objArgsLong = toUInt32(state, state-&gt;argument(1), EnforceRange);
</del><ins>+    auto objArgsLong = toUInt32(state, state-&gt;argument(1), EnforceRange);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.classMethodWithEnforceRange(objArgsShort, objArgsLong);
</del><ins>+    impl.classMethodWithEnforceRange(WTFMove(objArgsShort), WTFMove(objArgsLong));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5337,10 +5470,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;unsigned&gt; unsignedLongSequence = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</del><ins>+    auto unsignedLongSequence = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithUnsignedLongSequence(unsignedLongSequence);
</del><ins>+    impl.methodWithUnsignedLongSequence(WTFMove(unsignedLongSequence));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5355,10 +5488,10 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    Vector&lt;String&gt; values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(values, ec));
</del><ins>+    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(WTFMove(values), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5375,7 +5508,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    RefPtr&lt;DOMStringList&gt; values = toDOMStringList(state, state-&gt;argument(0));
</del><ins>+    auto values = toDOMStringList(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!values))
</span><span class="lines">@@ -5396,13 +5529,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;unsigned&gt; arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Vector&lt;unsigned&gt; nullableArrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</del><ins>+    auto nullableArrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithAndWithoutNullableSequence(arrayArg, nullableArrayArg);
</del><ins>+    impl.methodWithAndWithoutNullableSequence(WTFMove(arrayArg), WTFMove(nullableArrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5416,13 +5549,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;unsigned&gt; arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Vector&lt;unsigned&gt; nullableArrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</del><ins>+    auto nullableArrayArg = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.methodWithAndWithoutNullableSequence2(arrayArg, nullableArrayArg);
</del><ins>+    impl.methodWithAndWithoutNullableSequence2(WTFMove(arrayArg), WTFMove(nullableArrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5453,7 +5586,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestNode* value = JSTestNode::toWrapped(state-&gt;argument(0));
</del><ins>+    auto value = JSTestNode::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!value))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     impl.convert1(*value);
</span><span class="lines">@@ -5470,8 +5603,8 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    TestNode* value = JSTestNode::toWrapped(state-&gt;argument(0));
-    impl.convert2(value);
</del><ins>+    auto value = JSTestNode::toWrapped(state-&gt;argument(0));
+    impl.convert2(WTFMove(value));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5485,10 +5618,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String value = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto value = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.convert3(value);
</del><ins>+    impl.convert3(WTFMove(value));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5502,10 +5635,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String value = valueToStringWithUndefinedOrNullCheck(state, state-&gt;argument(0));
</del><ins>+    auto value = valueToStringWithUndefinedOrNullCheck(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.convert4(value);
</del><ins>+    impl.convert4(WTFMove(value));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5556,16 +5689,16 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String str = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto str = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    float a = state-&gt;argument(1).toFloat(state);
</del><ins>+    auto a = state-&gt;argument(1).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    int b = toInt32(state, state-&gt;argument(2), NormalConversion);
</del><ins>+    auto b = toInt32(state, state-&gt;argument(2), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.strictFunction(str, a, b, ec)));
</del><ins>+    JSValue result = jsBoolean(impl.strictFunction(WTFMove(str), WTFMove(a), WTFMove(b), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5584,13 +5717,13 @@
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isUndefinedOrNull() &amp;&amp; !state-&gt;argument(0).inherits(JSTestObj::info())))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;objArg&quot;, &quot;TestObj&quot;, &quot;strictFunctionWithSequence&quot;, &quot;TestObj&quot;);
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    Vector&lt;unsigned&gt; a = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</del><ins>+    auto a = toNativeArray&lt;unsigned&gt;(state, state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.strictFunctionWithSequence(*objArg, a, ec)));
</del><ins>+    JSValue result = jsBoolean(impl.strictFunctionWithSequence(*objArg, WTFMove(a), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5609,13 +5742,13 @@
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isUndefinedOrNull() &amp;&amp; !state-&gt;argument(0).inherits(JSTestObj::info())))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;objArg&quot;, &quot;TestObj&quot;, &quot;strictFunctionWithArray&quot;, &quot;TestObj&quot;);
</span><del>-    TestObj* objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</del><ins>+    auto objArg = JSTestObj::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    Vector&lt;int&gt; array = toNativeArray&lt;int&gt;(state, state-&gt;argument(1));
</del><ins>+    auto array = toNativeArray&lt;int&gt;(state, state-&gt;argument(1));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.strictFunctionWithArray(*objArg, array, ec)));
</del><ins>+    JSValue result = jsBoolean(impl.strictFunctionWithArray(*objArg, WTFMove(array), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5631,13 +5764,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String head = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto head = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     Vector&lt;String&gt; tail = toNativeArguments&lt;String&gt;(state, 1);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.variadicStringMethod(head, tail);
</del><ins>+    impl.variadicStringMethod(WTFMove(head), tail);
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5651,13 +5784,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    double head = state-&gt;argument(0).toNumber(state);
</del><ins>+    auto head = state-&gt;argument(0).toNumber(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     Vector&lt;double&gt; tail = toNativeArguments&lt;double&gt;(state, 1);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.variadicDoubleMethod(head, tail);
</del><ins>+    impl.variadicDoubleMethod(WTFMove(head), tail);
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5671,7 +5804,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Node* head = JSNode::toWrapped(state-&gt;argument(0));
</del><ins>+    auto head = JSNode::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!head))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     Vector&lt;Node*&gt; tail;
</span><span class="lines">@@ -5694,13 +5827,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    float a = state-&gt;argument(0).toFloat(state);
</del><ins>+    auto a = state-&gt;argument(0).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    int b = toInt32(state, state-&gt;argument(1), NormalConversion);
</del><ins>+    auto b = toInt32(state, state-&gt;argument(1), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.any(a, b);
</del><ins>+    impl.any(WTFMove(a), WTFMove(b));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5738,12 +5871,12 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    float a = state-&gt;argument(0).toFloat(state);
</del><ins>+    auto a = state-&gt;argument(0).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!std::isfinite(a)))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    impl.testPromiseFunctionWithFloatArgument(a, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</del><ins>+    impl.testPromiseFunctionWithFloatArgument(WTFMove(a), DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5781,10 +5914,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;testPromiseFunctionWithOptionalIntArgument&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Optional&lt;int&gt; a = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto a = state-&gt;argument(0).isUndefined() ? Optional&lt;int&gt;() : toInt32(state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.testPromiseFunctionWithOptionalIntArgument(a, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</del><ins>+    impl.testPromiseFunctionWithOptionalIntArgument(WTFMove(a), DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5804,12 +5937,12 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    float a = state-&gt;argument(0).toFloat(state);
</del><ins>+    auto a = state-&gt;argument(0).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!std::isfinite(a)))
</span><span class="cx">         return throwVMTypeError(state);
</span><del>-    impl.testPromiseOverloadedFunction(a, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</del><ins>+    impl.testPromiseOverloadedFunction(WTFMove(a), DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5829,7 +5962,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    FetchRequest* request = JSFetchRequest::toWrapped(state-&gt;argument(0));
</del><ins>+    auto request = JSFetchRequest::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!request))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     impl.testPromiseOverloadedFunction(*request, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
</span><span class="lines">@@ -5890,6 +6023,23 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;attachShadowRoot&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    auto init = build&lt;TestObj::ShadowRootInit&gt;(*state, state-&gt;argument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.attachShadowRoot(WTFMove(init));
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> using TestObjIterator = JSDOMIterator&lt;JSTestObj&gt;;
</span><span class="cx"> using TestObjIteratorPrototype = JSDOMIteratorPrototype&lt;JSTestObj&gt;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    ArrayBuffer* arrayBuffer = toArrayBuffer(state-&gt;argument(0));
</del><ins>+    auto arrayBuffer = toArrayBuffer(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!arrayBuffer))
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    RefPtr&lt;ArrayBufferView&gt; arrayBufferView = toArrayBufferView(state-&gt;argument(0));
</del><ins>+    auto arrayBufferView = toArrayBufferView(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!arrayBufferView))
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Blob* blob = JSBlob::toWrapped(state-&gt;argument(0));
</del><ins>+    auto blob = JSBlob::toWrapped(state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(!blob))
</span><span class="cx">         return throwVMTypeError(state);
</span><span class="cx">     RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(*blob);
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String string = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto string = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(string);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -200,10 +200,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestOverrideBuiltins&quot;, &quot;namedItem&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestOverrideBuiltins::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String name = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;test&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</del><ins>+    auto name = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;test&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.namedItem(name)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.namedItem(WTFMove(name))));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -243,10 +243,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestSerializedScriptValueInterface&quot;, &quot;value&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</del><ins>+    auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setValue(nativeValue);
</del><ins>+    impl.setValue(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -260,10 +260,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestSerializedScriptValueInterface&quot;, &quot;cachedValue&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</del><ins>+    auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setCachedValue(nativeValue);
</del><ins>+    impl.setCachedValue(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestTypedefsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    String hello = state-&gt;argument(0).toWTFString(state);
</del><ins>+    auto hello = state-&gt;argument(0).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isObject()))
</span><span class="lines">@@ -353,10 +353,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestTypedefs&quot;, &quot;unsignedLongLongAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    unsigned long long nativeValue = toUInt64(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toUInt64(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setUnsignedLongLongAttr(nativeValue);
</del><ins>+    impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -370,10 +370,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestTypedefs&quot;, &quot;immutableSerializedScriptValue&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</del><ins>+    auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setImmutableSerializedScriptValue(nativeValue);
</del><ins>+    impl.setImmutableSerializedScriptValue(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -387,10 +387,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestTypedefs&quot;, &quot;attrWithGetterException&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithGetterException(nativeValue);
</del><ins>+    impl.setAttrWithGetterException(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -405,10 +405,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    int nativeValue = toInt32(state, value, NormalConversion);
</del><ins>+    auto nativeValue = toInt32(state, value, NormalConversion);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setAttrWithSetterException(nativeValue, ec);
</del><ins>+    impl.setAttrWithSetterException(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -423,10 +423,10 @@
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestTypedefs&quot;, &quot;stringAttrWithGetterException&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttrWithGetterException(nativeValue);
</del><ins>+    impl.setStringAttrWithGetterException(WTFMove(nativeValue));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -441,10 +441,10 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    String nativeValue = value.toWTFString(state);
</del><ins>+    auto nativeValue = value.toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return false;
</span><del>-    impl.setStringAttrWithSetterException(nativeValue, ec);
</del><ins>+    impl.setStringAttrWithSetterException(WTFMove(nativeValue), ec);
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -463,10 +463,10 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestTypedefs&quot;, &quot;func&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    Vector&lt;int&gt; x = toNativeArray&lt;int&gt;(state, state-&gt;argument(0));
</del><ins>+    auto x = toNativeArray&lt;int&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.func(x);
</del><ins>+    impl.func(WTFMove(x));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -480,22 +480,22 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    float width = state-&gt;argument(0).toFloat(state);
</del><ins>+    auto width = state-&gt;argument(0).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    float height = state-&gt;argument(1).toFloat(state);
</del><ins>+    auto height = state-&gt;argument(1).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    float blur = state-&gt;argument(2).toFloat(state);
</del><ins>+    auto blur = state-&gt;argument(2).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    String color = state-&gt;argument(3).isUndefined() ? String() : state-&gt;uncheckedArgument(3).toWTFString(state);
</del><ins>+    auto color = state-&gt;argument(3).isUndefined() ? String() : state-&gt;uncheckedArgument(3).toWTFString(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Optional&lt;float&gt; alpha = state-&gt;argument(4).isUndefined() ? Optional&lt;float&gt;() : state-&gt;uncheckedArgument(4).toFloat(state);
</del><ins>+    auto alpha = state-&gt;argument(4).isUndefined() ? Optional&lt;float&gt;() : state-&gt;uncheckedArgument(4).toFloat(state);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.setShadow(width, height, blur, color, alpha);
</del><ins>+    impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -509,10 +509,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;RefPtr&lt;SerializedScriptValue&gt;&gt; sequenceArg = (toRefPtrNativeArray&lt;SerializedScriptValue, JSSerializedScriptValue&gt;(state, state-&gt;argument(0), &amp;JSSerializedScriptValue::toWrapped));
</del><ins>+    auto sequenceArg = (toRefPtrNativeArray&lt;SerializedScriptValue, JSSerializedScriptValue&gt;(state, state-&gt;argument(0), &amp;JSSerializedScriptValue::toWrapped));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsNumber(impl.methodWithSequenceArg(sequenceArg));
</del><ins>+    JSValue result = jsNumber(impl.methodWithSequenceArg(WTFMove(sequenceArg)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -526,10 +526,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;String&gt; arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto arrayArg = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.nullableArrayArg(arrayArg);
</del><ins>+    impl.nullableArrayArg(WTFMove(arrayArg));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -543,13 +543,13 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    unsigned long long arg1 = toUInt64(state, state-&gt;argument(0), Clamp);
</del><ins>+    auto arg1 = toUInt64(state, state-&gt;argument(0), Clamp);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    Optional&lt;unsigned long long&gt; arg2 = state-&gt;argument(1).isUndefined() ? Optional&lt;unsigned long long&gt;() : toUInt64(state, state-&gt;uncheckedArgument(1), Clamp);
</del><ins>+    auto arg2 = state-&gt;argument(1).isUndefined() ? Optional&lt;unsigned long long&gt;() : toUInt64(state, state-&gt;uncheckedArgument(1), Clamp);
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.funcWithClamp(arg1, arg2);
</del><ins>+    impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -576,10 +576,10 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    Vector&lt;String&gt; values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(values, ec));
</del><ins>+    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(WTFMove(values), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -596,10 +596,10 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    Vector&lt;String&gt; values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</del><ins>+    auto values = toNativeArray&lt;String&gt;(state, state-&gt;argument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction2(values, ec));
</del><ins>+    JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction2(WTFMove(values), ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -615,10 +615,10 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><del>-    Vector&lt;RefPtr&lt;TestEventTarget&gt;&gt; sequenceArg = (toRefPtrNativeArray&lt;TestEventTarget, JSTestEventTarget&gt;(state, state-&gt;argument(0), &amp;JSTestEventTarget::toWrapped));
</del><ins>+    auto sequenceArg = (toRefPtrNativeArray&lt;TestEventTarget, JSTestEventTarget&gt;(state, state-&gt;argument(0), &amp;JSTestEventTarget::toWrapped));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(sequenceArg));
</del><ins>+    JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> @class DOMNode;
</span><span class="cx"> @class DOMSVGDocument;
</span><span class="cx"> @class DOMSVGPoint;
</span><ins>+@class DOMShadowRootInit;
</ins><span class="cx"> @class DOMTestEnumType;
</span><span class="cx"> @class DOMTestNode;
</span><span class="cx"> @class DOMTestObj;
</span><span class="lines">@@ -39,7 +40,6 @@
</span><span class="cx"> @class DOMTestObjectCConstructor;
</span><span class="cx"> @class DOMTestSubObjConstructor;
</span><span class="cx"> @class DOMany;
</span><del>-@class DOMbool;
</del><span class="cx"> @class NSString;
</span><span class="cx"> @protocol DOMEventListener;
</span><span class="cx"> 
</span><span class="lines">@@ -209,9 +209,10 @@
</span><span class="cx"> - (DOMSVGPoint *)mutablePointFunction;
</span><span class="cx"> - (DOMSVGPoint *)immutablePointFunction;
</span><span class="cx"> - (void)orange;
</span><del>-- (DOMbool *)strictFunction:(NSString *)str a:(float)a b:(int)b;
</del><ins>+- (BOOL)strictFunction:(NSString *)str a:(float)a b:(int)b;
</ins><span class="cx"> - (void)variadicStringMethod:(NSString *)head tail:(NSString *)tail;
</span><span class="cx"> - (void)variadicDoubleMethod:(double)head tail:(double)tail;
</span><span class="cx"> - (void)variadicNodeMethod:(DOMNode *)head tail:(DOMNode *)tail;
</span><span class="cx"> - (void)any:(float)a b:(int)b;
</span><ins>+- (void)attachShadowRoot:(DOMShadowRootInit *)init;
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #import &quot;DOMNodeInternal.h&quot;
</span><span class="cx"> #import &quot;DOMSVGDocumentInternal.h&quot;
</span><span class="cx"> #import &quot;DOMSVGPointInternal.h&quot;
</span><ins>+#import &quot;DOMShadowRootInitInternal.h&quot;
</ins><span class="cx"> #import &quot;DOMTestEnumTypeInternal.h&quot;
</span><span class="cx"> #import &quot;DOMTestNodeInternal.h&quot;
</span><span class="cx"> #import &quot;DOMTestObjInternal.h&quot;
</span><span class="lines">@@ -42,7 +43,6 @@
</span><span class="cx"> #import &quot;DOMTestObjectCConstructorInternal.h&quot;
</span><span class="cx"> #import &quot;DOMTestSubObjConstructorInternal.h&quot;
</span><span class="cx"> #import &quot;DOManyInternal.h&quot;
</span><del>-#import &quot;DOMboolInternal.h&quot;
</del><span class="cx"> #import &quot;Dictionary.h&quot;
</span><span class="cx"> #import &quot;Document.h&quot;
</span><span class="cx"> #import &quot;EventListener.h&quot;
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #import &quot;SVGDocument.h&quot;
</span><span class="cx"> #import &quot;SVGPoint.h&quot;
</span><span class="cx"> #import &quot;SerializedScriptValue.h&quot;
</span><ins>+#import &quot;ShadowRootInit.h&quot;
</ins><span class="cx"> #import &quot;TestEnumType.h&quot;
</span><span class="cx"> #import &quot;TestNode.h&quot;
</span><span class="cx"> #import &quot;TestObj.h&quot;
</span><span class="lines">@@ -65,8 +66,6 @@
</span><span class="cx"> #import &quot;URL.h&quot;
</span><span class="cx"> #import &quot;WebCoreObjCExtras.h&quot;
</span><span class="cx"> #import &quot;WebScriptObjectPrivate.h&quot;
</span><del>-#import &quot;any.h&quot;
-#import &quot;bool.h&quot;
</del><span class="cx"> #import &lt;wtf/GetPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #define IMPL reinterpret_cast&lt;WebCore::TestObj*&gt;(_internal)
</span><span class="lines">@@ -1571,11 +1570,11 @@
</span><span class="cx">     IMPL-&gt;banana();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (DOMbool *)strictFunction:(NSString *)str a:(float)a b:(int)b
</del><ins>+- (BOOL)strictFunction:(NSString *)str a:(float)a b:(int)b
</ins><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><span class="cx">     WebCore::ExceptionCode ec = 0;
</span><del>-    DOMbool *result = kit(WTF::getPtr(IMPL-&gt;strictFunction(str, a, b, ec)));
</del><ins>+    BOOL result = IMPL-&gt;strictFunction(str, a, b, ec);
</ins><span class="cx">     WebCore::raiseOnDOMError(ec);
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="lines">@@ -1606,6 +1605,12 @@
</span><span class="cx">     IMPL-&gt;any(a, b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)attachShadowRoot:(DOMShadowRootInit *)init
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;attachShadowRoot(core(init));
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> WebCore::TestObj* core(DOMTestObj *wrapper)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -307,10 +307,10 @@
</span><span class="cx">     [ImplementedAs=blueberry] attribute long strawberry;
</span><span class="cx"> 
</span><span class="cx">     [StrictTypeChecking] attribute unrestricted float strictFloat;
</span><del>-    [StrictTypeChecking, RaisesException] bool strictFunction(DOMString str, unrestricted float a, long b);
</del><ins>+    [StrictTypeChecking, RaisesException] boolean strictFunction(DOMString str, unrestricted float a, long b);
</ins><span class="cx"> 
</span><del>-    [StrictTypeChecking, RaisesException] bool strictFunctionWithSequence(TestObj objArg, sequence&lt;unsigned long&gt; a);
-    [StrictTypeChecking, RaisesException] bool strictFunctionWithArray(TestObj objArg, long[] array);
</del><ins>+    [StrictTypeChecking, RaisesException] boolean strictFunctionWithSequence(TestObj objArg, sequence&lt;unsigned long&gt; a);
+    [StrictTypeChecking, RaisesException] boolean strictFunctionWithArray(TestObj objArg, long[] array);
</ins><span class="cx"> 
</span><span class="cx">     // ObjectiveC reserved words.
</span><span class="cx">     readonly attribute long      description;
</span><span class="lines">@@ -370,8 +370,14 @@
</span><span class="cx"> #if defined(TESTING_JS)
</span><span class="cx">     [InvokesCustomElementLifecycleCallbacks] void methodWithNeedsLifecycleProcessingStack();
</span><span class="cx"> #endif
</span><ins>+
+    void attachShadowRoot(ShadowRootInit init);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // The following comment should not generate any code.
</span><span class="cx"> // TestObj implements TestImplements;
</span><span class="cx"> 
</span><ins>+enum ShadowRootMode { &quot;open&quot;, &quot;closed&quot; };
+dictionary ShadowRootInit {
+    required ShadowRootMode mode;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/dom/Element.cpp        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -1674,21 +1674,14 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;ShadowRoot&gt; Element::attachShadow(const Dictionary&amp; dictionary, ExceptionCode&amp; ec)
</del><ins>+bool Element::canHaveUserAgentShadowRoot() const
</ins><span class="cx"> {
</span><del>-    String mode;
-    dictionary.get(&quot;mode&quot;, mode);
</del><ins>+    return false;
+}
</ins><span class="cx"> 
</span><del>-    auto type = ShadowRoot::Type::Closed;
-    if (mode == &quot;open&quot;)
-        type = ShadowRoot::Type::Open;
-    else if (mode != &quot;closed&quot;) {
-        ec = TypeError;
-        return nullptr;
-    }
-
-    // FIXME: The current spec allows attachShadow on non-HTML elements.
-    if (!is&lt;HTMLElement&gt;(this) || downcast&lt;HTMLElement&gt;(this)-&gt;canHaveUserAgentShadowRoot()) {
</del><ins>+RefPtr&lt;ShadowRoot&gt; Element::attachShadow(const ShadowRootInit&amp; init, ExceptionCode&amp; ec)
+{
+    if (canHaveUserAgentShadowRoot()) {
</ins><span class="cx">         ec = NOT_SUPPORTED_ERR;
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="lines">@@ -1698,9 +1691,9 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    addShadowRoot(ShadowRoot::create(document(), type));
-
-    return shadowRoot();
</del><ins>+    auto shadow = ShadowRoot::create(document(), init.mode == ShadowRootMode::Open ? ShadowRoot::Type::Open : ShadowRoot::Type::Closed);
+    addShadowRoot(shadow.copyRef());
+    return WTFMove(shadow);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ShadowRoot* Element::shadowRootForBindings(JSC::ExecState&amp; state) const
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/dom/Element.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -249,8 +249,13 @@
</span><span class="cx">     WEBCORE_EXPORT ShadowRoot* shadowRoot() const;
</span><span class="cx">     WEBCORE_EXPORT RefPtr&lt;ShadowRoot&gt; createShadowRoot(ExceptionCode&amp;);
</span><span class="cx"> 
</span><ins>+    enum class ShadowRootMode { Open, Closed };
+    struct ShadowRootInit {
+        ShadowRootMode mode;
+    };
+
</ins><span class="cx">     ShadowRoot* shadowRootForBindings(JSC::ExecState&amp;) const;
</span><del>-    RefPtr&lt;ShadowRoot&gt; attachShadow(const Dictionary&amp;, ExceptionCode&amp;);
</del><ins>+    RefPtr&lt;ShadowRoot&gt; attachShadow(const ShadowRootInit&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     ShadowRoot* userAgentShadowRoot() const;
</span><span class="cx">     WEBCORE_EXPORT ShadowRoot&amp; ensureUserAgentShadowRoot();
</span><span class="lines">@@ -585,11 +590,11 @@
</span><span class="cx"> 
</span><span class="cx">     void cancelFocusAppearanceUpdate();
</span><span class="cx"> 
</span><del>-    // cloneNode is private so that non-virtual cloneElementWithChildren and cloneElementWithoutChildren
-    // are used instead.
</del><ins>+    // The cloneNode function is private so that non-virtual cloneElementWith/WithoutChildren are used instead.
</ins><span class="cx">     Ref&lt;Node&gt; cloneNodeInternal(Document&amp;, CloningOperation) override;
</span><span class="cx">     virtual Ref&lt;Element&gt; cloneElementWithoutAttributesAndChildren(Document&amp;);
</span><span class="cx"> 
</span><ins>+    virtual bool canHaveUserAgentShadowRoot() const;
</ins><span class="cx">     void removeShadowRoot();
</span><span class="cx"> 
</span><span class="cx">     const RenderStyle* existingComputedStyle();
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.idl (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.idl        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/dom/Element.idl        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Shadow DOM API
</span><span class="cx"> #if defined(LANGUAGE_JAVASCRIPT) &amp;&amp; LANGUAGE_JAVASCRIPT
</span><del>-    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, RaisesException] ShadowRoot attachShadow(Dictionary options);
</del><ins>+    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, RaisesException] ShadowRoot attachShadow(ShadowRootInit init);
</ins><span class="cx">     [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot;
</span><span class="cx">     [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -233,6 +233,12 @@
</span><span class="cx">     [NotEnumerable, Conditional=WIRELESS_PLAYBACK_TARGET] attribute EventHandler onwebkitplaybacktargetavailabilitychanged;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum ShadowRootMode { &quot;open&quot;, &quot;closed&quot; };
+
+dictionary ShadowRootInit {
+    required ShadowRootMode mode;
+};
+
</ins><span class="cx"> Element implements ChildNode;
</span><span class="cx"> Element implements ParentNode;
</span><span class="cx"> Element implements NonDocumentTypeChildNode;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.h (200447 => 200448)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.h        2016-05-05 01:06:59 UTC (rev 200447)
+++ trunk/Source/WebCore/html/HTMLElement.h        2016-05-05 03:09:41 UTC (rev 200448)
</span><span class="lines">@@ -89,7 +89,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isHTMLUnknownElement() const { return false; }
</span><span class="cx">     virtual bool isTextControlInnerTextElement() const { return false; }
</span><del>-    virtual bool canHaveUserAgentShadowRoot() const { return false; }
</del><span class="cx"> 
</span><span class="cx">     bool willRespondToMouseMoveEvents() override;
</span><span class="cx">     bool willRespondToMouseWheelEvents() override;
</span></span></pre>
</div>
</div>

</body>
</html>