<!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>[207150] trunk</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/207150">207150</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-10-11 10:33:45 -0700 (Tue, 11 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use IDLTypes in more places
https://bugs.webkit.org/show_bug.cgi?id=163247

Reviewed by Darin Adler.

Source/WebCore:

Switch JS -&gt; Native type conversions to use convert&lt;IDLType&gt;(...) rather
than convert&lt;NativeType&gt;(...). This allows us to differentiate things like
conversion from JSValue to DOMString vs. JSValue to USVString which have different
rules.

* bindings/generic/IDLTypes.h:
Add predicate for integer types.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue):
* bindings/js/JSApplePaySessionCustom.cpp:
(WebCore::JSApplePaySession::completeShippingMethodSelection):
(WebCore::JSApplePaySession::completeShippingContactSelection):
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesKeyGenParams):
(WebCore::createRsaKeyGenParams):
* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::JSCustomElementRegistry::define):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::getCSSCanvasContext):
* bindings/js/JSMockContentFilterSettingsCustom.cpp:
(WebCore::JSMockContentFilterSettings::setDecisionPoint):
(WebCore::toDecision):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::acceptNode):
Switch to new convert&lt;IDLType&gt; style.

* bindings/js/JSDOMBinding.h:
(WebCore::toRefPtrNativeArray): Deleted.
(WebCore::toNativeArray): Deleted.
These can now be called as convert&lt;IDLSequence&lt;IDLInterface&lt;T&gt;&gt;&gt; and convert&lt;IDLType&gt; respectively.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter&lt;IDLNullable&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLBoolean&gt;::convert):
(WebCore::Converter&lt;IDLInterface&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLByte&gt;::convert):
(WebCore::Converter&lt;IDLOctet&gt;::convert):
(WebCore::Converter&lt;IDLShort&gt;::convert):
(WebCore::Converter&lt;IDLUnsignedShort&gt;::convert):
(WebCore::Converter&lt;IDLLong&gt;::convert):
(WebCore::Converter&lt;IDLUnsignedLong&gt;::convert):
(WebCore::Converter&lt;IDLLongLong&gt;::convert):
(WebCore::Converter&lt;IDLUnsignedLongLong&gt;::convert):
(WebCore::Converter&lt;IDLFloat&gt;::convert):
(WebCore::Converter&lt;IDLUnrestrictedFloat&gt;::convert):
(WebCore::Converter&lt;IDLDouble&gt;::convert):
(WebCore::Converter&lt;IDLUnrestrictedDouble&gt;::convert):
(WebCore::Converter&lt;IDLDOMString&gt;::convert):
(WebCore::Converter&lt;IDLUSVString&gt;::convert):
(WebCore::Detail::ArrayConverter::convert):
(WebCore::Converter&lt;IDLSequence&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLFrozenArray&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLDictionary&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLEnumeration&lt;T&gt;&gt;::convert):
(WebCore::Detail::VariadicConverterBase::convert):
(WebCore::Detail::VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt;::convert):
(WebCore::convertVariadicArguments):
(WebCore::convertWrapperType): Deleted.
(WebCore::convertWrapperTypeSequence): Deleted.
(WebCore::Converter&lt;bool&gt;::convert): Deleted.
(WebCore::Converter&lt;String&gt;::convert): Deleted.
(WebCore::Converter&lt;Vector&lt;T&gt;&gt;::convert): Deleted.
(WebCore::Converter&lt;int8_t&gt;::convert): Deleted.
(WebCore::Converter&lt;uint8_t&gt;::convert): Deleted.
(WebCore::Converter&lt;int16_t&gt;::convert): Deleted.
(WebCore::Converter&lt;uint16_t&gt;::convert): Deleted.
(WebCore::Converter&lt;int32_t&gt;::convert): Deleted.
(WebCore::Converter&lt;uint32_t&gt;::convert): Deleted.
(WebCore::Converter&lt;int64_t&gt;::convert): Deleted.
(WebCore::Converter&lt;uint64_t&gt;::convert): Deleted.
Switch Converter to be specialized on IDLTypes. Add support for IDLNullable, IDLSequence, and IDLFrozenArray.

* bindings/scripts/CodeGenerator.pm:
(GetFlattenedMemberTypes): Deleted.
(GetNumberOfNullableMemberTypes): Deleted.
(GetIDLUnionMemberTypes): Deleted.
(GetBaseIDLType): Deleted.
(GetIDLType): Deleted.
Move IDLType conversion logic to CodeGeneratorJS so it can use GetEnumerationClassName and GetDictionaryClassName.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToImplIncludesForIDLType):
Add support for sequences, FrozenArrays and external dictionaries.

(GenerateEnumerationsImplementationContent):
(GenerateEnumerationsHeaderContent):
Change the name of parse&lt;enum&gt; and convert&lt;enum&gt; to parseEnumeration&lt;enum&gt; and convertEnumeration&lt;enum&gt;
to make them more consistent with dictionary conversion specialization and not interfere with the convert
function specialization.

(GenerateDictionaryImplementationContent):
Simplify by using convert&lt;IDLType&gt;.

(GetFlattenedMemberTypes):
(GetNumberOfNullableMemberTypes):
(GetIDLUnionMemberTypes):
(GetBaseIDLType):
(GetIDLType):
Moved from CodeGenerator.pm

(IsHandledByDOMConvert):
(JSValueToNative):
Start switching JSValueToNative over to using convert&lt;IDLType&gt;. Use IsHandledByDOMConvert as a predicate
for what is supported.

* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(cloneType):
(applyTypedefsForSignature):
(parseTypedef):
(parseOperationOrIterator):
(parseSpecialOperation):
Make typedefs work with aggregate types (unions, sequences and FrozenArrays).

* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Update test results.

* bindings/scripts/test/TestTypedefs.idl:
Add additional tests for typedefs that use unions and sequences.

* testing/InternalSettings.idl:
Change the name of a parameter to avoid a name collision.

LayoutTests:

* fast/events/constructors/message-event-constructor-expected.txt:
* fast/mediastream/MediaStreamConstructor-expected.txt:
Update tests for different error message.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasteventsconstructorsmessageeventconstructorexpectedtxt">trunk/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaStreamConstructorexpectedtxt">trunk/LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericIDLTypesh">trunk/Source/WebCore/bindings/generic/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSApplePaySessionCustomcpp">trunk/Source/WebCore/bindings/js/JSApplePaySessionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoAlgorithmDictionarycpp">trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCustomElementRegistryCustomcpp">trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMockContentFilterSettingsCustomcpp">trunk/Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeFilterCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp</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="#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="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestTypedefsidl">trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingsidl">trunk/Source/WebCore/testing/InternalSettings.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/LayoutTests/ChangeLog        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Use IDLTypes in more places
+        https://bugs.webkit.org/show_bug.cgi?id=163247
+
+        Reviewed by Darin Adler.
+
+        * fast/events/constructors/message-event-constructor-expected.txt:
+        * fast/mediastream/MediaStreamConstructor-expected.txt:
+        Update tests for different error message.
+
</ins><span class="cx"> 2016-10-11  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [mac] LayoutTest media/modern-media-controls/play-pause-button/play-pause-button.html is a flaky failure
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsconstructorsmessageeventconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> PASS new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[2] is channel2.port1
</span><span class="cx"> PASS new MessageEvent('eventType', { ports: [] }).ports is []
</span><span class="cx"> PASS new MessageEvent('eventType', { ports: undefined }).ports is []
</span><del>-PASS new MessageEvent('eventType', { ports: [1, 2, 3] }).ports[2] threw exception TypeError: Invalid Array element type.
</del><ins>+PASS new MessageEvent('eventType', { ports: [1, 2, 3] }).ports[2] threw exception TypeError: Type error.
</ins><span class="cx"> PASS new MessageEvent('eventType', { ports: test_object }).ports threw exception TypeError: Type error.
</span><span class="cx"> PASS new MessageEvent('eventType', { ports: document }).ports threw exception TypeError: Type error.
</span><span class="cx"> PASS new MessageEvent('eventType', { ports: null }).ports threw exception TypeError: Value is not a sequence.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaStreamConstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -9,10 +9,10 @@
</span><span class="cx"> PASS typeof MediaStream === 'function' is true
</span><span class="cx"> PASS checkIdAttribute(localStream.id) is true
</span><span class="cx"> PASS new MediaStream(document) threw exception TypeError: Type error.
</span><del>-PASS new MediaStream([document]) threw exception TypeError: Invalid Array element type.
-PASS new MediaStream([stream.getAudioTracks()[0], document]) threw exception TypeError: Invalid Array element type.
-PASS new MediaStream([null]) threw exception TypeError: Invalid Array element type.
-PASS new MediaStream([undefined]) threw exception TypeError: Invalid Array element type.
</del><ins>+PASS new MediaStream([document]) threw exception TypeError: Type error.
+PASS new MediaStream([stream.getAudioTracks()[0], document]) threw exception TypeError: Type error.
+PASS new MediaStream([null]) threw exception TypeError: Type error.
+PASS new MediaStream([undefined]) threw exception TypeError: Type error.
</ins><span class="cx"> PASS new MediaStream(null) threw exception TypeError: Type error.
</span><span class="cx"> PASS new MediaStream(undefined) threw exception TypeError: Type error.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/ChangeLog        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -1,3 +1,140 @@
</span><ins>+2016-10-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Use IDLTypes in more places
+        https://bugs.webkit.org/show_bug.cgi?id=163247
+
+        Reviewed by Darin Adler.
+
+        Switch JS -&gt; Native type conversions to use convert&lt;IDLType&gt;(...) rather
+        than convert&lt;NativeType&gt;(...). This allows us to differentiate things like
+        conversion from JSValue to DOMString vs. JSValue to USVString which have different
+        rules.
+
+        * bindings/generic/IDLTypes.h:
+        Add predicate for integer types.
+
+        * bindings/js/IDBBindingUtilities.cpp:
+        (WebCore::idbKeyPathFromValue):
+        * bindings/js/JSApplePaySessionCustom.cpp:
+        (WebCore::JSApplePaySession::completeShippingMethodSelection):
+        (WebCore::JSApplePaySession::completeShippingContactSelection):
+        * bindings/js/JSCryptoAlgorithmDictionary.cpp:
+        (WebCore::createAesKeyGenParams):
+        (WebCore::createRsaKeyGenParams):
+        * bindings/js/JSCustomElementRegistryCustom.cpp:
+        (WebCore::JSCustomElementRegistry::define):
+        * bindings/js/JSDocumentCustom.cpp:
+        (WebCore::JSDocument::getCSSCanvasContext):
+        * bindings/js/JSMockContentFilterSettingsCustom.cpp:
+        (WebCore::JSMockContentFilterSettings::setDecisionPoint):
+        (WebCore::toDecision):
+        * bindings/js/JSNodeFilterCustom.cpp:
+        (WebCore::JSNodeFilter::acceptNode):
+        Switch to new convert&lt;IDLType&gt; style.
+
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::toRefPtrNativeArray): Deleted.
+        (WebCore::toNativeArray): Deleted.
+        These can now be called as convert&lt;IDLSequence&lt;IDLInterface&lt;T&gt;&gt;&gt; and convert&lt;IDLType&gt; respectively.
+
+        * bindings/js/JSDOMConvert.h:
+        (WebCore::Converter&lt;IDLNullable&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLBoolean&gt;::convert):
+        (WebCore::Converter&lt;IDLInterface&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLByte&gt;::convert):
+        (WebCore::Converter&lt;IDLOctet&gt;::convert):
+        (WebCore::Converter&lt;IDLShort&gt;::convert):
+        (WebCore::Converter&lt;IDLUnsignedShort&gt;::convert):
+        (WebCore::Converter&lt;IDLLong&gt;::convert):
+        (WebCore::Converter&lt;IDLUnsignedLong&gt;::convert):
+        (WebCore::Converter&lt;IDLLongLong&gt;::convert):
+        (WebCore::Converter&lt;IDLUnsignedLongLong&gt;::convert):
+        (WebCore::Converter&lt;IDLFloat&gt;::convert):
+        (WebCore::Converter&lt;IDLUnrestrictedFloat&gt;::convert):
+        (WebCore::Converter&lt;IDLDouble&gt;::convert):
+        (WebCore::Converter&lt;IDLUnrestrictedDouble&gt;::convert):
+        (WebCore::Converter&lt;IDLDOMString&gt;::convert):
+        (WebCore::Converter&lt;IDLUSVString&gt;::convert):
+        (WebCore::Detail::ArrayConverter::convert):
+        (WebCore::Converter&lt;IDLSequence&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLFrozenArray&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLDictionary&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLEnumeration&lt;T&gt;&gt;::convert):
+        (WebCore::Detail::VariadicConverterBase::convert):
+        (WebCore::Detail::VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt;::convert):
+        (WebCore::convertVariadicArguments):
+        (WebCore::convertWrapperType): Deleted.
+        (WebCore::convertWrapperTypeSequence): Deleted.
+        (WebCore::Converter&lt;bool&gt;::convert): Deleted.
+        (WebCore::Converter&lt;String&gt;::convert): Deleted.
+        (WebCore::Converter&lt;Vector&lt;T&gt;&gt;::convert): Deleted.
+        (WebCore::Converter&lt;int8_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;uint8_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;int16_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;uint16_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;int32_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;uint32_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;int64_t&gt;::convert): Deleted.
+        (WebCore::Converter&lt;uint64_t&gt;::convert): Deleted.
+        Switch Converter to be specialized on IDLTypes. Add support for IDLNullable, IDLSequence, and IDLFrozenArray.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (GetFlattenedMemberTypes): Deleted.
+        (GetNumberOfNullableMemberTypes): Deleted.
+        (GetIDLUnionMemberTypes): Deleted.
+        (GetBaseIDLType): Deleted.
+        (GetIDLType): Deleted.
+        Move IDLType conversion logic to CodeGeneratorJS so it can use GetEnumerationClassName and GetDictionaryClassName.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (AddToImplIncludesForIDLType):
+        Add support for sequences, FrozenArrays and external dictionaries.
+
+        (GenerateEnumerationsImplementationContent):
+        (GenerateEnumerationsHeaderContent):
+        Change the name of parse&lt;enum&gt; and convert&lt;enum&gt; to parseEnumeration&lt;enum&gt; and convertEnumeration&lt;enum&gt;
+        to make them more consistent with dictionary conversion specialization and not interfere with the convert
+        function specialization.
+
+        (GenerateDictionaryImplementationContent):
+        Simplify by using convert&lt;IDLType&gt;.
+
+        (GetFlattenedMemberTypes):
+        (GetNumberOfNullableMemberTypes):
+        (GetIDLUnionMemberTypes):
+        (GetBaseIDLType):
+        (GetIDLType):
+        Moved from CodeGenerator.pm
+
+        (IsHandledByDOMConvert):
+        (JSValueToNative):
+        Start switching JSValueToNative over to using convert&lt;IDLType&gt;. Use IsHandledByDOMConvert as a predicate
+        for what is supported.
+
+        * bindings/scripts/IDLParser.pm:
+        (applyTypedefs):
+        (cloneType):
+        (applyTypedefsForSignature):
+        (parseTypedef):
+        (parseOperationOrIterator):
+        (parseSpecialOperation):
+        Make typedefs work with aggregate types (unions, sequences and FrozenArrays).
+
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        Update test results.
+
+        * bindings/scripts/test/TestTypedefs.idl:
+        Add additional tests for typedefs that use unions and sequences.
+
+        * testing/InternalSettings.idl:
+        Change the name of a parameter to avoid a name collision.
+
</ins><span class="cx"> 2016-10-11  Konstantin Tokarev  &lt;annulen@yandex.ru&gt;
</span><span class="cx"> 
</span><span class="cx">         Fixed compilation with !ENABLE(SVG_FONTS)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/IDLTypes.h (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/IDLTypes.h        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/generic/IDLTypes.h        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -130,4 +130,7 @@
</span><span class="cx"> template &lt;typename T&gt;
</span><span class="cx"> struct IsIDLNumber : public std::integral_constant&lt;bool, WTF::IsBaseOfTemplate&lt;IDLNumber, T&gt;::value&gt; { };
</span><span class="cx"> 
</span><ins>+template &lt;typename T&gt;
+struct IsIDLInteger : public std::integral_constant&lt;bool, WTF::IsBaseOfTemplate&lt;IDLInteger, T&gt;::value&gt; { };
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;IDBValue.h&quot;
</span><span class="cx"> #include &quot;IndexKey.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><ins>+#include &quot;JSDOMConvert.h&quot;
</ins><span class="cx"> #include &quot;JSDOMStringList.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><span class="lines">@@ -178,7 +179,7 @@
</span><span class="cx"> {
</span><span class="cx">     IDBKeyPath keyPath;
</span><span class="cx">     if (isJSArray(keyPathValue))
</span><del>-        keyPath = IDBKeyPath(toNativeArray&lt;String&gt;(exec, keyPathValue));
</del><ins>+        keyPath = IDBKeyPath(convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(exec, keyPathValue));
</ins><span class="cx">     else
</span><span class="cx">         keyPath = IDBKeyPath(keyPathValue.toWTFString(&amp;exec));
</span><span class="cx">     return keyPath;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSApplePaySessionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSApplePaySessionCustom.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSApplePaySessionCustom.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSApplePaySessionCustom.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     if (UNLIKELY(state.argumentCount() &lt; 3))
</span><span class="cx">         return JSValue::decode(throwVMError(&amp;state, scope, createNotEnoughArgumentsError(&amp;state)));
</span><span class="cx"> 
</span><del>-    uint16_t status = convert&lt;uint16_t&gt;(state, state.argument(0), NormalConversion);
</del><ins>+    uint16_t status = convert&lt;IDLUnsignedShort&gt;(state, state.argument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx"> 
</span><span class="cx">     Dictionary newTotal = { &amp;state, state.argument(1) };
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">     if (UNLIKELY(state.argumentCount() &lt; 4))
</span><span class="cx">         return JSValue::decode(throwVMError(&amp;state, scope, createNotEnoughArgumentsError(&amp;state)));
</span><span class="cx"> 
</span><del>-    uint16_t status = convert&lt;uint16_t&gt;(state, state.argument(0), NormalConversion);
</del><ins>+    uint16_t status = convert&lt;IDLUnsignedShort&gt;(state, state.argument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx"> 
</span><span class="cx">     ArrayValue newShippingMethods { &amp;state, state.argument(1) };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoAlgorithmDictionarycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     JSValue lengthValue = getProperty(&amp;state, value.getObject(), &quot;length&quot;);
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> 
</span><del>-    result-&gt;length = convert&lt;uint16_t&gt;(state, lengthValue, EnforceRange);
</del><ins>+    result-&gt;length = convert&lt;IDLUnsignedShort&gt;(state, lengthValue, EnforceRange);
</ins><span class="cx"> 
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Why no EnforceRange? Filed as &lt;https://www.w3.org/Bugs/Public/show_bug.cgi?id=23779&gt;.
</span><del>-    result-&gt;modulusLength = convert&lt;uint32_t&gt;(state, modulusLengthValue, NormalConversion);
</del><ins>+    result-&gt;modulusLength = convert&lt;IDLUnsignedLong&gt;(state, modulusLengthValue, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> 
</span><span class="cx">     JSValue publicExponentValue = getProperty(&amp;state, value.getObject(), &quot;publicExponent&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomElementRegistryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">         auto observedAttributesValue = constructor-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;observedAttributes&quot;));
</span><span class="cx">         RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx">         if (!observedAttributesValue.isUndefined()) {
</span><del>-            auto observedAttributes = convert&lt;Vector&lt;String&gt;&gt;(state, observedAttributesValue);
</del><ins>+            auto observedAttributes = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(state, observedAttributesValue);
</ins><span class="cx">             RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx">             elementInterface-&gt;setAttributeChangedCallback(attributeChangedCallback, observedAttributes);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -298,8 +298,6 @@
</span><span class="cx"> RefPtr&lt;JSC::Float64Array&gt; toFloat64Array(JSC::JSValue);
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T, typename JSType&gt; Vector&lt;Ref&lt;T&gt;&gt; toRefNativeArray(JSC::ExecState&amp;, JSC::JSValue);
</span><del>-template&lt;typename T, typename JSType, typename VectorType = Vector&lt;RefPtr&lt;T&gt;&gt;&gt; VectorType toRefPtrNativeArray(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;typename T&gt; Vector&lt;T&gt; toNativeArray(JSC::ExecState&amp;, JSC::JSValue);
</del><span class="cx"> bool hasIteratorMethod(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span><span class="cx"> bool shouldAllowAccessToNode(JSC::ExecState*, Node*);
</span><span class="lines">@@ -839,51 +837,6 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename T, typename JST, typename VectorType&gt; VectorType toRefPtrNativeArray(JSC::ExecState&amp; state, JSC::JSValue value)
-{
-    JSC::VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (!value.isObject()) {
-        throwSequenceTypeError(state, scope);
-        return { };
-    }
-
-    VectorType result;
-    forEachInIterable(&amp;state, value, [&amp;result](JSC::VM&amp; vm, JSC::ExecState* state, JSC::JSValue jsValue) {
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        if (jsValue.inherits(JST::info()))
-            result.append(JST::toWrapped(jsValue));
-        else
-            throwArrayElementTypeError(*state, scope);
-    });
-    return result;
-}
-
-template&lt;typename T&gt; Vector&lt;T&gt; toNativeArray(JSC::ExecState&amp; exec, JSC::JSValue value)
-{
-    JSC::VM&amp; vm = exec.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (!value.isObject()) {
-        throwSequenceTypeError(exec, scope);
-        return Vector&lt;T&gt;();
-    }
-
-    Vector&lt;T&gt; result;
-    forEachInIterable(&amp;exec, value, [&amp;result](JSC::VM&amp; vm, JSC::ExecState* state, JSC::JSValue jsValue) {
-        auto scope = DECLARE_THROW_SCOPE(vm);
-        T convertedValue;
-        bool success = NativeValueTraits&lt;T&gt;::nativeValue(*state, jsValue, convertedValue);
-        ASSERT_UNUSED(scope, scope.exception() || success);
-        if (!success)
-            return;
-        result.append(convertedValue);
-    });
-    return result;
-}
-
</del><span class="cx"> inline String propertyNameToString(JSC::PropertyName propertyName)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!propertyName.isSymbol());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -30,31 +30,27 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-enum class ShouldAllowNonFinite { No, Yes };
</del><ins>+template&lt;typename T&gt; struct Converter;
</ins><span class="cx"> 
</span><del>-template&lt;typename T, typename U = T&gt; using EnableIfIntegralType = typename std::enable_if&lt;std::is_integral&lt;T&gt;::value, U&gt;::type;
-template&lt;typename T, typename U = T&gt; using EnableIfFloatingPointType = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, U&gt;::type;
</del><ins>+template&lt;typename T, typename U = T&gt; using EnableIfIntegralType = typename std::enable_if&lt;IsIDLInteger&lt;T&gt;::value, typename Converter&lt;U&gt;::ReturnType&gt;::type;
+template&lt;typename T, typename U = T&gt; using EnableIfNotIntegralType = typename std::enable_if&lt;!IsIDLInteger&lt;T&gt;::value, typename Converter&lt;U&gt;::ReturnType&gt;::type;
</ins><span class="cx"> 
</span><del>-template&lt;typename T, typename Enable = void&gt; struct Converter;
</del><ins>+template&lt;typename T&gt; EnableIfNotIntegralType&lt;T&gt; convert(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> 
</span><del>-template&lt;typename T&gt; T convert(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;typename T&gt; EnableIfIntegralType&lt;T&gt; convert(JSC::ExecState&amp;, JSC::JSValue, IntegerConversionConfiguration);
-template&lt;typename T&gt; EnableIfIntegralType&lt;Optional&lt;T&gt;&gt; convertNullable(JSC::ExecState&amp;, JSC::JSValue, IntegerConversionConfiguration);
-template&lt;typename T&gt; EnableIfFloatingPointType&lt;T&gt; convert(JSC::ExecState&amp;, JSC::JSValue, ShouldAllowNonFinite);
</del><ins>+// Specialization for integer types, allowing passing of a conversion flag.
+template&lt;typename T&gt; EnableIfIntegralType&lt;T&gt; convert(JSC::ExecState&amp;, JSC::JSValue, IntegerConversionConfiguration = NormalConversion);
</ins><span class="cx"> 
</span><ins>+// Specialized by generated code for IDL dictionary conversion.
</ins><span class="cx"> template&lt;typename T&gt; Optional&lt;T&gt; convertDictionary(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span><del>-// Used for IDL enumerations.
-template&lt;typename T&gt; Optional&lt;T&gt; parse(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+// Specialized by generated code for IDL enumeration conversion.
+template&lt;typename T&gt; Optional&lt;T&gt; parseEnumeration(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;typename T&gt; T convertEnumeration(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;typename T&gt; const char* expectedEnumerationValues();
</span><span class="cx"> 
</span><del>-enum class IsNullable { No, Yes };
-template&lt;typename T, typename JST&gt; T* convertWrapperType(JSC::ExecState&amp;, JSC::JSValue, IsNullable);
-template&lt;typename T, typename JST, typename VectorType&gt; VectorType convertWrapperTypeSequence(JSC::ExecState&amp;, JSC::JSValue);
-
</del><span class="cx"> // This is where the implementation of the things declared above begins:
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; T convert(JSC::ExecState&amp; state, JSC::JSValue value)
</del><ins>+template&lt;typename T&gt; inline EnableIfNotIntegralType&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     return Converter&lt;T&gt;::convert(state, value);
</span><span class="cx"> }
</span><span class="lines">@@ -64,39 +60,43 @@
</span><span class="cx">     return Converter&lt;T&gt;::convert(state, value, configuration);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; inline EnableIfIntegralType&lt;T, Optional&lt;T&gt;&gt; convertNullable(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
-{
-    return value.isUndefinedOrNull() ? Optional&lt;T&gt;() : Converter&lt;T&gt;::convert(state, value, configuration);
-}
</del><ins>+template&lt;typename T&gt; struct DefaultConverter {
+    using ReturnType = typename T::ImplementationType;
+};
</ins><span class="cx"> 
</span><del>-template&lt;typename T&gt; inline EnableIfFloatingPointType&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, ShouldAllowNonFinite allow)
-{
-    return Converter&lt;T&gt;::convert(state, value, allow);
-}
</del><ins>+template&lt;typename T&gt; struct Converter : DefaultConverter&lt;T&gt; {
+};
</ins><span class="cx"> 
</span><del>-template&lt;typename T, typename JST&gt; inline T* convertWrapperType(JSC::ExecState&amp; state, JSC::JSValue value, IsNullable isNullable)
-{
-    JSC::VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-    T* object = JST::toWrapped(value);
-    if (!object &amp;&amp; (isNullable == IsNullable::No || !value.isUndefinedOrNull()))
-        throwTypeError(&amp;state, scope);
-    return object;
-}
</del><ins>+// MARK: -
+// MARK: Nullable type
</ins><span class="cx"> 
</span><del>-template&lt;typename T, typename JST, typename VectorType&gt; inline VectorType convertWrapperTypeSequence(JSC::ExecState&amp; state, JSC::JSValue value)
-{
-    return toRefPtrNativeArray&lt;T, JST, VectorType&gt;(state, value);
-}
</del><ins>+template&lt;typename T&gt; struct Converter&lt;IDLNullable&lt;T&gt;&gt; : DefaultConverter&lt;IDLNullable&lt;T&gt;&gt; {
+    using ReturnType = typename IDLNullable&lt;T&gt;::ImplementationType;
+    
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        // 1. If Type(V) is not Object, and the conversion to an IDL value is being performed
+        // due to V being assigned to an attribute whose type is a nullable callback function
+        // that is annotated with [TreatNonObjectAsNull], then return the IDL nullable type T?
+        // value null.
+        //
+        // NOTE: Handled elsewhere.
</ins><span class="cx"> 
</span><del>-template&lt;typename T&gt; struct DefaultConverter {
-    using OptionalValue = Optional&lt;T&gt;;
-};
</del><ins>+        // 2. Otherwise, if V is null or undefined, then return the IDL nullable type T? value null.
+        if (value.isUndefinedOrNull()) {
+            // FIXME: Should we make it part of the IDLType to provide the null value?
+            return ReturnType();
+        }
</ins><span class="cx"> 
</span><del>-template&lt;typename T, typename Enable&gt; struct Converter : DefaultConverter&lt;T&gt; {
</del><ins>+        // 3. Otherwise, return the result of converting V using the rules for the inner IDL type T.
+        return Converter&lt;T&gt;::convert(state, value);
+    }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;bool&gt; : DefaultConverter&lt;bool&gt; {
</del><ins>+// MARK: -
+// MARK: Boolean type
+
+template&lt;&gt; struct Converter&lt;IDLBoolean&gt; : DefaultConverter&lt;IDLBoolean&gt; {
</ins><span class="cx">     static bool convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         return value.toBoolean(&amp;state);
</span><span class="lines">@@ -103,39 +103,27 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;String&gt; : DefaultConverter&lt;String&gt; {
-    using OptionalValue = String; // Use null string to mean an optional value was not present.
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return value.toWTFString(&amp;state);
-    }
-};
</del><ins>+// MARK: -
+// MARK: Interface type
</ins><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;IDLDOMString&gt; : DefaultConverter&lt;String&gt; {
-    using OptionalValue = String; // Use null string to mean an optional value was not present.
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return value.toWTFString(&amp;state);
-    }
-};
</del><ins>+template&lt;typename T&gt; struct Converter&lt;IDLInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLInterface&lt;T&gt;&gt; {
+    using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
</ins><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;IDLUSVString&gt; : DefaultConverter&lt;String&gt; {
-    using OptionalValue = String; // Use null string to mean an optional value was not present.
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return valueToUSVString(&amp;state, value);
-    }
-};
-
-template&lt;typename T&gt; struct Converter&lt;IDLInterface&lt;T&gt;&gt; : DefaultConverter&lt;T*&gt; {
</del><span class="cx">     static T* convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><del>-        return convertWrapperType&lt;T, typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass&gt;(state, value, IsNullable::No);
</del><ins>+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        T* object = WrapperType::toWrapped(value);
+        if (!object)
+            throwTypeError(&amp;state, scope);
+        return object;
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;JSC::JSValue&gt; : DefaultConverter&lt;JSC::JSValue&gt; {
-    using OptionalValue = JSC::JSValue; // Use jsUndefined() to mean an optional value was not present.
</del><ins>+// MARK: -
+// MARK: Any type
+
+template&lt;&gt; struct Converter&lt;IDLAny&gt; : DefaultConverter&lt;IDLAny&gt; {
</ins><span class="cx">     static JSC::JSValue convert(JSC::ExecState&amp;, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         return value;
</span><span class="lines">@@ -142,15 +130,11 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; struct Converter&lt;Vector&lt;T&gt;&gt; : DefaultConverter&lt;Vector&lt;T&gt;&gt; {
-    static Vector&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return toNativeArray&lt;T&gt;(state, value);
-    }
-};
</del><ins>+// MARK: -
+// MARK: Integer types
</ins><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;int8_t&gt; : DefaultConverter&lt;int8_t&gt; {
-    static int8_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLByte&gt; : DefaultConverter&lt;IDLByte&gt; {
+    static int8_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -164,8 +148,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;uint8_t&gt; : DefaultConverter&lt;uint8_t&gt; {
-    static uint8_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLOctet&gt; : DefaultConverter&lt;IDLOctet&gt; {
+    static uint8_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -179,8 +163,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;int16_t&gt; : DefaultConverter&lt;int16_t&gt; {
-    static int16_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLShort&gt; : DefaultConverter&lt;IDLShort&gt; {
+    static int16_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -194,8 +178,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;uint16_t&gt; : DefaultConverter&lt;uint16_t&gt; {
-    static uint16_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLUnsignedShort&gt; : DefaultConverter&lt;IDLUnsignedShort&gt; {
+    static uint16_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -209,8 +193,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;int32_t&gt; : DefaultConverter&lt;int32_t&gt; {
-    static int32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLLong&gt; : DefaultConverter&lt;IDLLong&gt; {
+    static int32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -224,8 +208,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;uint32_t&gt; : DefaultConverter&lt;uint32_t&gt; {
-    static uint32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLUnsignedLong&gt; : DefaultConverter&lt;IDLUnsignedLong&gt; {
+    static uint32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="cx">         case NormalConversion:
</span><span class="lines">@@ -239,8 +223,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;int64_t&gt; : DefaultConverter&lt;int64_t&gt; {
-    static int64_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLLongLong&gt; : DefaultConverter&lt;IDLLongLong&gt; {
+    static int64_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         if (value.isInt32())
</span><span class="cx">             return value.asInt32();
</span><span class="lines">@@ -257,8 +241,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; struct Converter&lt;uint64_t&gt; : DefaultConverter&lt;uint64_t&gt; {
-    static uint64_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
</del><ins>+template&lt;&gt; struct Converter&lt;IDLUnsignedLongLong&gt; : DefaultConverter&lt;IDLUnsignedLongLong&gt; {
+    static uint64_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = NormalConversion)
</ins><span class="cx">     {
</span><span class="cx">         if (value.isUInt32())
</span><span class="cx">             return value.asUInt32();
</span><span class="lines">@@ -275,18 +259,153 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; struct Converter&lt;T, typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value&gt;::type&gt; : DefaultConverter&lt;T&gt; {
-    static T convert(JSC::ExecState&amp; state, JSC::JSValue value, ShouldAllowNonFinite allow)
</del><ins>+// MARK: -
+// MARK: Floating point types
+
+template&lt;&gt; struct Converter&lt;IDLFloat&gt; : DefaultConverter&lt;IDLFloat&gt; {
+    static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
</ins><span class="cx">     {
</span><span class="cx">         JSC::VM&amp; vm = state.vm();
</span><span class="cx">         auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">         double number = value.toNumber(&amp;state);
</span><del>-        if (allow == ShouldAllowNonFinite::No &amp;&amp; UNLIKELY(!std::isfinite(number)))
</del><ins>+        if (UNLIKELY(!std::isfinite(number)))
</ins><span class="cx">             throwNonFiniteTypeError(state, scope);
</span><del>-        return static_cast&lt;T&gt;(number);
</del><ins>+        return static_cast&lt;float&gt;(number);
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template&lt;&gt; struct Converter&lt;IDLUnrestrictedFloat&gt; : DefaultConverter&lt;IDLUnrestrictedFloat&gt; {
+    static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return static_cast&lt;float&gt;(value.toNumber(&amp;state));
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLDouble&gt; : DefaultConverter&lt;IDLDouble&gt; {
+    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        double number = value.toNumber(&amp;state);
+        if (UNLIKELY(!std::isfinite(number)))
+            throwNonFiniteTypeError(state, scope);
+        return number;
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLUnrestrictedDouble&gt; : DefaultConverter&lt;IDLUnrestrictedDouble&gt; {
+    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return value.toNumber(&amp;state);
+    }
+};
+
+// MARK: -
+// MARK: String types
+
+template&lt;&gt; struct Converter&lt;IDLDOMString&gt; : DefaultConverter&lt;IDLDOMString&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return value.toWTFString(&amp;state);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLUSVString&gt; : DefaultConverter&lt;IDLUSVString&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return valueToUSVString(&amp;state, value);
+    }
+};
+
+// MARK: -
+// MARK: Array-like types
+
+namespace Detail {
+    template&lt;typename IDLType&gt;
+    struct ArrayConverterBase;
+
+    template&lt;typename IDLType&gt; 
+    struct ArrayConverterBase {
+        using ReturnType = Vector&lt;typename IDLType::ImplementationType&gt;;
+    };
+
+    template&lt;typename T&gt;
+    struct ArrayConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
+        using ReturnType = Vector&lt;RefPtr&lt;T&gt;&gt;;
+    };
+
+    template&lt;typename IDLType&gt;
+    struct ArrayConverter : ArrayConverterBase&lt;IDLType&gt; {
+        using ReturnType = typename ArrayConverterBase&lt;IDLType&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            auto&amp; vm = state.vm();
+            auto scope = DECLARE_THROW_SCOPE(vm);
+
+            if (!value.isObject()) {
+                throwSequenceTypeError(state, scope);
+                return { };
+            }
+
+            ReturnType result;
+            forEachInIterable(&amp;state, value, [&amp;result](JSC::VM&amp; vm, JSC::ExecState* state, JSC::JSValue jsValue) {
+                auto scope = DECLARE_THROW_SCOPE(vm);
+
+                auto convertedValue = Converter&lt;IDLType&gt;::convert(*state, jsValue);
+                if (UNLIKELY(scope.exception()))
+                    return;
+                result.append(WTFMove(convertedValue));
+            });
+            return result;
+        }
+    };
+}
+
+template&lt;typename T&gt; struct Converter&lt;IDLSequence&lt;T&gt;&gt; : DefaultConverter&lt;IDLSequence&lt;T&gt;&gt; {
+    using ReturnType = typename Detail::ArrayConverter&lt;T&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return Detail::ArrayConverter&lt;T&gt;::convert(state, value);
+    }
+};
+
+template&lt;typename T&gt; struct Converter&lt;IDLFrozenArray&lt;T&gt;&gt; : DefaultConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
+    using ReturnType = typename Detail::ArrayConverter&lt;T&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return Detail::ArrayConverter&lt;T&gt;::convert(state, value);
+    }
+};
+
+// MARK: -
+// MARK: Dictionary type
+
+template&lt;typename T&gt; struct Converter&lt;IDLDictionary&lt;T&gt;&gt; : DefaultConverter&lt;IDLDictionary&lt;T&gt;&gt; {
+    using ReturnType = Optional&lt;T&gt;;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return convertDictionary&lt;T&gt;(state, value);
+    }
+};
+
+// MARK: -
+// MARK: Enumeration type
+
+template&lt;typename T&gt; struct Converter&lt;IDLEnumeration&lt;T&gt;&gt; : DefaultConverter&lt;IDLEnumeration&lt;T&gt;&gt; {
+    static T convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return convertEnumeration&lt;T&gt;(state, value);
+    }
+};
+
+
+// MARK: -
+// MARK: Union type
+
</ins><span class="cx"> template&lt;typename ReturnType, typename T, bool enabled&gt;
</span><span class="cx"> struct ConditionalConverter;
</span><span class="cx"> 
</span><span class="lines">@@ -327,7 +446,7 @@
</span><span class="cx"> using ConditionalFront = typename Detail::ConditionalFront&lt;List, condition&gt;::type;
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename... T&gt;
</span><del>-struct Converter&lt;IDLUnion&lt;T...&gt;&gt; : DefaultConverter&lt;typename IDLUnion&lt;T...&gt;::ImplementationType&gt;
</del><ins>+struct Converter&lt;IDLUnion&lt;T...&gt;&gt; : DefaultConverter&lt;IDLUnion&lt;T...&gt;&gt;
</ins><span class="cx"> {
</span><span class="cx">     using Type = IDLUnion&lt;T...&gt;;
</span><span class="cx">     using TypeList = typename Type::TypeList;
</span><span class="lines">@@ -431,60 +550,65 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;typename IDLType&gt; 
-struct VariadicConverterBase;
</del><ins>+// MARK: -
+// MARK: Support for variadic tail convertions
</ins><span class="cx"> 
</span><del>-template&lt;typename IDLType&gt; 
-struct VariadicConverterBase {
-    using Item = typename IDLType::ImplementationType;
</del><ins>+namespace Detail {
+    template&lt;typename IDLType&gt;
+    struct VariadicConverterBase;
</ins><span class="cx"> 
</span><del>-    static Optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        auto&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
</del><ins>+    template&lt;typename IDLType&gt; 
+    struct VariadicConverterBase {
+        using Item = typename IDLType::ImplementationType;
</ins><span class="cx"> 
</span><del>-        auto result = Converter&lt;IDLType&gt;::convert(state, value);
-        RETURN_IF_EXCEPTION(scope, Nullopt);
</del><ins>+        static Optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            auto&amp; vm = state.vm();
+            auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx"> 
</span><del>-        return result;
-    }
-};
</del><ins>+            auto result = Converter&lt;IDLType&gt;::convert(state, value);
+            RETURN_IF_EXCEPTION(scope, Nullopt);
</ins><span class="cx"> 
</span><del>-template&lt;typename T&gt;
-struct VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
-    using Item = typename IDLInterface&lt;T&gt;::ImplementationType;
</del><ins>+            return result;
+        }
+    };
</ins><span class="cx"> 
</span><del>-    static Optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        auto* result = Converter&lt;IDLInterface&lt;T&gt;&gt;::convert(state, value);
-        if (!result)
-            return Nullopt;
-        return Optional&lt;Item&gt;(*result);
-    }
-};
</del><ins>+    template&lt;typename T&gt;
+    struct VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
+        using Item = typename IDLInterface&lt;T&gt;::ImplementationType;
</ins><span class="cx"> 
</span><del>-template&lt;typename IDLType&gt;
-struct VariadicConverter : VariadicConverterBase&lt;IDLType&gt; {
-    using Item = typename VariadicConverterBase&lt;IDLType&gt;::Item;
-    using Container = Vector&lt;Item&gt;;
</del><ins>+        static Optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            auto* result = Converter&lt;IDLInterface&lt;T&gt;&gt;::convert(state, value);
+            if (!result)
+                return Nullopt;
+            return Optional&lt;Item&gt;(*result);
+        }
+    };
</ins><span class="cx"> 
</span><del>-    struct Result {
-        size_t argumentIndex;
-        Optional&lt;Container&gt; arguments;
</del><ins>+    template&lt;typename IDLType&gt;
+    struct VariadicConverter : VariadicConverterBase&lt;IDLType&gt; {
+        using Item = typename VariadicConverterBase&lt;IDLType&gt;::Item;
+        using Container = Vector&lt;Item&gt;;
+
+        struct Result {
+            size_t argumentIndex;
+            Optional&lt;Container&gt; arguments;
+        };
</ins><span class="cx">     };
</span><del>-};
</del><ins>+}
</ins><span class="cx"> 
</span><del>-template&lt;typename IDLType&gt; typename VariadicConverter&lt;IDLType&gt;::Result convertVariadicArguments(JSC::ExecState&amp; state, size_t startIndex)
</del><ins>+template&lt;typename IDLType&gt; typename Detail::VariadicConverter&lt;IDLType&gt;::Result convertVariadicArguments(JSC::ExecState&amp; state, size_t startIndex)
</ins><span class="cx"> {
</span><span class="cx">     size_t length = state.argumentCount();
</span><span class="cx">     if (startIndex &gt; length)
</span><span class="cx">         return { 0, Nullopt };
</span><span class="cx"> 
</span><del>-    typename VariadicConverter&lt;IDLType&gt;::Container result;
</del><ins>+    typename Detail::VariadicConverter&lt;IDLType&gt;::Container result;
</ins><span class="cx">     result.reserveInitialCapacity(length - startIndex);
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = startIndex; i &lt; length; ++i) {
</span><del>-        auto value = VariadicConverter&lt;IDLType&gt;::convert(state, state.uncheckedArgument(i));
</del><ins>+        auto value = Detail::VariadicConverter&lt;IDLType&gt;::convert(state, state.uncheckedArgument(i));
</ins><span class="cx">         if (!value)
</span><span class="cx">             return { i, Nullopt };
</span><span class="cx">         result.uncheckedAppend(WTFMove(*value));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -137,9 +137,9 @@
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx">     auto name = state.uncheckedArgument(1).toWTFString(&amp;state);
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><del>-    auto width = convert&lt;int32_t&gt;(state, state.uncheckedArgument(2), NormalConversion);
</del><ins>+    auto width = convert&lt;IDLLong&gt;(state, state.uncheckedArgument(2), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><del>-    auto height = convert&lt;int32_t&gt;(state, state.uncheckedArgument(3), NormalConversion);
</del><ins>+    auto height = convert&lt;IDLLong&gt;(state, state.uncheckedArgument(3), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx"> 
</span><span class="cx">     auto* context = wrapped().getCSSCanvasContext(WTFMove(contextId), WTFMove(name), WTFMove(width), WTFMove(height));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMockContentFilterSettingsCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><del>-    uint8_t nativeValue { convert&lt;uint8_t&gt;(state, value, EnforceRange) };
</del><ins>+    uint8_t nativeValue { convert&lt;IDLOctet&gt;(state, value, EnforceRange) };
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, void());
</span><span class="cx"> 
</span><span class="cx">     DecisionPoint decisionPoint { static_cast&lt;DecisionPoint&gt;(nativeValue) };
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><del>-    uint8_t nativeValue { convert&lt;uint8_t&gt;(state, value, EnforceRange) };
</del><ins>+    uint8_t nativeValue { convert&lt;IDLOctet&gt;(state, value, EnforceRange) };
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, Decision::Allow);
</span><span class="cx"> 
</span><span class="cx">     Decision decision { static_cast&lt;Decision&gt;(nativeValue) };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeFilterCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">         return NodeFilter::FILTER_REJECT;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    uint16_t result = convert&lt;uint16_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto result = convert&lt;IDLUnsignedShort&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, NodeFilter::FILTER_REJECT);
</span><span class="cx"> 
</span><span class="cx">     return result;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -677,99 +677,6 @@
</span><span class="cx">     return &quot;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-# http://heycam.github.io/webidl/#dfn-flattened-union-member-types
-sub GetFlattenedMemberTypes
-{
-    my ($object, $idlUnionType) = @_;
-
-    my @flattenedMemberTypes = ();
-
-    foreach my $memberType (@{$idlUnionType-&gt;subtypes}) {
-        if ($memberType-&gt;isUnion) {
-            push(@flattenedMemberTypes, $object-&gt;GetFlattenedMemberTypes($memberType));
-        } else {
-            push(@flattenedMemberTypes, $memberType);
-        }
-    }
-
-    return @flattenedMemberTypes;
-}
-
-# http://heycam.github.io/webidl/#dfn-number-of-nullable-member-types
-sub GetNumberOfNullableMemberTypes
-{
-    my ($object, $idlUnionType) = @_;
-
-    my $count = 0;
-
-    foreach my $memberType (@{$idlUnionType-&gt;subtypes}) {
-        $count++ if $memberType-&gt;isNullable;
-        $count += $object-&gt;GetNumberOfNullableMemberTypes($memberType) if $memberType-&gt;isUnion;
-    }
-
-    return $count;
-}
-
-sub GetIDLUnionMemberTypes
-{
-    my ($object, $interface, $idlUnionType) = @_;
-
-    my $numberOfNullableMembers = $object-&gt;GetNumberOfNullableMemberTypes($idlUnionType);
-    assert(&quot;Union types must only have 0 or 1 nullable types.&quot;) if $numberOfNullableMembers &gt; 1;
-
-    my @idlUnionMemberTypes = ();
-
-    push(@idlUnionMemberTypes, &quot;IDLNull&quot;) if $numberOfNullableMembers == 1;
-
-    foreach my $memberType ($object-&gt;GetFlattenedMemberTypes($idlUnionType)) {
-        push(@idlUnionMemberTypes, $object-&gt;GetBaseIDLType($interface, $memberType));
-    }
-
-    return @idlUnionMemberTypes;
-}
-
-sub GetBaseIDLType
-{
-    my ($object, $interface, $idlType) = @_;
-
-    my %IDLTypes = (
-        &quot;any&quot; =&gt; &quot;IDLAny&quot;,
-        &quot;boolean&quot; =&gt; &quot;IDLBoolean&quot;,
-        &quot;byte&quot; =&gt; &quot;IDLByte&quot;,
-        &quot;octet&quot; =&gt; &quot;IDLOctet&quot;,
-        &quot;short&quot; =&gt; &quot;IDLShort&quot;,
-        &quot;unsigned short&quot; =&gt; &quot;IDLUnsignedShort&quot;,
-        &quot;long&quot; =&gt; &quot;IDLLong&quot;,
-        &quot;unsigned long&quot; =&gt; &quot;IDLUnsignedLong&quot;,
-        &quot;long long&quot; =&gt; &quot;IDLLongLong&quot;,
-        &quot;unsigned long long&quot; =&gt; &quot;IDLUnsignedLongLong&quot;,
-        &quot;float&quot; =&gt; &quot;IDLFloat&quot;,
-        &quot;unrestricted float&quot; =&gt; &quot;IDLUnrestrictedFloat&quot;,
-        &quot;double&quot; =&gt; &quot;IDLDouble&quot;,
-        &quot;unrestricted double&quot; =&gt; &quot;IDLUnrestrictedDouble&quot;,
-        &quot;DOMString&quot; =&gt; &quot;IDLDOMString&quot;,
-        &quot;ByteString&quot; =&gt; &quot;IDLByteString&quot;,
-        &quot;USVString&quot; =&gt; &quot;IDLUSVString&quot;,
-    );
-
-    return $IDLTypes{$idlType-&gt;name} if exists $IDLTypes{$idlType-&gt;name};
-    return &quot;IDLEnumeration&lt;&quot; . $object-&gt;GetEnumerationClassName($interface, $idlType-&gt;name) . &quot;&gt;&quot; if $object-&gt;IsEnumType($idlType-&gt;name);
-    return &quot;IDLDictionary&lt;&quot; . $object-&gt;GetDictionaryClassName($interface, $idlType-&gt;name) . &quot;&gt;&quot; if $object-&gt;IsDictionaryType($idlType-&gt;name);
-    return &quot;IDLSequence&lt;&quot; . $object-&gt;GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $object-&gt;IsSequenceType($idlType-&gt;name);
-    return &quot;IDLFrozenArray&lt;&quot; . $object-&gt;GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $object-&gt;IsFrozenArrayType($idlType-&gt;name);
-    return &quot;IDLUnion&lt;&quot; . join(&quot;, &quot;, $object-&gt;GetIDLUnionMemberTypes($interface, $idlType)) . &quot;&gt;&quot; if $idlType-&gt;isUnion;
-    return &quot;IDLInterface&lt;&quot; . $idlType-&gt;name . &quot;&gt;&quot;;
-}
-
-sub GetIDLType
-{
-    my ($object, $interface, $idlType) = @_;
-
-    my $baseIDLType = $object-&gt;GetBaseIDLType($interface, $idlType);
-    return &quot;IDLNullable&lt;&quot; . $baseIDLType . &quot;&gt;&quot; if $idlType-&gt;isNullable;
-    return $baseIDLType;
-}
-
</del><span class="cx"> # These match WK_lcfirst and WK_ucfirst defined in builtins_generator.py.
</span><span class="cx"> # Uppercase the first letter while respecting WebKit style guidelines.
</span><span class="cx"> # E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -264,8 +264,18 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if ($codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType-&gt;name)) {
+        AddToImplIncludesForIDLType(@{$idlType-&gt;subtypes}[0], $conditional);
+        return;
+    }
+
+    if ($codeGenerator-&gt;IsExternalDictionaryType($idlType-&gt;name)) {
+        AddToImplIncludes(&quot;JS&quot; . $idlType-&gt;name . &quot;.h&quot;, $conditional);
+        return;
+    }
+
</ins><span class="cx">     if ($codeGenerator-&gt;IsWrapperType($idlType-&gt;name)) {
</span><del>-        AddToImplIncludes(&quot;JS&quot; . $idlType-&gt;name . &quot;.h&quot;);
</del><ins>+        AddToImplIncludes(&quot;JS&quot; . $idlType-&gt;name . &quot;.h&quot;, $conditional);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -881,7 +891,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;template&lt;&gt; Optional&lt;$className&gt; parse&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
</del><ins>+        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; parseEnumeration&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">@@ -899,11 +909,11 @@
</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;JSDOMConvert.h&quot;);
</span><span class="cx"> 
</span><del>-        $result .= &quot;template&lt;&gt; $className convert&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
</del><ins>+        $result .= &quot;template&lt;&gt; $className convertEnumeration&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
</ins><span class="cx">         $result .= &quot;{\n&quot;;
</span><span class="cx">         $result .= &quot;    VM&amp; vm = state.vm();\n&quot;;
</span><span class="cx">         $result .= &quot;    auto throwScope = DECLARE_THROW_SCOPE(vm);\n&quot;;
</span><del>-        $result .= &quot;    auto result = parse&lt;$className&gt;(state, value);\n&quot;;
</del><ins>+        $result .= &quot;    auto result = parseEnumeration&lt;$className&gt;(state, value);\n&quot;;
</ins><span class="cx">         $result .= &quot;    if (UNLIKELY(!result)) {\n&quot;;
</span><span class="cx">         $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
</span><span class="cx">         $result .= &quot;        return { };\n&quot;;
</span><span class="lines">@@ -948,8 +958,8 @@
</span><span class="cx">         $result .= &quot;    static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, $className value) { return jsStringWithCache(state, value); }\n&quot;;
</span><span class="cx">         $result .= &quot;};\n\n&quot;;
</span><span class="cx"> 
</span><del>-        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; parse&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n&quot;;
-        $result .= &quot;template&lt;&gt; $className convert&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n&quot;;
</del><ins>+        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; parseEnumeration&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n&quot;;
+        $result .= &quot;template&lt;&gt; $className convertEnumeration&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n&quot;;
</ins><span class="cx">         $result .= &quot;template&lt;&gt; const char* expectedEnumerationValues&lt;$className&gt;();\n\n&quot;;
</span><span class="cx"> 
</span><span class="cx">         $result .= &quot;#endif\n\n&quot; if $conditionalString;
</span><span class="lines">@@ -1098,9 +1108,10 @@
</span><span class="cx">         # For each dictionary member member declared on dictionary, in lexicographical order:
</span><span class="cx">         my @sortedMembers = sort { $a-&gt;name cmp $b-&gt;name } @{$dictionary-&gt;members};
</span><span class="cx">         foreach my $member (@sortedMembers) {
</span><del>-            $member-&gt;default(&quot;undefined&quot;) if $member-&gt;type eq &quot;any&quot; and !defined($member-&gt;default); # Use undefined as default value for member of type 'any' unless specified otherwise.
</del><ins>+            $member-&gt;default(&quot;undefined&quot;) if $member-&gt;idlType-&gt;name eq &quot;any&quot; and !defined($member-&gt;default); # Use undefined as default value for member of type 'any' unless specified otherwise.
</ins><span class="cx"> 
</span><del>-            my $type = $member-&gt;type;
</del><ins>+            my $idlType = $member-&gt;idlType;
+            AddToImplIncludesForIDLType($idlType);
</ins><span class="cx"> 
</span><span class="cx">             # 5.1. Let key be the identifier of member.
</span><span class="cx">             my $key = $member-&gt;name;
</span><span class="lines">@@ -1108,36 +1119,21 @@
</span><span class="cx">             # 5.2. Let value be an ECMAScript value, depending on Type(V):
</span><span class="cx">             $result .= &quot;    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, \&quot;${key}\&quot;));\n&quot;;
</span><span class="cx"> 
</span><del>-            my $nativeType = GetNativeTypeFromSignature($interface, $member);
</del><ins>+            my $IDLType = GetIDLType($interface, $idlType);
</ins><span class="cx"> 
</span><span class="cx">             # 5.3. If value is not undefined, then:
</span><span class="cx">             $result .= &quot;    if (!${key}Value.isUndefined()) {\n&quot;;
</span><del>-            # FIXME: Eventually we will want this to share a lot more code with JSValueToNative.
-            if ($codeGenerator-&gt;IsWrapperType($type)) {
-                AddToImplIncludes(&quot;JS${type}.h&quot;);
-                die &quot;Dictionary members of non-nullable wrapper types must be marked as required&quot; if !$member-&gt;isNullable &amp;&amp; $member-&gt;isOptional;
-                my $nullableParameter = $member-&gt;isNullable ? &quot;IsNullable::Yes&quot; : &quot;IsNullable::No&quot;;
-                $result .= &quot;        result.$key = convertWrapperType&lt;$type, JS${type}&gt;(state, ${key}Value, $nullableParameter);\n&quot;;
</del><ins>+
+            # FIXME: We should figure out a way to merge these two cases.
+            if ($codeGenerator-&gt;IsDictionaryType($idlType-&gt;name)) {
+                $result .= &quot;        auto ${key}Optional = convert&lt;${IDLType}&gt;(state, ${key}Value);\n&quot;;
</ins><span class="cx">                 $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
</span><del>-            } elsif ($codeGenerator-&gt;IsDictionaryType($type)) {
-                my $nativeType = GetNativeType($interface, $type);
-                $result .= &quot;        Optional&lt;${nativeType}&gt; $key = convertDictionary&lt;${nativeType}&gt;(state, ${key}Value).value();\n&quot;;
-                $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
-                $result .= &quot;        result.$key = $key.value();\n&quot;;
-            } elsif ($codeGenerator-&gt;IsSequenceOrFrozenArrayType($type)) {
-                my $innerType = $codeGenerator-&gt;GetSequenceOrFrozenArrayInnerType($type);
-                if ($codeGenerator-&gt;IsWrapperType($innerType)) {
-                    $result .= &quot;        result.$key = convertWrapperTypeSequence&lt;$innerType, JS$innerType, $nativeType&gt;(state, ${key}Value);\n&quot;;
-                } else {
-                    $result .= &quot;        result.$key = convert&lt;${nativeType}&gt;(state, ${key}Value);\n&quot;;
-                }
-                $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
</del><ins>+                $result .= &quot;        result.$key = ${key}Optional.value();\n&quot;;
</ins><span class="cx">             } else {
</span><del>-                my $conversionRuleWithLeadingComma = GenerateConversionRuleWithLeadingComma($interface, $member);
-                my $convertFunction = $member-&gt;isNullable ? &quot;convertNullable&quot; : &quot;convert&quot;;
-                $result .= &quot;        result.$key = $convertFunction&lt;${nativeType}&gt;(state, ${key}Value${conversionRuleWithLeadingComma});\n&quot;;
</del><ins>+                $result .= &quot;        result.$key = convert&lt;${IDLType}&gt;(state, ${key}Value);\n&quot;;
</ins><span class="cx">                 $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
</span><span class="cx">             }
</span><ins>+
</ins><span class="cx">             # Value is undefined.
</span><span class="cx">             # 5.4. Otherwise, if value is undefined but the dictionary member has a default value, then:
</span><span class="cx">             if ($member-&gt;isOptional &amp;&amp; defined $member-&gt;default) {
</span><span class="lines">@@ -2123,7 +2119,7 @@
</span><span class="cx">             $overload = GetOverloadThatMatches($S, $d, \&amp;$isObjectOrCallbackFunctionParameter);
</span><span class="cx">             &amp;$generateOverloadCallIfNecessary($overload, &quot;distinguishingArg.isFunction()&quot;);
</span><span class="cx"> 
</span><del>-            # FIXME: Avoid invoking GetMethod(object, Symbol.iterator) again in toNativeArray and toRefPtrNativeArray.
</del><ins>+            # FIXME: Avoid invoking GetMethod(object, Symbol.iterator) again in convert&lt;IDLSequence&lt;T&gt;&gt;(...).
</ins><span class="cx">             $overload = GetOverloadThatMatches($S, $d, \&amp;$isSequenceOrFrozenArrayParameter);
</span><span class="cx">             &amp;$generateOverloadCallIfNecessary($overload, &quot;hasIteratorMethod(*state, distinguishingArg)&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -4176,7 +4172,7 @@
</span><span class="cx">             $implIncludes{&quot;JSDOMConvert.h&quot;} = 1;
</span><span class="cx">             AddToImplIncludesForIDLType($idlType, $function-&gt;signature-&gt;extendedAttributes-&gt;{Conditional});
</span><span class="cx">         
</span><del>-            my $metaType = $codeGenerator-&gt;GetIDLType($interface, $idlType);
</del><ins>+            my $metaType = GetIDLType($interface, $idlType);
</ins><span class="cx">             push(@$outputArray, &quot;    auto $name = convertVariadicArguments&lt;$metaType&gt;(*state, $argumentIndex);\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -4215,7 +4211,7 @@
</span><span class="cx">                 $indent = &quot;    &quot;;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            push(@$outputArray, &quot;$indent    $defineOptionalValue = parse&lt;$className&gt;(*state, ${name}Value);\n&quot;);
</del><ins>+            push(@$outputArray, &quot;$indent    $defineOptionalValue = parseEnumeration&lt;$className&gt;(*state, ${name}Value);\n&quot;);
</ins><span class="cx">             push(@$outputArray, &quot;$indent    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent    if (UNLIKELY(!$optionalValue))\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent        return throwArgumentMustBeEnumError(*state, throwScope, $argumentIndex, \&quot;$name\&quot;, \&quot;$visibleInterfaceName\&quot;, $quotedFunctionName, expectedEnumerationValues&lt;$className&gt;());\n&quot;);
</span><span class="lines">@@ -4821,6 +4817,99 @@
</span><span class="cx">     return &quot;Vector&lt;&quot; . GetNativeVectorInnerType($innerType) . &quot;&gt;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+# http://heycam.github.io/webidl/#dfn-flattened-union-member-types
+sub GetFlattenedMemberTypes
+{
+    my ($idlUnionType) = @_;
+
+    my @flattenedMemberTypes = ();
+
+    foreach my $memberType (@{$idlUnionType-&gt;subtypes}) {
+        if ($memberType-&gt;isUnion) {
+            push(@flattenedMemberTypes, GetFlattenedMemberTypes($memberType));
+        } else {
+            push(@flattenedMemberTypes, $memberType);
+        }
+    }
+
+    return @flattenedMemberTypes;
+}
+
+# http://heycam.github.io/webidl/#dfn-number-of-nullable-member-types
+sub GetNumberOfNullableMemberTypes
+{
+    my ($idlUnionType) = @_;
+
+    my $count = 0;
+
+    foreach my $memberType (@{$idlUnionType-&gt;subtypes}) {
+        $count++ if $memberType-&gt;isNullable;
+        $count += GetNumberOfNullableMemberTypes($memberType) if $memberType-&gt;isUnion;
+    }
+
+    return $count;
+}
+
+sub GetIDLUnionMemberTypes
+{
+    my ($interface, $idlUnionType) = @_;
+
+    my $numberOfNullableMembers = GetNumberOfNullableMemberTypes($idlUnionType);
+    assert(&quot;Union types must only have 0 or 1 nullable types.&quot;) if $numberOfNullableMembers &gt; 1;
+
+    my @idlUnionMemberTypes = ();
+
+    push(@idlUnionMemberTypes, &quot;IDLNull&quot;) if $numberOfNullableMembers == 1;
+
+    foreach my $memberType (GetFlattenedMemberTypes($idlUnionType)) {
+        push(@idlUnionMemberTypes, GetBaseIDLType($interface, $memberType));
+    }
+
+    return @idlUnionMemberTypes;
+}
+
+sub GetBaseIDLType
+{
+    my ($interface, $idlType) = @_;
+
+    my %IDLTypes = (
+        &quot;any&quot; =&gt; &quot;IDLAny&quot;,
+        &quot;boolean&quot; =&gt; &quot;IDLBoolean&quot;,
+        &quot;byte&quot; =&gt; &quot;IDLByte&quot;,
+        &quot;octet&quot; =&gt; &quot;IDLOctet&quot;,
+        &quot;short&quot; =&gt; &quot;IDLShort&quot;,
+        &quot;unsigned short&quot; =&gt; &quot;IDLUnsignedShort&quot;,
+        &quot;long&quot; =&gt; &quot;IDLLong&quot;,
+        &quot;unsigned long&quot; =&gt; &quot;IDLUnsignedLong&quot;,
+        &quot;long long&quot; =&gt; &quot;IDLLongLong&quot;,
+        &quot;unsigned long long&quot; =&gt; &quot;IDLUnsignedLongLong&quot;,
+        &quot;float&quot; =&gt; &quot;IDLFloat&quot;,
+        &quot;unrestricted float&quot; =&gt; &quot;IDLUnrestrictedFloat&quot;,
+        &quot;double&quot; =&gt; &quot;IDLDouble&quot;,
+        &quot;unrestricted double&quot; =&gt; &quot;IDLUnrestrictedDouble&quot;,
+        &quot;DOMString&quot; =&gt; &quot;IDLDOMString&quot;,
+        &quot;ByteString&quot; =&gt; &quot;IDLByteString&quot;,
+        &quot;USVString&quot; =&gt; &quot;IDLUSVString&quot;,
+    );
+
+    return $IDLTypes{$idlType-&gt;name} if exists $IDLTypes{$idlType-&gt;name};
+    return &quot;IDLEnumeration&lt;&quot; . GetEnumerationClassName($idlType-&gt;name, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsEnumType($idlType-&gt;name);
+    return &quot;IDLDictionary&lt;&quot; . GetDictionaryClassName($idlType-&gt;name, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsDictionaryType($idlType-&gt;name);
+    return &quot;IDLSequence&lt;&quot; . GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsSequenceType($idlType-&gt;name);
+    return &quot;IDLFrozenArray&lt;&quot; . GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsFrozenArrayType($idlType-&gt;name);
+    return &quot;IDLUnion&lt;&quot; . join(&quot;, &quot;, GetIDLUnionMemberTypes($interface, $idlType)) . &quot;&gt;&quot; if $idlType-&gt;isUnion;
+    return &quot;IDLInterface&lt;&quot; . $idlType-&gt;name . &quot;&gt;&quot;;
+}
+
+sub GetIDLType
+{
+    my ($interface, $idlType) = @_;
+
+    my $baseIDLType = GetBaseIDLType($interface, $idlType);
+    return &quot;IDLNullable&lt;&quot; . $baseIDLType . &quot;&gt;&quot; if $idlType-&gt;isNullable;
+    return $baseIDLType;
+}
+
</ins><span class="cx"> sub GetNativeType
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $type) = @_;
</span><span class="lines">@@ -4925,6 +5014,20 @@
</span><span class="cx">     return &quot;NormalConversion&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub IsHandledByDOMConvert
+{
+    my $idlType = shift;
+
+    return 1 if $idlType-&gt;isUnion;
+    return 1 if $idlType-&gt;name eq &quot;any&quot;;
+    return 1 if $idlType-&gt;name eq &quot;boolean&quot;;
+    return 1 if $codeGenerator-&gt;IsIntegerType($idlType-&gt;name);
+    return 1 if $codeGenerator-&gt;IsFloatingPointType($idlType-&gt;name);
+    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType-&gt;name);
+    return 1 if $codeGenerator-&gt;IsDictionaryType($idlType-&gt;name);
+    return 0;
+}
+
</ins><span class="cx"> # Returns (convertString, mayThrowException).
</span><span class="cx"> sub JSValueToNative
</span><span class="cx"> {
</span><span class="lines">@@ -4931,12 +5034,20 @@
</span><span class="cx">     my ($interface, $signature, $value, $conditional) = @_;
</span><span class="cx"> 
</span><span class="cx">     my $type = $signature-&gt;type;
</span><ins>+    my $idlType = $signature-&gt;idlType;
</ins><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsIntegerType($type)) {
-        my $nativeType = GetNativeType($interface, $type);
-        my $conversionType = GetIntegerConversionConfiguration($signature);
</del><ins>+    if (IsHandledByDOMConvert($idlType)) {
</ins><span class="cx">         AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
</span><del>-        return (&quot;convert&lt;$nativeType&gt;(*state, $value, $conversionType)&quot;, 1);
</del><ins>+        AddToImplIncludesForIDLType($idlType, $conditional);
+
+        my $IDLType = GetIDLType($interface, $idlType);
+
+        if ($codeGenerator-&gt;IsIntegerType($type)) {
+            my $conversionType = GetIntegerConversionConfiguration($signature);
+            return (&quot;convert&lt;$IDLType&gt;(*state, $value, $conversionType)&quot;, 1);
+        }
+
+        return (&quot;convert&lt;$IDLType&gt;(*state, $value)&quot;, 1);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ($type eq &quot;DOMString&quot;) {
</span><span class="lines">@@ -4965,35 +5076,9 @@
</span><span class="cx">         return (&quot;Dictionary(state, $value)&quot;, 0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsSequenceOrFrozenArrayType($type)) {
-        my $innerType = $codeGenerator-&gt;GetSequenceOrFrozenArrayInnerType($type);
-        if ($codeGenerator-&gt;IsRefPtrType($innerType)) {
-            AddToImplIncludes(&quot;JS${innerType}.h&quot;);
-            return (&quot;toRefPtrNativeArray&lt;${innerType}, JS${innerType}&gt;(*state, $value)&quot;, 1);
-        }
-        return (&quot;toNativeArray&lt;&quot; . GetNativeVectorInnerType($innerType) . &quot;&gt;(*state, $value)&quot;, 1);
-    }
-
-    return ($value, 0) if $type eq &quot;any&quot;;
-
-    return (&quot;$value.toBoolean(state)&quot;, 1) if $type eq &quot;boolean&quot;;
-
-    if ($codeGenerator-&gt;IsFloatingPointType($type)) {
-        AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
-        my $allowNonFinite = ShouldAllowNonFiniteForFloatingPointType($type) ? &quot;ShouldAllowNonFinite::Yes&quot; : &quot;ShouldAllowNonFinite::No&quot;;
-        my $nativeType = GetNativeType($interface, $type);
-        return (&quot;convert&lt;$nativeType&gt;(*state, $value, $allowNonFinite)&quot;, 1);
-    }
-
</del><span class="cx">     return (&quot;valueToDate(state, $value)&quot;, 1) if $type eq &quot;Date&quot;;
</span><del>-
</del><span class="cx">     return (&quot;to$type($value)&quot;, 1) if $codeGenerator-&gt;IsTypedArrayType($type);
</span><del>-    return (&quot;parse&lt;&quot; . GetEnumerationClassName($type, $interface) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
-    if ($codeGenerator-&gt;IsDictionaryType($type)) {
-        my $dictionary = $codeGenerator-&gt;GetDictionaryByName($type);
-        AddToImplIncludes(&quot;JS$type.h&quot;, $conditional) if $codeGenerator-&gt;IsExternalDictionaryType($type);
-        return (&quot;convertDictionary&lt;&quot; . GetDictionaryClassName($type, $interface) . &quot;&gt;(*state, $value)&quot;, 1);
-    }
</del><ins>+    return (&quot;parseEnumeration&lt;&quot; . GetEnumerationClassName($type, $interface) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
</ins><span class="cx"> 
</span><span class="cx">     AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLParserpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct( Typedef =&gt; {
</span><span class="cx">     extendedAttributes =&gt; '$', # Extended attributes
</span><del>-    type =&gt; '$', # Type of data
</del><ins>+    idlType =&gt; '$', # Type of data
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> # Maps 'typedef name' -&gt; Typedef
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx">                 if (exists $typedefs{$constant-&gt;type}) {
</span><span class="cx">                     my $typedef = $typedefs{$constant-&gt;type};
</span><span class="cx">                     $self-&gt;assertNoExtendedAttributesInTypedef($constant-&gt;type, __LINE__);
</span><del>-                    $constant-&gt;type($typedef-&gt;type);
</del><ins>+                    $constant-&gt;type($typedef-&gt;idlType-&gt;name);
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             foreach my $attribute (@{$definition-&gt;attributes}) {
</span><span class="lines">@@ -441,37 +441,89 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub cloneType
+{
+    my $self = shift;
+    my $type = shift;
+
+    my $clonedType = domType-&gt;new();
+    $clonedType-&gt;name($type-&gt;name);
+    $clonedType-&gt;isNullable($type-&gt;isNullable);
+    $clonedType-&gt;isUnion($type-&gt;isUnion);
+    foreach my $subtype (@{$type-&gt;subtypes}) {
+        push(@{$clonedType-&gt;subtypes}, $self-&gt;cloneType($subtype));
+    }
+
+    return $clonedType;
+}
+
</ins><span class="cx"> sub applyTypedefsForSignature
</span><span class="cx"> {
</span><span class="cx">     my $self = shift;
</span><span class="cx">     my $signature = shift;
</span><span class="cx"> 
</span><del>-    if (!defined ($signature-&gt;type)) {
</del><ins>+    if (!defined ($signature-&gt;idlType)) {
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my $type = $signature-&gt;type;
-    $type =~ s/[\?\[\]]+$//g;
-    my $typeSuffix = $signature-&gt;type;
-    $typeSuffix =~ s/^[^\?\[\]]+//g;
-    if (exists $typedefs{$type}) {
-        my $typedef = $typedefs{$type};
-        $signature-&gt;type($typedef-&gt;type . $typeSuffix);
-        copyExtendedAttributes($signature-&gt;extendedAttributes, $typedef-&gt;extendedAttributes);
-    }
</del><ins>+    my $typeName = $signature-&gt;idlType-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     # Handle union types, sequences and etc.
</span><del>-    foreach my $name (%typedefs) {
-        if (!exists $typedefs{$name}) {
-            next;
</del><ins>+    # FIXME: This should be recursive.
+    my $numberOfSubtypes = scalar @{$signature-&gt;idlType-&gt;subtypes};
+    if ($numberOfSubtypes) {
+        my $typeUpdated = 0;
+    
+        for my $i (0..$numberOfSubtypes - 1) {
+            my $subtype = @{$signature-&gt;idlType-&gt;subtypes}[$i];
+            my $subtypeName = $subtype-&gt;name;
+
+            if (exists $typedefs{$subtypeName}) {
+                my $typedef = $typedefs{$subtypeName};
+
+                my $clonedType = $self-&gt;cloneType($typedef-&gt;idlType);
+                
+                # Retain nullability from the original type.
+                $clonedType-&gt;isNullable($subtype-&gt;isNullable);
+                
+                @{$signature-&gt;idlType-&gt;subtypes}[$i] = $clonedType;
+                
+                $typeUpdated = 1;
+            }
</ins><span class="cx">         }
</span><del>-        my $typedef = $typedefs{$name};
-        my $regex = '\\b' . $name . '\\b';
-        my $replacement = $typedef-&gt;type;
-        my $type = $signature-&gt;type;
-        $type =~ s/($regex)/$replacement/g;
-        $signature-&gt;type($type);
</del><ins>+
+        # FIXME: This can be removed when we use domTypes in the CodeGenerators everywhere.
+        if ($typeUpdated) {
+            my $subtype = @{$signature-&gt;idlType-&gt;subtypes}[0];
+            my $subtypeName = $subtype-&gt;name;
+
+            if ($signature-&gt;idlType-&gt;name =~ /^sequence&lt;/) {
+                $signature-&gt;idlType-&gt;name(&quot;sequence&lt;${subtypeName}&gt;&quot;);
+                $signature-&gt;type($signature-&gt;idlType-&gt;name);
+            }
+            if ($signature-&gt;idlType-&gt;name =~ /^FrozenArray&lt;/) {
+                $signature-&gt;idlType-&gt;name(&quot;FrozenArray&lt;${subtypeName}&gt;&quot;);
+                $signature-&gt;type($signature-&gt;idlType-&gt;name);
+            }
+        }
+    
+        return;
</ins><span class="cx">     }
</span><ins>+
+    if (exists $typedefs{$typeName}) {
+        my $typedef = $typedefs{$typeName};
+
+        my $clonedType = $self-&gt;cloneType($typedef-&gt;idlType);
+        
+        # Retain nullability from the original type.
+        $clonedType-&gt;isNullable($signature-&gt;idlType-&gt;isNullable);
+
+        $signature-&gt;idlType($clonedType);
+        $signature-&gt;type($clonedType-&gt;name);
+        $signature-&gt;isNullable($clonedType-&gt;isNullable);
+
+        copyExtendedAttributes($signature-&gt;extendedAttributes, $typedef-&gt;extendedAttributes);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub parseDefinition
</span><span class="lines">@@ -920,13 +972,13 @@
</span><span class="cx">         $typedef-&gt;extendedAttributes($self-&gt;parseExtendedAttributeListAllowEmpty());
</span><span class="cx"> 
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $typedef-&gt;type($type-&gt;name);
</del><ins>+        $typedef-&gt;idlType($type);
</ins><span class="cx"> 
</span><span class="cx">         my $nameToken = $self-&gt;getToken();
</span><span class="cx">         $self-&gt;assertTokenType($nameToken, IdentifierToken);
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;;&quot;, __LINE__);
</span><span class="cx">         my $name = $nameToken-&gt;value();
</span><del>-        die &quot;typedef redefinition for &quot; . $name . &quot; at &quot; . $self-&gt;{Line} if (exists $typedefs{$name} &amp;&amp; $typedef-&gt;type ne $typedefs{$name}-&gt;type);
</del><ins>+        die &quot;typedef redefinition for &quot; . $name . &quot; at &quot; . $self-&gt;{Line} if (exists $typedefs{$name} &amp;&amp; $typedef-&gt;idlType-&gt;name ne $typedefs{$name}-&gt;idlType-&gt;name);
</ins><span class="cx">         $typedefs{$name} = $typedef;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1314,6 +1366,7 @@
</span><span class="cx">         my $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;type() == IdentifierToken || $next-&gt;value() eq &quot;(&quot;) {
</span><span class="cx">             my $operation = $self-&gt;parseOperationRest($extendedAttributeList);
</span><ins>+            $operation-&gt;signature-&gt;idlType($returnType);
</ins><span class="cx">             $operation-&gt;signature-&gt;type($returnType-&gt;name);
</span><span class="cx">             $operation-&gt;signature-&gt;isNullable($returnType-&gt;isNullable);
</span><span class="cx"> 
</span><span class="lines">@@ -1335,6 +1388,7 @@
</span><span class="cx">         my $returnType = $self-&gt;parseReturnType();
</span><span class="cx">         my $interface = $self-&gt;parseOperationRest($extendedAttributeList);
</span><span class="cx">         if (defined ($interface)) {
</span><ins>+            $interface-&gt;signature-&gt;idlType($returnType);
</ins><span class="cx">             $interface-&gt;signature-&gt;type($returnType-&gt;name);
</span><span class="cx">             $interface-&gt;signature-&gt;isNullable($returnType-&gt;isNullable);
</span><span class="cx">             $interface-&gt;signature-&gt;specials(\@specials);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -213,7 +213,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto index = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto index = convert&lt;IDLUnsignedLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.item(WTFMove(index)));
</span><span class="cx">     return JSValue::encode(result);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -416,7 +416,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto testParam = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto testParam = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumType&gt; parse&lt;TestObj::EnumType&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumType&gt; parseEnumeration&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">@@ -124,11 +124,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::EnumType convert&lt;TestObj::EnumType&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::EnumType convertEnumeration&lt;TestObj::EnumType&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::EnumType&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::EnumType&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Optional&gt; parse&lt;TestObj::Optional&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Optional&gt; parseEnumeration&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">@@ -171,11 +171,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::Optional convert&lt;TestObj::Optional&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::Optional convertEnumeration&lt;TestObj::Optional&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::Optional&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::Optional&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;AlternateEnumName&gt; parse&lt;AlternateEnumName&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;AlternateEnumName&gt; parseEnumeration&lt;AlternateEnumName&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;enumValue1&quot;)
</span><span class="lines">@@ -210,11 +210,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; AlternateEnumName convert&lt;AlternateEnumName&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; AlternateEnumName convertEnumeration&lt;AlternateEnumName&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;AlternateEnumName&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;AlternateEnumName&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumA&gt; parse&lt;TestObj::EnumA&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumA&gt; parseEnumeration&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">@@ -247,11 +247,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::EnumA convert&lt;TestObj::EnumA&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::EnumA convertEnumeration&lt;TestObj::EnumA&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::EnumA&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::EnumA&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumB&gt; parse&lt;TestObj::EnumB&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumB&gt; parseEnumeration&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">@@ -286,11 +286,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::EnumB convert&lt;TestObj::EnumB&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::EnumB convertEnumeration&lt;TestObj::EnumB&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::EnumB&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::EnumB&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumC&gt; parse&lt;TestObj::EnumC&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumC&gt; parseEnumeration&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">@@ -325,11 +325,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::EnumC convert&lt;TestObj::EnumC&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::EnumC convertEnumeration&lt;TestObj::EnumC&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::EnumC&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::EnumC&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Kind&gt; parse&lt;TestObj::Kind&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Kind&gt; parseEnumeration&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">@@ -366,11 +366,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::Kind convert&lt;TestObj::Kind&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::Kind convertEnumeration&lt;TestObj::Kind&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::Kind&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::Kind&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Size&gt; parse&lt;TestObj::Size&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Size&gt; parseEnumeration&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">@@ -405,11 +405,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::Size convert&lt;TestObj::Size&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::Size convertEnumeration&lt;TestObj::Size&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::Size&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::Size&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -434,7 +434,7 @@
</span><span class="cx">     return jsStringWithCache(state, values[static_cast&lt;size_t&gt;(enumerationValue)]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Confidence&gt; parse&lt;TestObj::Confidence&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Confidence&gt; parseEnumeration&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">@@ -444,11 +444,11 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; TestObj::Confidence convert&lt;TestObj::Confidence&gt;(ExecState&amp; state, JSValue value)
</del><ins>+template&lt;&gt; TestObj::Confidence convertEnumeration&lt;TestObj::Confidence&gt;(ExecState&amp; state, JSValue value)
</ins><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto result = parse&lt;TestObj::Confidence&gt;(state, value);
</del><ins>+    auto result = parseEnumeration&lt;TestObj::Confidence&gt;(state, value);
</ins><span class="cx">     if (UNLIKELY(!result)) {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return { };
</span><span class="lines">@@ -478,75 +478,75 @@
</span><span class="cx">     TestObj::Dictionary result;
</span><span class="cx">     JSValue anyTypedefValueValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;anyTypedefValue&quot;));
</span><span class="cx">     if (!anyTypedefValueValue.isUndefined()) {
</span><del>-        result.anyTypedefValue = convert&lt;JSC::JSValue&gt;(state, anyTypedefValueValue);
</del><ins>+        result.anyTypedefValue = convert&lt;IDLAny&gt;(state, anyTypedefValueValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.anyTypedefValue = jsUndefined();
</span><span class="cx">     JSValue anyValueValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;anyValue&quot;));
</span><span class="cx">     if (!anyValueValue.isUndefined()) {
</span><del>-        result.anyValue = convert&lt;JSC::JSValue&gt;(state, anyValueValue);
</del><ins>+        result.anyValue = convert&lt;IDLAny&gt;(state, anyValueValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.anyValue = jsUndefined();
</span><span class="cx">     JSValue anyValueWithNullDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;anyValueWithNullDefault&quot;));
</span><span class="cx">     if (!anyValueWithNullDefaultValue.isUndefined()) {
</span><del>-        result.anyValueWithNullDefault = convert&lt;JSC::JSValue&gt;(state, anyValueWithNullDefaultValue);
</del><ins>+        result.anyValueWithNullDefault = convert&lt;IDLAny&gt;(state, anyValueWithNullDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.anyValueWithNullDefault = jsNull();
</span><span class="cx">     JSValue booleanWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithDefault&quot;));
</span><span class="cx">     if (!booleanWithDefaultValue.isUndefined()) {
</span><del>-        result.booleanWithDefault = convert&lt;bool&gt;(state, booleanWithDefaultValue);
</del><ins>+        result.booleanWithDefault = convert&lt;IDLBoolean&gt;(state, booleanWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.booleanWithDefault = false;
</span><span class="cx">     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;));
</span><span class="cx">     if (!booleanWithoutDefaultValue.isUndefined()) {
</span><del>-        result.booleanWithoutDefault = convert&lt;bool&gt;(state, booleanWithoutDefaultValue);
</del><ins>+        result.booleanWithoutDefault = convert&lt;IDLBoolean&gt;(state, booleanWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue dictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;dictionaryMember&quot;));
</span><span class="cx">     if (!dictionaryMemberValue.isUndefined()) {
</span><del>-        Optional&lt;TestObj::DictionaryThatShouldTolerateNull&gt; dictionaryMember = convertDictionary&lt;TestObj::DictionaryThatShouldTolerateNull&gt;(state, dictionaryMemberValue).value();
</del><ins>+        auto dictionaryMemberOptional = convert&lt;IDLDictionary&lt;TestObj::DictionaryThatShouldTolerateNull&gt;&gt;(state, dictionaryMemberValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><del>-        result.dictionaryMember = dictionaryMember.value();
</del><ins>+        result.dictionaryMember = dictionaryMemberOptional.value();
</ins><span class="cx">     }
</span><span class="cx">     JSValue enumerationValueWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithDefault&quot;));
</span><span class="cx">     if (!enumerationValueWithDefaultValue.isUndefined()) {
</span><del>-        result.enumerationValueWithDefault = convert&lt;TestObj::EnumType&gt;(state, enumerationValueWithDefaultValue);
</del><ins>+        result.enumerationValueWithDefault = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, enumerationValueWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.enumerationValueWithDefault = TestObj::EnumType::EnumValue1;
</span><span class="cx">     JSValue enumerationValueWithEmptyStringDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithEmptyStringDefault&quot;));
</span><span class="cx">     if (!enumerationValueWithEmptyStringDefaultValue.isUndefined()) {
</span><del>-        result.enumerationValueWithEmptyStringDefault = convert&lt;TestObj::EnumType&gt;(state, enumerationValueWithEmptyStringDefaultValue);
</del><ins>+        result.enumerationValueWithEmptyStringDefault = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, enumerationValueWithEmptyStringDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.enumerationValueWithEmptyStringDefault = TestObj::EnumType::EmptyString;
</span><span class="cx">     JSValue enumerationValueWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithoutDefault&quot;));
</span><span class="cx">     if (!enumerationValueWithoutDefaultValue.isUndefined()) {
</span><del>-        result.enumerationValueWithoutDefault = convert&lt;TestObj::EnumType&gt;(state, enumerationValueWithoutDefaultValue);
</del><ins>+        result.enumerationValueWithoutDefault = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, enumerationValueWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue integerValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;integer&quot;));
</span><span class="cx">     if (!integerValue.isUndefined()) {
</span><del>-        result.integer = convert&lt;int32_t&gt;(state, integerValue, NormalConversion);
</del><ins>+        result.integer = convert&lt;IDLLong&gt;(state, integerValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue integerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;integerWithDefault&quot;));
</span><span class="cx">     if (!integerWithDefaultValue.isUndefined()) {
</span><del>-        result.integerWithDefault = convert&lt;int32_t&gt;(state, integerWithDefaultValue, NormalConversion);
</del><ins>+        result.integerWithDefault = convert&lt;IDLLong&gt;(state, integerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.integerWithDefault = 0;
</span><span class="cx">     JSValue largeIntegerValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;largeInteger&quot;));
</span><span class="cx">     if (!largeIntegerValue.isUndefined()) {
</span><del>-        result.largeInteger = convert&lt;int64_t&gt;(state, largeIntegerValue, NormalConversion);
</del><ins>+        result.largeInteger = convert&lt;IDLLongLong&gt;(state, largeIntegerValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue largeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;largeIntegerWithDefault&quot;));
</span><span class="cx">     if (!largeIntegerWithDefaultValue.isUndefined()) {
</span><del>-        result.largeIntegerWithDefault = convert&lt;int64_t&gt;(state, largeIntegerWithDefaultValue, NormalConversion);
</del><ins>+        result.largeIntegerWithDefault = convert&lt;IDLLongLong&gt;(state, largeIntegerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.largeIntegerWithDefault = 0;
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx">         result.nullableIntegerWithDefault = Nullopt;
</span><span class="cx">     JSValue nullableNodeValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;nullableNode&quot;));
</span><span class="cx">     if (!nullableNodeValue.isUndefined()) {
</span><del>-        result.nullableNode = convertWrapperType&lt;Node, JSNode&gt;(state, nullableNodeValue, IsNullable::Yes);
</del><ins>+        result.nullableNode = convert&lt;IDLNullable&lt;IDLInterface&lt;Node&gt;&gt;&gt;(state, nullableNodeValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.nullableNode = nullptr;
</span><span class="lines">@@ -570,104 +570,104 @@
</span><span class="cx">         result.nullableStringWithDefault = String();
</span><span class="cx">     JSValue restrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedDouble&quot;));
</span><span class="cx">     if (!restrictedDoubleValue.isUndefined()) {
</span><del>-        result.restrictedDouble = convert&lt;double&gt;(state, restrictedDoubleValue, ShouldAllowNonFinite::No);
</del><ins>+        result.restrictedDouble = convert&lt;IDLDouble&gt;(state, restrictedDoubleValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue restrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedDoubleWithDefault&quot;));
</span><span class="cx">     if (!restrictedDoubleWithDefaultValue.isUndefined()) {
</span><del>-        result.restrictedDoubleWithDefault = convert&lt;double&gt;(state, restrictedDoubleWithDefaultValue, ShouldAllowNonFinite::No);
</del><ins>+        result.restrictedDoubleWithDefault = convert&lt;IDLDouble&gt;(state, restrictedDoubleWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.restrictedDoubleWithDefault = 0;
</span><span class="cx">     JSValue restrictedFloatValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedFloat&quot;));
</span><span class="cx">     if (!restrictedFloatValue.isUndefined()) {
</span><del>-        result.restrictedFloat = convert&lt;float&gt;(state, restrictedFloatValue, ShouldAllowNonFinite::No);
</del><ins>+        result.restrictedFloat = convert&lt;IDLFloat&gt;(state, restrictedFloatValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue restrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedFloatWithDefault&quot;));
</span><span class="cx">     if (!restrictedFloatWithDefaultValue.isUndefined()) {
</span><del>-        result.restrictedFloatWithDefault = convert&lt;float&gt;(state, restrictedFloatWithDefaultValue, ShouldAllowNonFinite::No);
</del><ins>+        result.restrictedFloatWithDefault = convert&lt;IDLFloat&gt;(state, restrictedFloatWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.restrictedFloatWithDefault = 0;
</span><span class="cx">     JSValue sequenceOfStringsValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;sequenceOfStrings&quot;));
</span><span class="cx">     if (!sequenceOfStringsValue.isUndefined()) {
</span><del>-        result.sequenceOfStrings = convert&lt;Vector&lt;String&gt;&gt;(state, sequenceOfStringsValue);
</del><ins>+        result.sequenceOfStrings = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(state, sequenceOfStringsValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue smallIntegerClampedValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallIntegerClamped&quot;));
</span><span class="cx">     if (!smallIntegerClampedValue.isUndefined()) {
</span><del>-        result.smallIntegerClamped = convert&lt;int8_t&gt;(state, smallIntegerClampedValue, Clamp);
</del><ins>+        result.smallIntegerClamped = convert&lt;IDLByte&gt;(state, smallIntegerClampedValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue smallIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallIntegerWithDefault&quot;));
</span><span class="cx">     if (!smallIntegerWithDefaultValue.isUndefined()) {
</span><del>-        result.smallIntegerWithDefault = convert&lt;int8_t&gt;(state, smallIntegerWithDefaultValue, NormalConversion);
</del><ins>+        result.smallIntegerWithDefault = convert&lt;IDLByte&gt;(state, smallIntegerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue smallUnsignedIntegerEnforcedRangeValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallUnsignedIntegerEnforcedRange&quot;));
</span><span class="cx">     if (!smallUnsignedIntegerEnforcedRangeValue.isUndefined()) {
</span><del>-        result.smallUnsignedIntegerEnforcedRange = convert&lt;uint8_t&gt;(state, smallUnsignedIntegerEnforcedRangeValue, EnforceRange);
</del><ins>+        result.smallUnsignedIntegerEnforcedRange = convert&lt;IDLOctet&gt;(state, smallUnsignedIntegerEnforcedRangeValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue smallUnsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallUnsignedIntegerWithDefault&quot;));
</span><span class="cx">     if (!smallUnsignedIntegerWithDefaultValue.isUndefined()) {
</span><del>-        result.smallUnsignedIntegerWithDefault = convert&lt;uint8_t&gt;(state, smallUnsignedIntegerWithDefaultValue, NormalConversion);
</del><ins>+        result.smallUnsignedIntegerWithDefault = convert&lt;IDLOctet&gt;(state, smallUnsignedIntegerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.smallUnsignedIntegerWithDefault = 0;
</span><span class="cx">     JSValue stringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithDefault&quot;));
</span><span class="cx">     if (!stringWithDefaultValue.isUndefined()) {
</span><del>-        result.stringWithDefault = convert&lt;String&gt;(state, stringWithDefaultValue);
</del><ins>+        result.stringWithDefault = convert&lt;IDLDOMString&gt;(state, stringWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.stringWithDefault = &quot;defaultString&quot;;
</span><span class="cx">     JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithoutDefault&quot;));
</span><span class="cx">     if (!stringWithoutDefaultValue.isUndefined()) {
</span><del>-        result.stringWithoutDefault = convert&lt;String&gt;(state, stringWithoutDefaultValue);
</del><ins>+        result.stringWithoutDefault = convert&lt;IDLDOMString&gt;(state, stringWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue unrestrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedDouble&quot;));
</span><span class="cx">     if (!unrestrictedDoubleValue.isUndefined()) {
</span><del>-        result.unrestrictedDouble = convert&lt;double&gt;(state, unrestrictedDoubleValue, ShouldAllowNonFinite::Yes);
</del><ins>+        result.unrestrictedDouble = convert&lt;IDLUnrestrictedDouble&gt;(state, unrestrictedDoubleValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue unrestrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedDoubleWithDefault&quot;));
</span><span class="cx">     if (!unrestrictedDoubleWithDefaultValue.isUndefined()) {
</span><del>-        result.unrestrictedDoubleWithDefault = convert&lt;double&gt;(state, unrestrictedDoubleWithDefaultValue, ShouldAllowNonFinite::Yes);
</del><ins>+        result.unrestrictedDoubleWithDefault = convert&lt;IDLUnrestrictedDouble&gt;(state, unrestrictedDoubleWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.unrestrictedDoubleWithDefault = 0;
</span><span class="cx">     JSValue unrestrictedFloatValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedFloat&quot;));
</span><span class="cx">     if (!unrestrictedFloatValue.isUndefined()) {
</span><del>-        result.unrestrictedFloat = convert&lt;float&gt;(state, unrestrictedFloatValue, ShouldAllowNonFinite::Yes);
</del><ins>+        result.unrestrictedFloat = convert&lt;IDLUnrestrictedFloat&gt;(state, unrestrictedFloatValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue unrestrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedFloatWithDefault&quot;));
</span><span class="cx">     if (!unrestrictedFloatWithDefaultValue.isUndefined()) {
</span><del>-        result.unrestrictedFloatWithDefault = convert&lt;float&gt;(state, unrestrictedFloatWithDefaultValue, ShouldAllowNonFinite::Yes);
</del><ins>+        result.unrestrictedFloatWithDefault = convert&lt;IDLUnrestrictedFloat&gt;(state, unrestrictedFloatWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.unrestrictedFloatWithDefault = 0;
</span><span class="cx">     JSValue unsignedIntegerValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedInteger&quot;));
</span><span class="cx">     if (!unsignedIntegerValue.isUndefined()) {
</span><del>-        result.unsignedInteger = convert&lt;uint32_t&gt;(state, unsignedIntegerValue, NormalConversion);
</del><ins>+        result.unsignedInteger = convert&lt;IDLUnsignedLong&gt;(state, unsignedIntegerValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue unsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedIntegerWithDefault&quot;));
</span><span class="cx">     if (!unsignedIntegerWithDefaultValue.isUndefined()) {
</span><del>-        result.unsignedIntegerWithDefault = convert&lt;uint32_t&gt;(state, unsignedIntegerWithDefaultValue, NormalConversion);
</del><ins>+        result.unsignedIntegerWithDefault = convert&lt;IDLUnsignedLong&gt;(state, unsignedIntegerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.unsignedIntegerWithDefault = 0;
</span><span class="cx">     JSValue unsignedLargeIntegerValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedLargeInteger&quot;));
</span><span class="cx">     if (!unsignedLargeIntegerValue.isUndefined()) {
</span><del>-        result.unsignedLargeInteger = convert&lt;uint64_t&gt;(state, unsignedLargeIntegerValue, NormalConversion);
</del><ins>+        result.unsignedLargeInteger = convert&lt;IDLUnsignedLongLong&gt;(state, unsignedLargeIntegerValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue unsignedLargeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedLargeIntegerWithDefault&quot;));
</span><span class="cx">     if (!unsignedLargeIntegerWithDefaultValue.isUndefined()) {
</span><del>-        result.unsignedLargeIntegerWithDefault = convert&lt;uint64_t&gt;(state, unsignedLargeIntegerWithDefaultValue, NormalConversion);
</del><ins>+        result.unsignedLargeIntegerWithDefault = convert&lt;IDLUnsignedLongLong&gt;(state, unsignedLargeIntegerWithDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else
</span><span class="cx">         result.unsignedLargeIntegerWithDefault = 0;
</span><span class="lines">@@ -691,12 +691,12 @@
</span><span class="cx">     TestObj::DictionaryThatShouldNotTolerateNull result;
</span><span class="cx">     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;));
</span><span class="cx">     if (!booleanWithoutDefaultValue.isUndefined()) {
</span><del>-        result.booleanWithoutDefault = convert&lt;bool&gt;(state, booleanWithoutDefaultValue);
</del><ins>+        result.booleanWithoutDefault = convert&lt;IDLBoolean&gt;(state, booleanWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue nonNullableNodeValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;nonNullableNode&quot;));
</span><span class="cx">     if (!nonNullableNodeValue.isUndefined()) {
</span><del>-        result.nonNullableNode = convertWrapperType&lt;Node, JSNode&gt;(state, nonNullableNodeValue, IsNullable::No);
</del><ins>+        result.nonNullableNode = convert&lt;IDLInterface&lt;Node&gt;&gt;(state, nonNullableNodeValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="lines">@@ -704,9 +704,9 @@
</span><span class="cx">     }
</span><span class="cx">     JSValue requiredDictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;requiredDictionaryMember&quot;));
</span><span class="cx">     if (!requiredDictionaryMemberValue.isUndefined()) {
</span><del>-        Optional&lt;TestObj::Dictionary&gt; requiredDictionaryMember = convertDictionary&lt;TestObj::Dictionary&gt;(state, requiredDictionaryMemberValue).value();
</del><ins>+        auto requiredDictionaryMemberOptional = convert&lt;IDLDictionary&lt;TestObj::Dictionary&gt;&gt;(state, requiredDictionaryMemberValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><del>-        result.requiredDictionaryMember = requiredDictionaryMember.value();
</del><ins>+        result.requiredDictionaryMember = requiredDictionaryMemberOptional.value();
</ins><span class="cx">     } else {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="cx">         return Nullopt;
</span><span class="lines">@@ -713,7 +713,7 @@
</span><span class="cx">     }
</span><span class="cx">     JSValue requiredEnumerationValueValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;requiredEnumerationValue&quot;));
</span><span class="cx">     if (!requiredEnumerationValueValue.isUndefined()) {
</span><del>-        result.requiredEnumerationValue = convert&lt;TestObj::EnumType&gt;(state, requiredEnumerationValueValue);
</del><ins>+        result.requiredEnumerationValue = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, requiredEnumerationValueValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     } else {
</span><span class="cx">         throwTypeError(&amp;state, throwScope);
</span><span class="lines">@@ -739,12 +739,12 @@
</span><span class="cx">     TestObj::DictionaryThatShouldTolerateNull result;
</span><span class="cx">     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;));
</span><span class="cx">     if (!booleanWithoutDefaultValue.isUndefined()) {
</span><del>-        result.booleanWithoutDefault = convert&lt;bool&gt;(state, booleanWithoutDefaultValue);
</del><ins>+        result.booleanWithoutDefault = convert&lt;IDLBoolean&gt;(state, booleanWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValue&quot;));
</span><span class="cx">     if (!enumerationValueValue.isUndefined()) {
</span><del>-        result.enumerationValue = convert&lt;TestObj::EnumType&gt;(state, enumerationValueValue);
</del><ins>+        result.enumerationValue = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, enumerationValueValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     return WTFMove(result);
</span><span class="lines">@@ -767,12 +767,12 @@
</span><span class="cx">     AlternateDictionaryName result;
</span><span class="cx">     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;));
</span><span class="cx">     if (!booleanWithoutDefaultValue.isUndefined()) {
</span><del>-        result.booleanWithoutDefault = convert&lt;bool&gt;(state, booleanWithoutDefaultValue);
</del><ins>+        result.booleanWithoutDefault = convert&lt;IDLBoolean&gt;(state, booleanWithoutDefaultValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValue&quot;));
</span><span class="cx">     if (!enumerationValueValue.isUndefined()) {
</span><del>-        result.enumerationValue = convert&lt;TestObj::EnumType&gt;(state, enumerationValueValue);
</del><ins>+        result.enumerationValue = convert&lt;IDLEnumeration&lt;TestObj::EnumType&gt;&gt;(state, enumerationValueValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     return WTFMove(result);
</span><span class="lines">@@ -795,12 +795,12 @@
</span><span class="cx">     TestObj::ParentDictionary result;
</span><span class="cx">     JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;parentMember1&quot;));
</span><span class="cx">     if (!parentMember1Value.isUndefined()) {
</span><del>-        result.parentMember1 = convert&lt;bool&gt;(state, parentMember1Value);
</del><ins>+        result.parentMember1 = convert&lt;IDLBoolean&gt;(state, parentMember1Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;parentMember2&quot;));
</span><span class="cx">     if (!parentMember2Value.isUndefined()) {
</span><del>-        result.parentMember2 = convert&lt;bool&gt;(state, parentMember2Value);
</del><ins>+        result.parentMember2 = convert&lt;IDLBoolean&gt;(state, parentMember2Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     return WTFMove(result);
</span><span class="lines">@@ -823,22 +823,22 @@
</span><span class="cx">     TestObj::ChildDictionary result;
</span><span class="cx">     JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;parentMember1&quot;));
</span><span class="cx">     if (!parentMember1Value.isUndefined()) {
</span><del>-        result.parentMember1 = convert&lt;bool&gt;(state, parentMember1Value);
</del><ins>+        result.parentMember1 = convert&lt;IDLBoolean&gt;(state, parentMember1Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;parentMember2&quot;));
</span><span class="cx">     if (!parentMember2Value.isUndefined()) {
</span><del>-        result.parentMember2 = convert&lt;bool&gt;(state, parentMember2Value);
</del><ins>+        result.parentMember2 = convert&lt;IDLBoolean&gt;(state, parentMember2Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue childMember1Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;childMember1&quot;));
</span><span class="cx">     if (!childMember1Value.isUndefined()) {
</span><del>-        result.childMember1 = convert&lt;bool&gt;(state, childMember1Value);
</del><ins>+        result.childMember1 = convert&lt;IDLBoolean&gt;(state, childMember1Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue childMember2Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;childMember2&quot;));
</span><span class="cx">     if (!childMember2Value.isUndefined()) {
</span><del>-        result.childMember2 = convert&lt;bool&gt;(state, childMember2Value);
</del><ins>+        result.childMember2 = convert&lt;IDLBoolean&gt;(state, childMember2Value);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     return WTFMove(result);
</span><span class="lines">@@ -3247,7 +3247,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = parse&lt;TestObj::EnumType&gt;(*state, value);
</del><ins>+    auto nativeValue = parseEnumeration&lt;TestObj::EnumType&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="lines">@@ -3268,7 +3268,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int8_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLByte&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setByteAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3287,7 +3287,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;uint8_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLOctet&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setOctetAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3306,7 +3306,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int16_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLShort&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3325,7 +3325,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int16_t&gt;(*state, value, Clamp);
</del><ins>+    auto nativeValue = convert&lt;IDLShort&gt;(*state, value, Clamp);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setClampedShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3344,7 +3344,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int16_t&gt;(*state, value, EnforceRange);
</del><ins>+    auto nativeValue = convert&lt;IDLShort&gt;(*state, value, EnforceRange);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setEnforceRangeShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3363,7 +3363,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;uint16_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLUnsignedShort&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setUnsignedShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3382,7 +3382,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3401,7 +3401,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int64_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLongLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3420,7 +3420,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;uint64_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLUnsignedLongLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3584,7 +3584,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = parse&lt;AlternateEnumName&gt;(*state, value);
</del><ins>+    auto nativeValue = parseEnumeration&lt;AlternateEnumName&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="lines">@@ -3627,7 +3627,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = convert&lt;IDLBoolean&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setCreate(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3684,7 +3684,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3703,7 +3703,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;uint32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLUnsignedLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3722,7 +3722,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = convert&lt;IDLBoolean&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3798,7 +3798,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3817,7 +3817,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = value.toBoolean(state);
</del><ins>+    auto nativeValue = convert&lt;IDLBoolean&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3899,7 +3899,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setAttributeWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3918,7 +3918,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setAttributeWithGetterLegacyException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3937,7 +3937,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     propagateException(*state, throwScope, impl.setAttributeWithSetterException(WTFMove(nativeValue)));
</span><span class="cx">     return true;
</span><span class="lines">@@ -3957,7 +3957,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setAttributeWithSetterLegacyException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="lines">@@ -4065,7 +4065,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setWithScriptStateAttribute(*state, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4084,7 +4084,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setWithCallWithAndSetterCallWithAttribute(*state, activeDOMWindow(state), firstDOMWindow(state), WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4273,7 +4273,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setConditionalAttr1(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4294,7 +4294,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setConditionalAttr2(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4315,7 +4315,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setConditionalAttr3(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4389,7 +4389,8 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = value;
</del><ins>+    auto nativeValue = convert&lt;IDLAny&gt;(*state, value);
+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAnyAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4457,7 +4458,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setBlueberry(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4476,7 +4477,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setId(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4511,7 +4512,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLNullable&lt;IDLLong&gt;&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setNullableLongSettableAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4568,7 +4569,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLNullable&lt;IDLLong&gt;&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setNullableStringValue(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -4587,7 +4588,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = parse&lt;TestObj::Optional&gt;(*state, value);
</del><ins>+    auto nativeValue = parseEnumeration&lt;TestObj::Optional&gt;(*state, value);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="lines">@@ -4707,7 +4708,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto testParam = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto testParam = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -4764,7 +4765,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto longArg = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -4803,7 +4804,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto byteArg = convert&lt;int8_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto byteArg = convert&lt;IDLByte&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -4842,7 +4843,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto octetArg = convert&lt;uint8_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto octetArg = convert&lt;IDLOctet&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -4881,7 +4882,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto longArg = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -4920,7 +4921,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto longArg = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -5023,7 +5024,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto index = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto index = convert&lt;IDLUnsignedLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(WTFMove(index)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5044,7 +5045,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto enumArgValue = state-&gt;uncheckedArgument(0);
</span><span class="cx">     TestObj::EnumType enumArg;
</span><del>-    auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</del><ins>+    auto optionalValue = parseEnumeration&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     if (UNLIKELY(!optionalValue))
</span><span class="cx">         return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithEnumArg&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="lines">@@ -5067,7 +5068,7 @@
</span><span class="cx">     auto enumArgValue = state-&gt;argument(0);
</span><span class="cx">     Optional&lt;TestObj::EnumType&gt; enumArg;
</span><span class="cx">     if (!enumArgValue.isUndefined()) {
</span><del>-        enumArg = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</del><ins>+        enumArg = parseEnumeration&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">         if (UNLIKELY(!enumArg))
</span><span class="cx">             return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithOptionalEnumArg&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="lines">@@ -5092,7 +5093,7 @@
</span><span class="cx">     if (enumArgValue.isUndefined())
</span><span class="cx">         enumArg = TestObj::EnumType::EnumValue1;
</span><span class="cx">     else {
</span><del>-        auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</del><ins>+        auto optionalValue = parseEnumeration&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">         if (UNLIKELY(!optionalValue))
</span><span class="cx">             return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithOptionalEnumArgAndDefaultValue&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="lines">@@ -5366,7 +5367,7 @@
</span><span class="cx">     auto listener = JSEventListener::create(state-&gt;uncheckedArgument(1), *castedThis, false, currentWorld(state));
</span><span class="cx">     if (UNLIKELY(!listener))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;listener&quot;, &quot;TestObject&quot;, &quot;addEventListener&quot;, &quot;EventListener&quot;);
</span><del>-    auto useCapture = state-&gt;argument(2).toBoolean(state);
</del><ins>+    auto useCapture = convert&lt;IDLBoolean&gt;(*state, state-&gt;argument(2));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.addEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5390,7 +5391,7 @@
</span><span class="cx">     auto listener = JSEventListener::create(state-&gt;uncheckedArgument(1), *castedThis, false, currentWorld(state));
</span><span class="cx">     if (UNLIKELY(!listener))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;listener&quot;, &quot;TestObject&quot;, &quot;removeEventListener&quot;, &quot;EventListener&quot;);
</span><del>-    auto useCapture = state-&gt;argument(2).toBoolean(state);
</del><ins>+    auto useCapture = convert&lt;IDLBoolean&gt;(*state, state-&gt;argument(2));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.removeEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5620,7 +5621,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto opt = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalArg(WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5637,7 +5638,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto opt = state-&gt;argument(0).isUndefined() ? 666 : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(0).isUndefined() ? 666 : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalArgAndDefaultValue(WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5656,9 +5657,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto nonOpt = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto nonOpt = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto opt = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto opt = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithNonOptionalArgAndOptionalArg(WTFMove(nonOpt), WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5677,11 +5678,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto nonOpt = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto nonOpt = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto opt1 = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto opt1 = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto opt2 = state-&gt;argument(2).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(2), NormalConversion);
</del><ins>+    auto opt2 = state-&gt;argument(2).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(2), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithNonOptionalArgAndTwoOptionalArgs(WTFMove(nonOpt), WTFMove(opt1), WTFMove(opt2));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5885,7 +5886,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = convert&lt;double&gt;(*state, state-&gt;argument(0), ShouldAllowNonFinite::Yes);
</del><ins>+    auto number = convert&lt;IDLUnrestrictedDouble&gt;(*state, state-&gt;argument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalDoubleIsNaN(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5902,7 +5903,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = convert&lt;float&gt;(*state, state-&gt;argument(0), ShouldAllowNonFinite::Yes);
</del><ins>+    auto number = convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;argument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalFloatIsNaN(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5919,7 +5920,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;int64_t&gt;() : convert&lt;int64_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;int64_t&gt;() : convert&lt;IDLLongLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalLongLong(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5936,7 +5937,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = convert&lt;int64_t&gt;(*state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto number = convert&lt;IDLLongLong&gt;(*state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalLongLongIsZero(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5953,7 +5954,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;IDLUnsignedLongLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalUnsignedLongLong(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5970,7 +5971,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto number = convert&lt;uint64_t&gt;(*state, state-&gt;argument(0), NormalConversion);
</del><ins>+    auto number = convert&lt;IDLUnsignedLongLong&gt;(*state, state-&gt;argument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalUnsignedLongLongIsZero(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -5987,7 +5988,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto 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;() : convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalSequence(WTFMove(array));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6004,7 +6005,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&quot;, &quot;methodWithOptionalSequenceIsEmpty&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto array = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto array = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalSequenceIsEmpty(WTFMove(array));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6021,7 +6022,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto 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;() : convert&lt;IDLBoolean&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalBoolean(WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6038,7 +6039,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto b = state-&gt;argument(0).toBoolean(state);
</del><ins>+    auto b = convert&lt;IDLBoolean&gt;(*state, state-&gt;argument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithOptionalBooleanIsFalse(WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6055,7 +6056,8 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto a = state-&gt;argument(0);
</del><ins>+    auto a = convert&lt;IDLAny&gt;(*state, state-&gt;argument(0));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalAny(WTFMove(a));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6157,7 +6159,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto nonCallback = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto nonCallback = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     if (UNLIKELY(!state-&gt;uncheckedArgument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, throwScope, 1, &quot;callback&quot;, &quot;TestObject&quot;, &quot;methodWithNonCallbackArgAndCallbackArg&quot;);
</span><span class="lines">@@ -6220,7 +6222,7 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto nonCallback = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto nonCallback = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     if (UNLIKELY(!state-&gt;uncheckedArgument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, throwScope, 1, &quot;callback&quot;, &quot;TestObject&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
</span><span class="lines">@@ -6377,7 +6379,7 @@
</span><span class="cx">         if (UNLIKELY(!objArg))
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;overloadedMethod&quot;, &quot;TestObj&quot;);
</span><span class="cx">     }
</span><del>-    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethod(WTFMove(objArg), WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6415,7 +6417,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto longArg = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethod(WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6477,7 +6479,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arrayArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto arrayArg = convert&lt;IDLNullable&lt;IDLSequence&lt;IDLDOMString&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6536,7 +6538,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arrayArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto arrayArg = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6555,7 +6557,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto arrayArg = convert&lt;IDLSequence&lt;IDLUnsignedLong&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6687,7 +6689,7 @@
</span><span class="cx">         if (UNLIKELY(!objArg))
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;overloadedMethodWithOptionalParameter&quot;, &quot;TestObj&quot;);
</span><span class="cx">     }
</span><del>-    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.overloadedMethodWithOptionalParameter(WTFMove(objArg), WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6732,7 +6734,7 @@
</span><span class="cx">     VM&amp; vm = state-&gt;vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><del>-    auto arg = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto arg = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsNumber(TestObj::classMethodWithOptional(WTFMove(arg)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -6756,7 +6758,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto arg = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     TestObj::overloadedMethod1(WTFMove(arg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6814,9 +6816,9 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto objArgsShort = convert&lt;uint16_t&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</del><ins>+    auto objArgsShort = convert&lt;IDLUnsignedShort&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto objArgsLong = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</del><ins>+    auto objArgsLong = convert&lt;IDLUnsignedLong&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.classMethodWithClamp(WTFMove(objArgsShort), WTFMove(objArgsLong));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6835,9 +6837,9 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto objArgsShort = convert&lt;uint16_t&gt;(*state, state-&gt;uncheckedArgument(0), EnforceRange);
</del><ins>+    auto objArgsShort = convert&lt;IDLUnsignedShort&gt;(*state, state-&gt;uncheckedArgument(0), EnforceRange);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto objArgsLong = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1), EnforceRange);
</del><ins>+    auto objArgsLong = convert&lt;IDLUnsignedLong&gt;(*state, state-&gt;uncheckedArgument(1), EnforceRange);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.classMethodWithEnforceRange(WTFMove(objArgsShort), WTFMove(objArgsLong));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6856,7 +6858,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto unsignedLongSequence = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto unsignedLongSequence = convert&lt;IDLSequence&lt;IDLUnsignedLong&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithUnsignedLongSequence(WTFMove(unsignedLongSequence));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -6876,7 +6878,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto values = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="lines">@@ -6920,9 +6922,9 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto arrayArg = convert&lt;IDLSequence&lt;IDLUnsignedLong&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto nullableArrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1));
</del><ins>+    auto nullableArrayArg = convert&lt;IDLNullable&lt;IDLSequence&lt;IDLUnsignedLong&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(1));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.methodWithAndWithoutNullableSequence(WTFMove(arrayArg), WTFMove(nullableArrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7127,7 +7129,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto head = convert&lt;double&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</del><ins>+    auto head = convert&lt;IDLUnrestrictedDouble&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto tail = convertVariadicArguments&lt;IDLUnrestrictedDouble&gt;(*state, 1);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="lines">@@ -7191,9 +7193,9 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</del><ins>+    auto a = convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto b = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</del><ins>+    auto b = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.any(WTFMove(a), WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7243,7 +7245,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::No);
</del><ins>+    auto a = convert&lt;IDLFloat&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.testPromiseFunctionWithFloatArgument(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7293,7 +7295,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &quot;TestObject&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>-    auto a = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto a = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.testPromiseFunctionWithOptionalIntArgument(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7320,7 +7322,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::No);
</del><ins>+    auto a = convert&lt;IDLFloat&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.testPromiseOverloadedFunction(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7474,7 +7476,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto a = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto a = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.conditionalOverload(WTFMove(a));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7536,7 +7538,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto a = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</del><ins>+    auto a = convert&lt;IDLLong&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.singleConditionalOverload(WTFMove(a));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7574,7 +7576,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto init = convertDictionary&lt;TestObj::Dictionary&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto init = convert&lt;IDLDictionary&lt;TestObj::Dictionary&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.attachShadowRoot(init.value());
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -7593,7 +7595,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto dict = convertDictionary&lt;TestStandaloneDictionary&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto dict = convert&lt;IDLDictionary&lt;TestStandaloneDictionary&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.operationWithExternalDictionaryParameter(dict.value());
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::EnumType value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumType&gt; parse&lt;TestObj::EnumType&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::EnumType convert&lt;TestObj::EnumType&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumType&gt; parseEnumeration&lt;TestObj::EnumType&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::EnumType convertEnumeration&lt;TestObj::EnumType&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::EnumType&gt;();
</span><span class="cx"> 
</span><span class="cx"> JSC::JSString* jsStringWithCache(JSC::ExecState*, TestObj::Optional);
</span><span class="lines">@@ -122,8 +122,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::Optional value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Optional&gt; parse&lt;TestObj::Optional&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::Optional convert&lt;TestObj::Optional&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Optional&gt; parseEnumeration&lt;TestObj::Optional&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::Optional convertEnumeration&lt;TestObj::Optional&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::Optional&gt;();
</span><span class="cx"> 
</span><span class="cx"> JSC::JSString* jsStringWithCache(JSC::ExecState*, AlternateEnumName);
</span><span class="lines">@@ -132,8 +132,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, AlternateEnumName value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;AlternateEnumName&gt; parse&lt;AlternateEnumName&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; AlternateEnumName convert&lt;AlternateEnumName&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;AlternateEnumName&gt; parseEnumeration&lt;AlternateEnumName&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; AlternateEnumName convertEnumeration&lt;AlternateEnumName&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;AlternateEnumName&gt;();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="lines">@@ -144,8 +144,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::EnumA value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumA&gt; parse&lt;TestObj::EnumA&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::EnumA convert&lt;TestObj::EnumA&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumA&gt; parseEnumeration&lt;TestObj::EnumA&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::EnumA convertEnumeration&lt;TestObj::EnumA&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::EnumA&gt;();
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -158,8 +158,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::EnumB value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumB&gt; parse&lt;TestObj::EnumB&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::EnumB convert&lt;TestObj::EnumB&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumB&gt; parseEnumeration&lt;TestObj::EnumB&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::EnumB convertEnumeration&lt;TestObj::EnumB&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::EnumB&gt;();
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -172,8 +172,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::EnumC value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::EnumC&gt; parse&lt;TestObj::EnumC&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::EnumC convert&lt;TestObj::EnumC&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::EnumC&gt; parseEnumeration&lt;TestObj::EnumC&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::EnumC convertEnumeration&lt;TestObj::EnumC&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::EnumC&gt;();
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -184,8 +184,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::Kind value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Kind&gt; parse&lt;TestObj::Kind&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::Kind convert&lt;TestObj::Kind&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Kind&gt; parseEnumeration&lt;TestObj::Kind&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::Kind convertEnumeration&lt;TestObj::Kind&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::Kind&gt;();
</span><span class="cx"> 
</span><span class="cx"> JSC::JSString* jsStringWithCache(JSC::ExecState*, TestObj::Size);
</span><span class="lines">@@ -194,8 +194,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::Size value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Size&gt; parse&lt;TestObj::Size&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::Size convert&lt;TestObj::Size&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Size&gt; parseEnumeration&lt;TestObj::Size&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::Size convertEnumeration&lt;TestObj::Size&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::Size&gt;();
</span><span class="cx"> 
</span><span class="cx"> JSC::JSString* jsStringWithCache(JSC::ExecState*, TestObj::Confidence);
</span><span class="lines">@@ -204,8 +204,8 @@
</span><span class="cx">     static JSC::JSString* arrayJSValue(JSC::ExecState* state, JSDOMGlobalObject*, TestObj::Confidence value) { return jsStringWithCache(state, value); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;&gt; Optional&lt;TestObj::Confidence&gt; parse&lt;TestObj::Confidence&gt;(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;&gt; TestObj::Confidence convert&lt;TestObj::Confidence&gt;(JSC::ExecState&amp;, JSC::JSValue);
</del><ins>+template&lt;&gt; Optional&lt;TestObj::Confidence&gt; parseEnumeration&lt;TestObj::Confidence&gt;(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;&gt; TestObj::Confidence convertEnumeration&lt;TestObj::Confidence&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> template&lt;&gt; const char* expectedEnumerationValues&lt;TestObj::Confidence&gt;();
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; Optional&lt;TestObj::Dictionary&gt; convertDictionary&lt;TestObj::Dictionary&gt;(JSC::ExecState&amp;, JSC::JSValue);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><ins>+#include &quot;JSDOMConvert.h&quot;
</ins><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><span class="cx"> #include &lt;runtime/FunctionPrototype.h&gt;
</span><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><span class="lines">@@ -71,7 +72,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsWithSequenceConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     ASSERT(castedThis);
</span><del>-    auto sequenceOfStrings = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto sequenceOfStrings = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(sequenceOfStrings));
</span><span class="cx">     return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -43,12 +43,12 @@
</span><span class="cx">     TestStandaloneDictionary result;
</span><span class="cx">     JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;boolMember&quot;));
</span><span class="cx">     if (!boolMemberValue.isUndefined()) {
</span><del>-        result.boolMember = convert&lt;bool&gt;(state, boolMemberValue);
</del><ins>+        result.boolMember = convert&lt;IDLBoolean&gt;(state, boolMemberValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringMember&quot;));
</span><span class="cx">     if (!stringMemberValue.isUndefined()) {
</span><del>-        result.stringMember = convert&lt;String&gt;(state, stringMemberValue);
</del><ins>+        result.stringMember = convert&lt;IDLDOMString&gt;(state, stringMemberValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, Nullopt);
</span><span class="cx">     }
</span><span class="cx">     return WTFMove(result);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><span class="cx"> #include &quot;JSDOMConvert.h&quot;
</span><span class="cx"> #include &quot;JSSVGPoint.h&quot;
</span><del>-#include &quot;JSSerializedScriptValue.h&quot;
</del><span class="cx"> #include &quot;JSTestCallback.h&quot;
</span><span class="cx"> #include &quot;JSTestEventTarget.h&quot;
</span><span class="cx"> #include &quot;JSTestSubObj.h&quot;
</span><span class="lines">@@ -38,6 +37,7 @@
</span><span class="cx"> #include &lt;runtime/JSArray.h&gt;
</span><span class="cx"> #include &lt;runtime/JSString.h&gt;
</span><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><ins>+#include &lt;wtf/Variant.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="lines">@@ -49,6 +49,9 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(JSC::ExecState*);
</span><span class="lines">@@ -171,6 +174,9 @@
</span><span class="cx">     { &quot;setShadow&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionSetShadow), (intptr_t) (3) } },
</span><span class="cx">     { &quot;methodWithSequenceArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
</span><span class="cx">     { &quot;nullableSequenceArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionNullableSequenceArg), (intptr_t) (1) } },
</span><ins>+    { &quot;sequenceOfNullablesArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg), (intptr_t) (1) } },
+    { &quot;nullableSequenceOfNullablesArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg), (intptr_t) (1) } },
+    { &quot;unionArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionUnionArg), (intptr_t) (1) } },
</ins><span class="cx">     { &quot;funcWithClamp&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionFuncWithClamp), (intptr_t) (1) } },
</span><span class="cx">     { &quot;immutablePointFunction&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionImmutablePointFunction), (intptr_t) (0) } },
</span><span class="cx">     { &quot;stringSequenceFunction&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestTypedefsPrototypeFunctionStringSequenceFunction), (intptr_t) (1) } },
</span><span class="lines">@@ -365,7 +371,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;uint64_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLUnsignedLongLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -403,7 +409,7 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setAttrWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="lines">@@ -423,7 +429,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</del><ins>+    auto nativeValue = convert&lt;IDLLong&gt;(*state, value, NormalConversion);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, false);
</span><span class="cx">     impl.setAttrWithSetterException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="lines">@@ -487,7 +493,7 @@
</span><span class="cx">         return throwThisTypeError(*state, throwScope, &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>-    auto x = state-&gt;argument(0).isUndefined() ? Vector&lt;int32_t&gt;() : toNativeArray&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto x = state-&gt;argument(0).isUndefined() ? Vector&lt;int32_t&gt;() : convert&lt;IDLSequence&lt;IDLLong&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.func(WTFMove(x));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -506,15 +512,15 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto width = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</del><ins>+    auto width = convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto height = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(1), ShouldAllowNonFinite::Yes);
</del><ins>+    auto height = convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;uncheckedArgument(1));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto blur = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(2), ShouldAllowNonFinite::Yes);
</del><ins>+    auto blur = convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;uncheckedArgument(2));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     auto color = state-&gt;argument(3).isUndefined() ? String() : state-&gt;uncheckedArgument(3).toWTFString(state);
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto alpha = state-&gt;argument(4).isUndefined() ? Optional&lt;float&gt;() : convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(4), ShouldAllowNonFinite::Yes);
</del><ins>+    auto alpha = state-&gt;argument(4).isUndefined() ? Optional&lt;float&gt;() : convert&lt;IDLUnrestrictedFloat&gt;(*state, state-&gt;uncheckedArgument(4));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -533,7 +539,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto sequenceArg = toRefPtrNativeArray&lt;SerializedScriptValue, JSSerializedScriptValue&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto sequenceArg = convert&lt;IDLSequence&lt;IDLInterface&lt;SerializedScriptValue&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsNumber(impl.methodWithSequenceArg(WTFMove(sequenceArg)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -552,12 +558,69 @@
</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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto sequenceArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto sequenceArg = convert&lt;IDLNullable&lt;IDLSequence&lt;IDLDOMString&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.nullableSequenceArg(WTFMove(sequenceArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(ExecState* state)
+{
+    VM&amp; vm = state-&gt;vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, &quot;TestTypedefs&quot;, &quot;sequenceOfNullablesArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
+    auto sequenceArg = convert&lt;IDLSequence&lt;IDLNullable&lt;IDLDOMString&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    impl.sequenceOfNullablesArg(WTFMove(sequenceArg));
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(ExecState* state)
+{
+    VM&amp; vm = state-&gt;vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, &quot;TestTypedefs&quot;, &quot;nullableSequenceOfNullablesArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
+    auto sequenceArg = convert&lt;IDLNullable&lt;IDLSequence&lt;IDLNullable&lt;IDLDOMString&gt;&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    impl.nullableSequenceOfNullablesArg(WTFMove(sequenceArg));
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(ExecState* state)
+{
+    VM&amp; vm = state-&gt;vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, &quot;TestTypedefs&quot;, &quot;unionArg&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
+    auto unionArg = convert&lt;IDLUnion&lt;IDLDOMString, IDLLong&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    impl.unionArg(WTFMove(unionArg));
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state-&gt;vm();
</span><span class="lines">@@ -571,9 +634,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto arg1 = convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</del><ins>+    auto arg1 = convert&lt;IDLUnsignedLongLong&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-    auto arg2 = state-&gt;argument(1).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</del><ins>+    auto arg2 = state-&gt;argument(1).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;IDLUnsignedLongLong&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -608,7 +671,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto values = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringSequenceFunction(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="lines">@@ -630,7 +693,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto values = convert&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringSequenceFunction2(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="lines">@@ -651,7 +714,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, throwScope, createNotEnoughArgumentsError(state));
</span><del>-    auto sequenceArg = toRefPtrNativeArray&lt;TestEventTarget, JSTestEventTarget&gt;(*state, state-&gt;uncheckedArgument(0));
</del><ins>+    auto sequenceArg = convert&lt;IDLSequence&lt;IDLInterface&lt;TestEventTarget&gt;&gt;&gt;(*state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx">     JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg)));
</span><span class="cx">     return JSValue::encode(result);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestTypedefsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> // This IDL file is for testing the bindings code generator and for tracking
</span><del>-// changes in its ouput.
</del><ins>+// changes in its output.
</ins><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Constructor(STRING hello, TEST_CALLBACK testCallback),
</span><span class="lines">@@ -47,7 +47,11 @@
</span><span class="cx">     ULONGLONG methodWithSequenceArg(sequence&lt;SCRIPT_VALUE&gt; sequenceArg);
</span><span class="cx"> 
</span><span class="cx">     void nullableSequenceArg(SEQUENCE_OF_STRINGS? sequenceArg);
</span><ins>+    void sequenceOfNullablesArg(sequence&lt;STRING?&gt; sequenceArg);
+    void nullableSequenceOfNullablesArg(SEQUENCE_OF_NULLABLE_STRINGS? sequenceArg);
</ins><span class="cx"> 
</span><ins>+    void unionArg(UNION_STRING_LONG unionArg);
+
</ins><span class="cx">     void funcWithClamp(ULONGLONG_CLAMP arg1, optional ULONGLONG_CLAMP arg2);
</span><span class="cx"> 
</span><span class="cx">     [Immutable] SVGPOINT immutablePointFunction();
</span><span class="lines">@@ -70,11 +74,14 @@
</span><span class="cx"> typedef [Clamp] unsigned long long ULONGLONG_CLAMP;
</span><span class="cx"> typedef SerializedScriptValue      SCRIPT_VALUE;
</span><span class="cx"> typedef sequence&lt;long&gt;             SEQUENCE_OF_LONGS;
</span><ins>+typedef long?                      NULLABLE_LONG;
</ins><span class="cx"> typedef SVGPoint                   SVGPOINT;
</span><span class="cx"> typedef DOMString                  STRING;
</span><span class="cx"> typedef sequence&lt;DOMString&gt;        SEQUENCE_OF_STRINGS;
</span><ins>+typedef sequence&lt;DOMString?&gt;       SEQUENCE_OF_NULLABLE_STRINGS;
</ins><span class="cx"> typedef TestCallback               TEST_CALLBACK;
</span><span class="cx"> typedef TestSubObjConstructor      T;
</span><span class="cx"> typedef Int32Array                 ARRAY;
</span><span class="cx"> typedef DOMException               E;
</span><span class="cx"> typedef TestEventTarget            TEST_EVENT_TARGET;
</span><ins>+typedef (DOMString or long)        UNION_STRING_LONG;
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.idl (207149 => 207150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.idl        2016-10-11 17:05:04 UTC (rev 207149)
+++ trunk/Source/WebCore/testing/InternalSettings.idl        2016-10-11 17:33:45 UTC (rev 207150)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Editing, forms
</span><span class="cx">     [MayThrowLegacyException] void setEditingBehavior(DOMString behavior);
</span><del>-    [MayThrowLegacyException] void setShouldConvertPositionStyleOnCopy(boolean convert);
</del><ins>+    [MayThrowLegacyException] void setShouldConvertPositionStyleOnCopy(boolean convertPosition);
</ins><span class="cx">     void setLangAttributeAwareFormControlUIEnabled(boolean enabled);
</span><span class="cx">     [MayThrowLegacyException] void setPreferMIMETypeForImages(boolean preferMimeTypeForImage);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>