<!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>[211821] trunk/Source/WebCore</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>JSDOMConvert is too big. Split it up!
https://bugs.webkit.org/show_bug.cgi?id=167806

Rubber-stamped by Geoff Garen.

Split JSDOMConvert up roughly by IDL type. Some are grouped for convenience, e.g. all the
string types are together, all the numeric types are together. Also moved helpers from 
JSDOMBinding to their respective JSDOMConvertFoo header. For now, JSDOMConvert.h as an
umbrella of all the sub headers, but it will be removed, and the code generator taught
to include the right header in a subsequent patch.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/js/IDBBindingUtilities.cpp:
* bindings/js/IDBBindingUtilities.h:
Remove toJS that takes a std::optional&lt;IDBKeyPath&gt;, it was unused, and update date code
to only call valueToDate once, and pass things by reference.

* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
Move most of the conversion helpers into their respective JSDOMConvertFoo header.

* bindings/js/JSDOMConvert.h:
Leave for now, just has includes of all the broken out headers.

* bindings/js/JSDOMConvertAny.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertBase.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertBoolean.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertBufferSource.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertCallbacks.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertDate.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMConvertDate.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertDictionary.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertEnumeration.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertEventListener.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertIndexedDB.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertInterface.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertJSON.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertNull.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertNullable.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertNumbers.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMConvertNumbers.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertObject.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertRecord.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertSequences.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertSerializedScriptValue.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertStrings.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMConvertStrings.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertUnion.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertVariadic.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertWebGL.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
* bindings/js/JSDOMConvertXPathNSResolver.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
Add include of JSDOMConvertVariadic.h rather than JSDOMConvert.

* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSCryptoOperationData.cpp:
* bindings/js/JSImageDataCustom.cpp:
* bindings/js/ReadableStreamDefaultController.h:
* bindings/js/WebCoreTypedArrayController.cpp:
* html/canvas/WebGLAny.cpp:
* platform/mac/SerializedPlatformRepresentationMac.mm:
Add includes for specific JSDOMConvert header now that helpers have 
been moved their from JSDOMBinding.h</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiesh">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoOperationDatacpp">trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.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="#trunkSourceWebCorebindingsjsJSImageDataCustomcpp">trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamDefaultControllercpp">trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamDefaultControllerh">trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreTypedArrayControllercpp">trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLAnycpp">trunk/Source/WebCore/html/canvas/WebGLAny.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmacSerializedPlatformRepresentationMacmm">trunk/Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertAnyh">trunk/Source/WebCore/bindings/js/JSDOMConvertAny.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertBaseh">trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertBooleanh">trunk/Source/WebCore/bindings/js/JSDOMConvertBoolean.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertBufferSourceh">trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertCallbacksh">trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertDatecpp">trunk/Source/WebCore/bindings/js/JSDOMConvertDate.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertDateh">trunk/Source/WebCore/bindings/js/JSDOMConvertDate.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertDictionaryh">trunk/Source/WebCore/bindings/js/JSDOMConvertDictionary.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertEnumerationh">trunk/Source/WebCore/bindings/js/JSDOMConvertEnumeration.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertEventListenerh">trunk/Source/WebCore/bindings/js/JSDOMConvertEventListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertIndexedDBh">trunk/Source/WebCore/bindings/js/JSDOMConvertIndexedDB.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertInterfaceh">trunk/Source/WebCore/bindings/js/JSDOMConvertInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertJSONh">trunk/Source/WebCore/bindings/js/JSDOMConvertJSON.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertNullh">trunk/Source/WebCore/bindings/js/JSDOMConvertNull.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertNullableh">trunk/Source/WebCore/bindings/js/JSDOMConvertNullable.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertNumberscpp">trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertNumbersh">trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertObjecth">trunk/Source/WebCore/bindings/js/JSDOMConvertObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertRecordh">trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertSequencesh">trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertSerializedScriptValueh">trunk/Source/WebCore/bindings/js/JSDOMConvertSerializedScriptValue.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertStringscpp">trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertStringsh">trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertUnionh">trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertVariadich">trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertWebGLh">trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertXPathNSResolverh">trunk/Source/WebCore/bindings/js/JSDOMConvertXPathNSResolver.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -1085,6 +1085,9 @@
</span><span class="cx">     bindings/js/JSCSSRuleCustom.cpp
</span><span class="cx">     bindings/js/JSCSSRuleListCustom.cpp
</span><span class="cx">     bindings/js/JSCSSStyleDeclarationCustom.cpp
</span><ins>+    bindings/js/JSDOMConvertDate.cpp
+    bindings/js/JSDOMConvertNumbers.cpp
+    bindings/js/JSDOMConvertStrings.cpp
</ins><span class="cx">     bindings/js/JSDOMIterator.cpp
</span><span class="cx">     bindings/js/JSFontFaceCustom.cpp
</span><span class="cx">     bindings/js/JSFontFaceSetCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/ChangeLog        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -1,5 +1,76 @@
</span><span class="cx"> 2017-02-07  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        JSDOMConvert is too big. Split it up!
+        https://bugs.webkit.org/show_bug.cgi?id=167806
+
+        Rubber-stamped by Geoff Garen.
+
+        Split JSDOMConvert up roughly by IDL type. Some are grouped for convenience, e.g. all the
+        string types are together, all the numeric types are together. Also moved helpers from 
+        JSDOMBinding to their respective JSDOMConvertFoo header. For now, JSDOMConvert.h as an
+        umbrella of all the sub headers, but it will be removed, and the code generator taught
+        to include the right header in a subsequent patch.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * bindings/js/IDBBindingUtilities.cpp:
+        * bindings/js/IDBBindingUtilities.h:
+        Remove toJS that takes a std::optional&lt;IDBKeyPath&gt;, it was unused, and update date code
+        to only call valueToDate once, and pass things by reference.
+
+        * bindings/js/JSDOMBinding.cpp:
+        * bindings/js/JSDOMBinding.h:
+        Move most of the conversion helpers into their respective JSDOMConvertFoo header.
+
+        * bindings/js/JSDOMConvert.h:
+        Leave for now, just has includes of all the broken out headers.
+
+        * bindings/js/JSDOMConvertAny.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertBase.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertBoolean.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertBufferSource.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertCallbacks.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertDate.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+        * bindings/js/JSDOMConvertDate.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertDictionary.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertEnumeration.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertEventListener.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertIndexedDB.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertInterface.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertJSON.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertNull.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertNullable.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertNumbers.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+        * bindings/js/JSDOMConvertNumbers.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertObject.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertRecord.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertSequences.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertSerializedScriptValue.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertStrings.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+        * bindings/js/JSDOMConvertStrings.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertUnion.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertVariadic.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertWebGL.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+        * bindings/js/JSDOMConvertXPathNSResolver.h: Copied from Source/WebCore/bindings/js/JSDOMConvert.h.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateParametersCheck):
+        Add include of JSDOMConvertVariadic.h rather than JSDOMConvert.
+
+        * bindings/js/JSCryptoCustom.cpp:
+        * bindings/js/JSCryptoOperationData.cpp:
+        * bindings/js/JSImageDataCustom.cpp:
+        * bindings/js/ReadableStreamDefaultController.h:
+        * bindings/js/WebCoreTypedArrayController.cpp:
+        * html/canvas/WebGLAny.cpp:
+        * platform/mac/SerializedPlatformRepresentationMac.mm:
+        Add includes for specific JSDOMConvert header now that helpers have 
+        been moved their from JSDOMBinding.h
+
+2017-02-07  Sam Weinig  &lt;sam@webkit.org&gt;
+
</ins><span class="cx">         Remove unnecessary exports on inline functions. They were causing build failures
</span><span class="cx">         with some compilers.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -2919,6 +2919,33 @@
</span><span class="cx">                 7C7941E41C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C7941E21C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm */; };
</span><span class="cx">                 7C7941E51C56C29300A4C58E /* DataDetectorsCoreSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C7941E31C56C29300A4C58E /* DataDetectorsCoreSoftLink.h */; };
</span><span class="cx">                 7C83DE861D04CC5D00FEBCF3 /* SpringSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C83DE851D04CBD400FEBCF3 /* SpringSolver.h */; };
</span><ins>+                7C8E34AD1E4A33AF0054CE23 /* JSDOMConvertAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34921E4A338E0054CE23 /* JSDOMConvertAny.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34AE1E4A33AF0054CE23 /* JSDOMConvertBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34931E4A338E0054CE23 /* JSDOMConvertBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34AF1E4A33AF0054CE23 /* JSDOMConvertBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34941E4A338E0054CE23 /* JSDOMConvertBoolean.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B01E4A33AF0054CE23 /* JSDOMConvertBufferSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34951E4A338E0054CE23 /* JSDOMConvertBufferSource.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B11E4A33B00054CE23 /* JSDOMConvertCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34961E4A338E0054CE23 /* JSDOMConvertCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B21E4A33B00054CE23 /* JSDOMConvertDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8E34971E4A338E0054CE23 /* JSDOMConvertDate.cpp */; };
+                7C8E34B31E4A33B00054CE23 /* JSDOMConvertDate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34981E4A338E0054CE23 /* JSDOMConvertDate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B41E4A33B00054CE23 /* JSDOMConvertDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34991E4A338E0054CE23 /* JSDOMConvertDictionary.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B51E4A33B00054CE23 /* JSDOMConvertEnumeration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349A1E4A338E0054CE23 /* JSDOMConvertEnumeration.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B61E4A33B00054CE23 /* JSDOMConvertEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349B1E4A338E0054CE23 /* JSDOMConvertEventListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B71E4A33B00054CE23 /* JSDOMConvertIndexedDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349C1E4A338E0054CE23 /* JSDOMConvertIndexedDB.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B81E4A33B00054CE23 /* JSDOMConvertInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349D1E4A338E0054CE23 /* JSDOMConvertInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34B91E4A33B00054CE23 /* JSDOMConvertJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349E1E4A338E0054CE23 /* JSDOMConvertJSON.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34BA1E4A33B00054CE23 /* JSDOMConvertNull.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E349F1E4A338E0054CE23 /* JSDOMConvertNull.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34BB1E4A33B00054CE23 /* JSDOMConvertNullable.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A01E4A338E0054CE23 /* JSDOMConvertNullable.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34BC1E4A33B00054CE23 /* JSDOMConvertNumbers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8E34A11E4A338E0054CE23 /* JSDOMConvertNumbers.cpp */; };
+                7C8E34BD1E4A33B00054CE23 /* JSDOMConvertNumbers.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A21E4A338E0054CE23 /* JSDOMConvertNumbers.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34BE1E4A33B00054CE23 /* JSDOMConvertObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A31E4A338E0054CE23 /* JSDOMConvertObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34BF1E4A33B00054CE23 /* JSDOMConvertRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A41E4A338E0054CE23 /* JSDOMConvertRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C01E4A33B00054CE23 /* JSDOMConvertSequences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A51E4A338E0054CE23 /* JSDOMConvertSequences.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C11E4A33B00054CE23 /* JSDOMConvertSerializedScriptValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A61E4A338E0054CE23 /* JSDOMConvertSerializedScriptValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C21E4A33B00054CE23 /* JSDOMConvertStrings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8E34A71E4A338E0054CE23 /* JSDOMConvertStrings.cpp */; };
+                7C8E34C31E4A33B00054CE23 /* JSDOMConvertStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A81E4A338E0054CE23 /* JSDOMConvertStrings.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C41E4A33B00054CE23 /* JSDOMConvertUnion.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34A91E4A338E0054CE23 /* JSDOMConvertUnion.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C51E4A33B00054CE23 /* JSDOMConvertVariadic.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34AA1E4A338E0054CE23 /* JSDOMConvertVariadic.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C61E4A33B00054CE23 /* JSDOMConvertWebGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34AB1E4A338E0054CE23 /* JSDOMConvertWebGL.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C8E34C71E4A33B00054CE23 /* JSDOMConvertXPathNSResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8E34AC1E4A338E0054CE23 /* JSDOMConvertXPathNSResolver.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7C8F22441DD3C2F600E92DA3 /* SVGAngleValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8F22421DD3B3B900E92DA3 /* SVGAngleValue.cpp */; };
</span><span class="cx">                 7C8F22471DD3D1CA00E92DA3 /* SVGPreserveAspectRatioValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8F22451DD3D1C500E92DA3 /* SVGPreserveAspectRatioValue.cpp */; };
</span><span class="cx">                 7C93F3491AA6BA5E00A98BAB /* CompiledContentExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C93F3471AA6BA5E00A98BAB /* CompiledContentExtension.cpp */; };
</span><span class="lines">@@ -10528,6 +10555,33 @@
</span><span class="cx">                 7C7941E21C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetectorsCoreSoftLink.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C7941E31C56C29300A4C58E /* DataDetectorsCoreSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetectorsCoreSoftLink.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C83DE851D04CBD400FEBCF3 /* SpringSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpringSolver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7C8E34921E4A338E0054CE23 /* JSDOMConvertAny.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertAny.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34931E4A338E0054CE23 /* JSDOMConvertBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34941E4A338E0054CE23 /* JSDOMConvertBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertBoolean.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34951E4A338E0054CE23 /* JSDOMConvertBufferSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertBufferSource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34961E4A338E0054CE23 /* JSDOMConvertCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertCallbacks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34971E4A338E0054CE23 /* JSDOMConvertDate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConvertDate.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34981E4A338E0054CE23 /* JSDOMConvertDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertDate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34991E4A338E0054CE23 /* JSDOMConvertDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertDictionary.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349A1E4A338E0054CE23 /* JSDOMConvertEnumeration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertEnumeration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349B1E4A338E0054CE23 /* JSDOMConvertEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertEventListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349C1E4A338E0054CE23 /* JSDOMConvertIndexedDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertIndexedDB.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349D1E4A338E0054CE23 /* JSDOMConvertInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertInterface.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349E1E4A338E0054CE23 /* JSDOMConvertJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertJSON.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E349F1E4A338E0054CE23 /* JSDOMConvertNull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertNull.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A01E4A338E0054CE23 /* JSDOMConvertNullable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertNullable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A11E4A338E0054CE23 /* JSDOMConvertNumbers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConvertNumbers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A21E4A338E0054CE23 /* JSDOMConvertNumbers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertNumbers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A31E4A338E0054CE23 /* JSDOMConvertObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A41E4A338E0054CE23 /* JSDOMConvertRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertRecord.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A51E4A338E0054CE23 /* JSDOMConvertSequences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertSequences.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A61E4A338E0054CE23 /* JSDOMConvertSerializedScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertSerializedScriptValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A71E4A338E0054CE23 /* JSDOMConvertStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConvertStrings.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A81E4A338E0054CE23 /* JSDOMConvertStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertStrings.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34A91E4A338E0054CE23 /* JSDOMConvertUnion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertUnion.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34AA1E4A338E0054CE23 /* JSDOMConvertVariadic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertVariadic.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34AB1E4A338E0054CE23 /* JSDOMConvertWebGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertWebGL.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C8E34AC1E4A338E0054CE23 /* JSDOMConvertXPathNSResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConvertXPathNSResolver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7C8F22421DD3B3B900E92DA3 /* SVGAngleValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAngleValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C8F22431DD3B3B900E92DA3 /* SVGAngleValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngleValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C8F22451DD3D1C500E92DA3 /* SVGPreserveAspectRatioValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPreserveAspectRatioValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18674,6 +18728,41 @@
</span><span class="cx">                         name = scripts;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                7C8E34911E4A33730054CE23 /* Conversions */ = {
+                        isa = PBXGroup;
+                        children = (
+                                930841331CDDB15500B0958C /* JSDOMConvert.h */,
+                                7C8E34921E4A338E0054CE23 /* JSDOMConvertAny.h */,
+                                7C8E34931E4A338E0054CE23 /* JSDOMConvertBase.h */,
+                                7C8E34941E4A338E0054CE23 /* JSDOMConvertBoolean.h */,
+                                7C8E34951E4A338E0054CE23 /* JSDOMConvertBufferSource.h */,
+                                7C8E34961E4A338E0054CE23 /* JSDOMConvertCallbacks.h */,
+                                7C8E34971E4A338E0054CE23 /* JSDOMConvertDate.cpp */,
+                                7C8E34981E4A338E0054CE23 /* JSDOMConvertDate.h */,
+                                7C8E34991E4A338E0054CE23 /* JSDOMConvertDictionary.h */,
+                                7C8E349A1E4A338E0054CE23 /* JSDOMConvertEnumeration.h */,
+                                7C8E349B1E4A338E0054CE23 /* JSDOMConvertEventListener.h */,
+                                7C8E349C1E4A338E0054CE23 /* JSDOMConvertIndexedDB.h */,
+                                7C8E349D1E4A338E0054CE23 /* JSDOMConvertInterface.h */,
+                                7C8E349E1E4A338E0054CE23 /* JSDOMConvertJSON.h */,
+                                7C8E349F1E4A338E0054CE23 /* JSDOMConvertNull.h */,
+                                7C8E34A01E4A338E0054CE23 /* JSDOMConvertNullable.h */,
+                                7C8E34A11E4A338E0054CE23 /* JSDOMConvertNumbers.cpp */,
+                                7C8E34A21E4A338E0054CE23 /* JSDOMConvertNumbers.h */,
+                                7C8E34A31E4A338E0054CE23 /* JSDOMConvertObject.h */,
+                                7C8E34A41E4A338E0054CE23 /* JSDOMConvertRecord.h */,
+                                7C8E34A51E4A338E0054CE23 /* JSDOMConvertSequences.h */,
+                                7C8E34A61E4A338E0054CE23 /* JSDOMConvertSerializedScriptValue.h */,
+                                7C8E34A71E4A338E0054CE23 /* JSDOMConvertStrings.cpp */,
+                                7C8E34A81E4A338E0054CE23 /* JSDOMConvertStrings.h */,
+                                7C8E34A91E4A338E0054CE23 /* JSDOMConvertUnion.h */,
+                                7C8E34AA1E4A338E0054CE23 /* JSDOMConvertVariadic.h */,
+                                7C8E34AB1E4A338E0054CE23 /* JSDOMConvertWebGL.h */,
+                                7C8E34AC1E4A338E0054CE23 /* JSDOMConvertXPathNSResolver.h */,
+                        );
+                        name = Conversions;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 7E4DE10B198B10810051CB02 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -22282,6 +22371,7 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 BCCE58A71061E82F008FB35A /* Callback Objects */,
</span><span class="cx">                                 BCCE58B41061E925008FB35A /* Constructors */,
</span><ins>+                                7C8E34911E4A33730054CE23 /* Conversions */,
</ins><span class="cx">                                 BC4EDEF70C08F414007EDD49 /* Custom */,
</span><span class="cx">                                 14DFB33F0A7DF7630018F769 /* Derived Sources */,
</span><span class="cx">                                 2DFA488E1DB541C200362B99 /* BufferSource.h */,
</span><span class="lines">@@ -22316,7 +22406,6 @@
</span><span class="cx">                                 7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */,
</span><span class="cx">                                 7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */,
</span><span class="cx">                                 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
</span><del>-                                930841331CDDB15500B0958C /* JSDOMConvert.h */,
</del><span class="cx">                                 7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */,
</span><span class="cx">                                 7C45C9C71E3E8AFF00AAB558 /* JSDOMExceptionHandling.h */,
</span><span class="cx">                                 E1C36CBC0EB08062007410BC /* JSDOMGlobalObject.cpp */,
</span><span class="lines">@@ -25289,6 +25378,7 @@
</span><span class="cx">                                 379E61CA126CA5C400B63E8D /* BaseButtonInputType.h in Headers */,
</span><span class="cx">                                 379E61CC126CA5C400B63E8D /* BaseCheckableInputType.h in Headers */,
</span><span class="cx">                                 F5E0C65C1643C42C00D6CB69 /* BaseChooserOnlyDateAndTimeInputType.h in Headers */,
</span><ins>+                                7C8E34C01E4A33B00054CE23 /* JSDOMConvertSequences.h in Headers */,
</ins><span class="cx">                                 C33EE5C514FB49610002095A /* BaseClickableWithKeyInputType.h in Headers */,
</span><span class="cx">                                 F59C96001255B23F000623C0 /* BaseDateAndTimeInputType.h in Headers */,
</span><span class="cx">                                 F55B3DAE1251F12D003EF269 /* BaseTextInputType.h in Headers */,
</span><span class="lines">@@ -25534,6 +25624,7 @@
</span><span class="cx">                                 E19AC3F51824DC7900349426 /* CryptoAlgorithmSHA512.h in Headers */,
</span><span class="cx">                                 E157A8E518173A3A009F821D /* CryptoKey.h in Headers */,
</span><span class="cx">                                 E125F84E1824289D00D84CD9 /* CryptoKeyAES.h in Headers */,
</span><ins>+                                7C8E34B81E4A33B00054CE23 /* JSDOMConvertInterface.h in Headers */,
</ins><span class="cx">                                 E125F85E182C2DF600D84CD9 /* CryptoKeyData.h in Headers */,
</span><span class="cx">                                 E125F864182C303A00D84CD9 /* CryptoKeyDataOctetSequence.h in Headers */,
</span><span class="cx">                                 E1C266DF18319F31003F8B33 /* CryptoKeyDataRSAComponents.h in Headers */,
</span><span class="lines">@@ -25996,6 +26087,7 @@
</span><span class="cx">                                 516C62211950D48700337E75 /* GamepadEvent.h in Headers */,
</span><span class="cx">                                 51A9D9EA195B931F001B2B5C /* GamepadManager.h in Headers */,
</span><span class="cx">                                 515BE1921D54F5FB00DD7C68 /* GamepadProvider.h in Headers */,
</span><ins>+                                7C8E34B31E4A33B00054CE23 /* JSDOMConvertDate.h in Headers */,
</ins><span class="cx">                                 515BE1931D54F5FB00DD7C68 /* GamepadProviderClient.h in Headers */,
</span><span class="cx">                                 935C477509AC4D8E00A6AAB4 /* GapRects.h in Headers */,
</span><span class="cx">                                 1432E8470C51493800B1500F /* GCController.h in Headers */,
</span><span class="lines">@@ -26345,6 +26437,7 @@
</span><span class="cx">                                 B27535740B053814002CE64F /* IntRect.h in Headers */,
</span><span class="cx">                                 A2B9217316C5CC420041DCD9 /* IntRectExtent.h in Headers */,
</span><span class="cx">                                 E134F5AB12EE343F004EC58D /* IntRectHash.h in Headers */,
</span><ins>+                                7C8E34C61E4A33B00054CE23 /* JSDOMConvertWebGL.h in Headers */,
</ins><span class="cx">                                 B27535750B053814002CE64F /* IntSize.h in Headers */,
</span><span class="cx">                                 B27535760B053814002CE64F /* IntSizeHash.h in Headers */,
</span><span class="cx">                                 CE12524D1A1A77DE00864480 /* IOPMLibSPI.h in Headers */,
</span><span class="lines">@@ -26561,6 +26654,7 @@
</span><span class="cx">                                 76808B50159DADFA002B5233 /* JSHTMLDialogElement.h in Headers */,
</span><span class="cx">                                 1A85B1E70A1B240500D8C87C /* JSHTMLDirectoryElement.h in Headers */,
</span><span class="cx">                                 1A85B2B70A1B2AC700D8C87C /* JSHTMLDivElement.h in Headers */,
</span><ins>+                                7C8E34C71E4A33B00054CE23 /* JSDOMConvertXPathNSResolver.h in Headers */,
</ins><span class="cx">                                 1A85B1E90A1B240500D8C87C /* JSHTMLDListElement.h in Headers */,
</span><span class="cx">                                 1A494E350A12358B00FDAFC1 /* JSHTMLDocument.h in Headers */,
</span><span class="cx">                                 1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */,
</span><span class="lines">@@ -26595,6 +26689,7 @@
</span><span class="cx">                                 1A85B1EB0A1B240500D8C87C /* JSHTMLOListElement.h in Headers */,
</span><span class="cx">                                 A80E7E9B0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.h in Headers */,
</span><span class="cx">                                 A80E7E990A1A83E3007FB8C5 /* JSHTMLOptionElement.h in Headers */,
</span><ins>+                                7C8E34BD1E4A33B00054CE23 /* JSDOMConvertNumbers.h in Headers */,
</ins><span class="cx">                                 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */,
</span><span class="cx">                                 4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */,
</span><span class="cx">                                 1AE2ABA70A1CE90500B42B25 /* JSHTMLParagraphElement.h in Headers */,
</span><span class="lines">@@ -26737,6 +26832,7 @@
</span><span class="cx">                                 B658FFA21522EF3A00DD5595 /* JSRadioNodeList.h in Headers */,
</span><span class="cx">                                 65DF320209D1CC60000BE325 /* JSRange.h in Headers */,
</span><span class="cx">                                 6C4C96DF1AD4483500363F64 /* JSReadableByteStreamController.h in Headers */,
</span><ins>+                                7C8E34B41E4A33B00054CE23 /* JSDOMConvertDictionary.h in Headers */,
</ins><span class="cx">                                 7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */,
</span><span class="cx">                                 6C4C96DF1AD4483500365A50 /* JSReadableStreamDefaultController.h in Headers */,
</span><span class="cx">                                 7C4C96DF1AD4483500365A50 /* JSReadableStreamDefaultReader.h in Headers */,
</span><span class="lines">@@ -26895,6 +26991,7 @@
</span><span class="cx">                                 B2FA3DD10AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalAbs.h in Headers */,
</span><span class="cx">                                 B2FA3DD30AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalRel.h in Headers */,
</span><span class="cx">                                 B2FA3DD50AB75A6F000E5AC4 /* JSSVGPathSegLinetoRel.h in Headers */,
</span><ins>+                                7C8E34AF1E4A33AF0054CE23 /* JSDOMConvertBoolean.h in Headers */,
</ins><span class="cx">                                 B2FA3DD70AB75A6F000E5AC4 /* JSSVGPathSegLinetoVerticalAbs.h in Headers */,
</span><span class="cx">                                 B2FA3DD90AB75A6F000E5AC4 /* JSSVGPathSegLinetoVerticalRel.h in Headers */,
</span><span class="cx">                                 B2FA3DDB0AB75A6F000E5AC4 /* JSSVGPathSegList.h in Headers */,
</span><span class="lines">@@ -26989,6 +27086,7 @@
</span><span class="cx">                                 0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */,
</span><span class="cx">                                 6F995A3A1A70833700A735F4 /* JSWebGLVertexArrayObject.h in Headers */,
</span><span class="cx">                                 77EF62F412F9DB7400C77BD2 /* JSWebGLVertexArrayObjectOES.h in Headers */,
</span><ins>+                                7C8E34C11E4A33B00054CE23 /* JSDOMConvertSerializedScriptValue.h in Headers */,
</ins><span class="cx">                                 31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */,
</span><span class="cx">                                 498391400F1E767500C23782 /* JSWebKitCSSMatrix.h in Headers */,
</span><span class="cx">                                 8AD0A59514C88336000D83C5 /* JSWebKitCSSRegionRule.h in Headers */,
</span><span class="lines">@@ -27013,6 +27111,7 @@
</span><span class="cx">                                 BCDFD4960E30592F009D10AD /* JSXMLHttpRequestUpload.h in Headers */,
</span><span class="cx">                                 1ACE53F70A8D19470022947D /* JSXMLSerializer.h in Headers */,
</span><span class="cx">                                 1A762C740A074F2600989F5B /* JSXPathEvaluator.h in Headers */,
</span><ins>+                                7C8E34BB1E4A33B00054CE23 /* JSDOMConvertNullable.h in Headers */,
</ins><span class="cx">                                 BC60DB4A0D2A3D1E00B9918F /* JSXPathException.h in Headers */,
</span><span class="cx">                                 1A762C760A074F2600989F5B /* JSXPathExpression.h in Headers */,
</span><span class="cx">                                 1A762C780A074F2600989F5B /* JSXPathNSResolver.h in Headers */,
</span><span class="lines">@@ -27274,6 +27373,7 @@
</span><span class="cx">                                 D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */,
</span><span class="cx">                                 C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */,
</span><span class="cx">                                 52B6C9C615E3F4DF00690B05 /* NamedFlowCollection.h in Headers */,
</span><ins>+                                7C8E34B61E4A33B00054CE23 /* JSDOMConvertEventListener.h in Headers */,
</ins><span class="cx">                                 314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */,
</span><span class="cx">                                 A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
</span><span class="cx">                                 A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
</span><span class="lines">@@ -27460,6 +27560,7 @@
</span><span class="cx">                                 0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */,
</span><span class="cx">                                 499B3EC5128CCC4700E726C2 /* PlatformCALayer.h in Headers */,
</span><span class="cx">                                 493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */,
</span><ins>+                                7C8E34B71E4A33B00054CE23 /* JSDOMConvertIndexedDB.h in Headers */,
</ins><span class="cx">                                 2D70BA1318074DDF0001908A /* PlatformCALayerCocoa.h in Headers */,
</span><span class="cx">                                 A14978711ABAF3A500CEF7E4 /* PlatformContentFilter.h in Headers */,
</span><span class="cx">                                 E1424C8A164B3B4E00F32D40 /* PlatformCookieJar.h in Headers */,
</span><span class="lines">@@ -27468,7 +27569,9 @@
</span><span class="cx">                                 BCAA487014A052530088FAC4 /* PlatformEventFactoryMac.h in Headers */,
</span><span class="cx">                                 A723F77B1484CA4C008C6DBE /* PlatformExportMacros.h in Headers */,
</span><span class="cx">                                 515BE1951D54F5FB00DD7C68 /* PlatformGamepad.h in Headers */,
</span><ins>+                                7C8E34B01E4A33AF0054CE23 /* JSDOMConvertBufferSource.h in Headers */,
</ins><span class="cx">                                 935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */,
</span><ins>+                                7C8E34AE1E4A33AF0054CE23 /* JSDOMConvertBase.h in Headers */,
</ins><span class="cx">                                 0562F9611573F88F0031CA16 /* PlatformLayer.h in Headers */,
</span><span class="cx">                                 F544F78915CFB2A800AF33A8 /* PlatformLocale.h in Headers */,
</span><span class="cx">                                 CEEFCD7C19DB33DC003876D7 /* PlatformMediaResourceLoader.h in Headers */,
</span><span class="lines">@@ -27778,6 +27881,7 @@
</span><span class="cx">                                 078E092117D14D1C00420AA1 /* RTCDTMFToneChangeEvent.h in Headers */,
</span><span class="cx">                                 078E092317D14D1C00420AA1 /* RTCIceCandidate.h in Headers */,
</span><span class="cx">                                 078E094017D16E1C00420AA1 /* RTCIceCandidateDescriptor.h in Headers */,
</span><ins>+                                7C8E34BF1E4A33B00054CE23 /* JSDOMConvertRecord.h in Headers */,
</ins><span class="cx">                                 078E092417D14D1C00420AA1 /* RTCIceCandidateEvent.h in Headers */,
</span><span class="cx">                                 07AB996B18DA3C010018771E /* RTCIceServer.h in Headers */,
</span><span class="cx">                                 073794FE19F5864E00E5A045 /* RTCNotifiersMock.h in Headers */,
</span><span class="lines">@@ -27874,6 +27978,7 @@
</span><span class="cx">                                 7AAFE8D019CB8672000F56D8 /* ScrollLatchingState.h in Headers */,
</span><span class="cx">                                 F478755419983AFF0024A287 /* ScrollSnapAnimatorState.h in Headers */,
</span><span class="cx">                                 F46729281E0DE68500ACC3D8 /* ScrollSnapOffsetsInfo.h in Headers */,
</span><ins>+                                7C8E34B11E4A33B00054CE23 /* JSDOMConvertCallbacks.h in Headers */,
</ins><span class="cx">                                 83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */,
</span><span class="cx">                                 93C09C860B0657AA005ABD4D /* ScrollTypes.h in Headers */,
</span><span class="cx">                                 BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */,
</span><span class="lines">@@ -28308,6 +28413,7 @@
</span><span class="cx">                                 B2227AD40D00BF220071B782 /* SVGTitleElement.h in Headers */,
</span><span class="cx">                                 1CCDF5BE1990332400BCEBAD /* SVGToOTFFontConversion.h in Headers */,
</span><span class="cx">                                 B2227AD70D00BF220071B782 /* SVGTransform.h in Headers */,
</span><ins>+                                7C8E34AD1E4A33AF0054CE23 /* JSDOMConvertAny.h in Headers */,
</ins><span class="cx">                                 B2227ADA0D00BF220071B782 /* SVGTransformable.h in Headers */,
</span><span class="cx">                                 B2227ADD0D00BF220071B782 /* SVGTransformDistance.h in Headers */,
</span><span class="cx">                                 B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */,
</span><span class="lines">@@ -28403,6 +28509,7 @@
</span><span class="cx">                                 E1FF57A30F01255B00891EBB /* ThreadGlobalData.h in Headers */,
</span><span class="cx">                                 51D7EFEA1BDE8F8C00E93E10 /* ThreadSafeDataBuffer.h in Headers */,
</span><span class="cx">                                 185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */,
</span><ins>+                                7C8E34C41E4A33B00054CE23 /* JSDOMConvertUnion.h in Headers */,
</ins><span class="cx">                                 7AA3A69A194A64E7001CBD24 /* TileController.h in Headers */,
</span><span class="cx">                                 1F72BF0B187FD45C0009BCB3 /* TileControllerMemoryHandlerIOS.h in Headers */,
</span><span class="cx">                                 7AA3A6A4194B5C22001CBD24 /* TileCoverageMap.h in Headers */,
</span><span class="lines">@@ -28412,6 +28519,7 @@
</span><span class="cx">                                 F55B3DDC1251F12D003EF269 /* TimeInputType.h in Headers */,
</span><span class="cx">                                 7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */,
</span><span class="cx">                                 9305B24D098F1B6B00C28855 /* Timer.h in Headers */,
</span><ins>+                                7C8E34C31E4A33B00054CE23 /* JSDOMConvertStrings.h in Headers */,
</ins><span class="cx">                                 E44613B00CD6331000FADA75 /* TimeRanges.h in Headers */,
</span><span class="cx">                                 2D7ED0AB1BAE99170043B3E5 /* TimerEventBasedMock.h in Headers */,
</span><span class="cx">                                 49E912AE0EFAC906009D0CAF /* TimingFunction.h in Headers */,
</span><span class="lines">@@ -28457,6 +28565,7 @@
</span><span class="cx">                                 BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */,
</span><span class="cx">                                 F55B3DDE1251F12D003EF269 /* URLInputType.h in Headers */,
</span><span class="cx">                                 5C6E65431D5CEFBF00F7862E /* URLParser.h in Headers */,
</span><ins>+                                7C8E34B51E4A33B00054CE23 /* JSDOMConvertEnumeration.h in Headers */,
</ins><span class="cx">                                 7CC289DF1AA0FE5D009A9CE3 /* URLRegistry.h in Headers */,
</span><span class="cx">                                 93D437A21D57B3FE00AB85EA /* URLUtils.h in Headers */,
</span><span class="cx">                                 A72763BF16689BFB002FCACB /* UserActionElementSet.h in Headers */,
</span><span class="lines">@@ -28534,6 +28643,7 @@
</span><span class="cx">                                 A56C5B9B189F34570082D13C /* WebConsoleAgent.h in Headers */,
</span><span class="cx">                                 419BE7591BC7F42B00E1C85B /* WebCoreBuiltinNames.h in Headers */,
</span><span class="cx">                                 2D3EF44A1917915C00034184 /* WebCoreCALayerExtras.h in Headers */,
</span><ins>+                                7C8E34BE1E4A33B00054CE23 /* JSDOMConvertObject.h in Headers */,
</ins><span class="cx">                                 515F79541CFCA3D500CCED93 /* WebCoreCrossThreadCopier.h in Headers */,
</span><span class="cx">                                 93F199A808245E59001E9ABC /* WebCoreFrameView.h in Headers */,
</span><span class="cx">                                 CDC69DDA16371FD4007C38DF /* WebCoreFullScreenPlaceholderView.h in Headers */,
</span><span class="lines">@@ -28620,6 +28730,7 @@
</span><span class="cx">                                 7C48A6D1191C9D6500026674 /* WebKitNamespace.h in Headers */,
</span><span class="cx">                                 A5DEBDA416FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.h in Headers */,
</span><span class="cx">                                 494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */,
</span><ins>+                                7C8E34C51E4A33B00054CE23 /* JSDOMConvertVariadic.h in Headers */,
</ins><span class="cx">                                 5709E8CF1D413D9A003244AC /* WebKitSubtleCrypto.h in Headers */,
</span><span class="cx">                                 31C0FF250E4CEB6E007D6FE5 /* WebKitTransitionEvent.h in Headers */,
</span><span class="cx">                                 0FCF332F0F2B9A25004B6795 /* WebLayer.h in Headers */,
</span><span class="lines">@@ -28717,6 +28828,7 @@
</span><span class="cx">                                 416E6FE81BBD12DF000A6053 /* WritableStreamInternalsBuiltins.h in Headers */,
</span><span class="cx">                                 9BAF3B2412C1A39800014BF1 /* WritingDirection.h in Headers */,
</span><span class="cx">                                 14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */,
</span><ins>+                                7C8E34BA1E4A33B00054CE23 /* JSDOMConvertNull.h in Headers */,
</ins><span class="cx">                                 6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
</span><span class="cx">                                 830784B21C52EE2C00104D1D /* XMLDocument.h in Headers */,
</span><span class="cx">                                 00B9318813BA8DBA0035A948 /* XMLDocumentParser.h in Headers */,
</span><span class="lines">@@ -28729,6 +28841,7 @@
</span><span class="cx">                                 BCDFD48E0E305290009D10AD /* XMLHttpRequestUpload.h in Headers */,
</span><span class="cx">                                 A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */,
</span><span class="cx">                                 E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */,
</span><ins>+                                7C8E34B91E4A33B00054CE23 /* JSDOMConvertJSON.h in Headers */,
</ins><span class="cx">                                 1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */,
</span><span class="cx">                                 5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */,
</span><span class="cx">                                 1AB7FC690A8B92EC00D9D37B /* XPathEvaluator.h in Headers */,
</span><span class="lines">@@ -29485,6 +29598,7 @@
</span><span class="cx">                                 A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
</span><span class="cx">                                 78D02BC5154A18DF00B62D05 /* CSSPropertyAnimation.cpp in Sources */,
</span><span class="cx">                                 1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
</span><ins>+                                7C8E34B21E4A33B00054CE23 /* JSDOMConvertDate.cpp in Sources */,
</ins><span class="cx">                                 946D37451D6D01D40077084F /* CSSPropertyParser.cpp in Sources */,
</span><span class="cx">                                 949C77041D6E39EA00C0DE4F /* CSSPropertyParserHelpers.cpp in Sources */,
</span><span class="cx">                                 82E3D8DE122EA0D1003AE5BC /* CSSPropertySourceData.cpp in Sources */,
</span><span class="lines">@@ -29751,6 +29865,7 @@
</span><span class="cx">                                 9A528E8317D7F52F00AA9518 /* FloatingObjects.cpp in Sources */,
</span><span class="cx">                                 FE699871192087E7006936BD /* FloatingPointEnvironment.cpp in Sources */,
</span><span class="cx">                                 B27535680B053814002CE64F /* FloatPoint.cpp in Sources */,
</span><ins>+                                7C8E34C21E4A33B00054CE23 /* JSDOMConvertStrings.cpp in Sources */,
</ins><span class="cx">                                 B2E27C9F0B0F2B0900F17C7B /* FloatPoint3D.cpp in Sources */,
</span><span class="cx">                                 B27535590B053814002CE64F /* FloatPointCG.cpp in Sources */,
</span><span class="cx">                                 B27535780B053814002CE64F /* FloatPointMac.mm in Sources */,
</span><span class="lines">@@ -31370,6 +31485,7 @@
</span><span class="cx">                                 BCE32B9E1517C22700F542EC /* RenderMultiColumnSet.cpp in Sources */,
</span><span class="cx">                                 BC1A7D9718FCB5B000421879 /* RenderMultiColumnSpannerPlaceholder.cpp in Sources */,
</span><span class="cx">                                 8AC822FC180FC03300FB64D5 /* RenderNamedFlowFragment.cpp in Sources */,
</span><ins>+                                7C8E34BC1E4A33B00054CE23 /* JSDOMConvertNumbers.cpp in Sources */,
</ins><span class="cx">                                 1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */,
</span><span class="cx">                                 BCEA487F097D93020094C9E4 /* RenderObject.cpp in Sources */,
</span><span class="cx">                                 A43BF59C1149292800C643CA /* RenderProgress.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><ins>+
</ins><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBIndexInfo.h&quot;
</span><span class="lines">@@ -151,8 +152,11 @@
</span><span class="cx">     if (value.isString())
</span><span class="cx">         return IDBKey::createString(asString(value)-&gt;value(&amp;exec));
</span><span class="cx"> 
</span><del>-    if (value.inherits(vm, DateInstance::info()) &amp;&amp; !std::isnan(valueToDate(&amp;exec, value)))
-        return IDBKey::createDate(valueToDate(&amp;exec, value));
</del><ins>+    if (value.inherits(vm, DateInstance::info())) {
+        auto dateValue = valueToDate(exec, value);
+        if (!std::isnan(dateValue))
+            return IDBKey::createDate(dateValue);
+    }
</ins><span class="cx"> 
</span><span class="cx">     if (value.isObject()) {
</span><span class="cx">         JSObject* object = asObject(value);
</span><span class="lines">@@ -415,19 +419,6 @@
</span><span class="cx">     outKey = IndexKey(WTFMove(keyDatas));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const std::optional&lt;IDBKeyPath&gt;&amp; keyPath)
-{
-    if (!keyPath)
-        return jsNull();
-
-    auto visitor = WTF::makeVisitor([&amp;](const String&amp; string) -&gt; JSValue {
-        return toJS&lt;IDLDOMString&gt;(state, globalObject, string);
-    }, [&amp;](const Vector&lt;String&gt;&amp; vector) -&gt; JSValue {
-        return toJS&lt;IDLSequence&lt;IDLDOMString&gt;&gt;(state, globalObject, vector);
-    });
-    return WTF::visit(visitor, keyPath.value());
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -45,10 +45,7 @@
</span><span class="cx"> class IDBValue;
</span><span class="cx"> class IndexKey;
</span><span class="cx"> class JSDOMGlobalObject;
</span><del>-class ThreadSafeDataBuffer;
</del><span class="cx"> 
</span><del>-// FIXME: Remove this once we support returning union types.
-JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, const std::optional&lt;IDBKeyPath&gt;&amp;);
</del><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&amp;, const JSC::JSValue&amp;, const IDBKeyPath&amp;);
</span><span class="cx"> bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&amp;, const JSC::JSValue&amp;, const IDBKeyPath&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -26,8 +26,9 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSCrypto.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvertBufferSource.h&quot;
</ins><span class="cx"> #include &quot;JSDOMExceptionHandling.h&quot;
</span><ins>+#include &lt;heap/HeapInlines.h&gt;
</ins><span class="cx"> #include &lt;runtime/ArrayBufferView.h&gt;
</span><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><span class="cx"> #include &lt;runtime/JSArrayBufferView.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoOperationDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -28,7 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvertBufferSource.h&quot;
+#include &lt;heap/HeapInlines.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -22,16 +22,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CachedScript.h&quot;
</del><span class="cx"> #include &quot;CommonVM.h&quot;
</span><del>-#include &quot;Frame.h&quot;
-#include &quot;HTMLParserIdioms.h&quot;
-#include &quot;JSDOMConvert.h&quot;
-#include &lt;runtime/DateInstance.h&gt;
-#include &lt;stdarg.h&gt;
-#include &lt;wtf/MathExtras.h&gt;
-#include &lt;wtf/text/StringBuilder.h&gt;
-#include &lt;wtf/unicode/CharacterNames.h&gt;
</del><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="lines">@@ -56,99 +47,6 @@
</span><span class="cx">     return jsStringWithCache(exec, s);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline String stringToByteString(ExecState&amp; state, JSC::ThrowScope&amp; scope, String&amp;&amp; string)
-{
-    if (!string.containsOnlyLatin1()) {
-        throwTypeError(&amp;state, scope);
-        return { };
-    }
-
-    return string;
-}
-
-String identifierToByteString(ExecState&amp; state, const Identifier&amp; identifier)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    String string = identifier.string();
-    return stringToByteString(state, scope, WTFMove(string));
-}
-
-String valueToByteString(ExecState&amp; state, JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    String string = value.toWTFString(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-
-    return stringToByteString(state, scope, WTFMove(string));
-}
-
-static inline bool hasUnpairedSurrogate(StringView string)
-{
-    // Fast path for 8-bit strings; they can't have any surrogates.
-    if (string.is8Bit())
-        return false;
-    for (auto codePoint : string.codePoints()) {
-        if (U_IS_SURROGATE(codePoint))
-            return true;
-    }
-    return false;
-}
-
-static inline String stringToUSVString(String&amp;&amp; string)
-{
-    // Fast path for the case where there are no unpaired surrogates.
-    if (!hasUnpairedSurrogate(string))
-        return string;
-
-    // Slow path: http://heycam.github.io/webidl/#dfn-obtain-unicode
-    // Replaces unpaired surrogates with the replacement character.
-    StringBuilder result;
-    result.reserveCapacity(string.length());
-    StringView view { string };
-    for (auto codePoint : view.codePoints()) {
-        if (U_IS_SURROGATE(codePoint))
-            result.append(replacementCharacter);
-        else
-            result.append(codePoint);
-    }
-    return result.toString();
-}
-
-String identifierToUSVString(ExecState&amp;, const Identifier&amp; identifier)
-{
-    String string = identifier.string();
-    return stringToUSVString(WTFMove(string));
-}
-
-String valueToUSVString(ExecState&amp; state, JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    String string = value.toWTFString(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-
-    return stringToUSVString(WTFMove(string));
-}
-
-JSValue jsDate(ExecState* exec, double value)
-{
-    return DateInstance::create(exec-&gt;vm(), exec-&gt;lexicalGlobalObject()-&gt;dateStructure(), value);
-}
-
-double valueToDate(ExecState* exec, JSValue value)
-{
-    if (value.isNumber())
-        return value.asNumber();
-    if (!value.inherits(exec-&gt;vm(), DateInstance::info()))
-        return std::numeric_limits&lt;double&gt;::quiet_NaN();
-    return static_cast&lt;DateInstance*&gt;(value.toObject(exec))-&gt;internalNumber();
-}
-
</del><span class="cx"> bool hasIteratorMethod(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     auto&amp; vm = state.vm();
</span><span class="lines">@@ -166,317 +64,4 @@
</span><span class="cx">     return !applyMethod.isUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static const int32_t kMaxInt32 = 0x7fffffff;
-static const int32_t kMinInt32 = -kMaxInt32 - 1;
-static const uint32_t kMaxUInt32 = 0xffffffffU;
-static const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, largest integer exactly representable in ECMAScript.
-
-static String rangeErrorString(double value, double min, double max)
-{
-    return makeString(&quot;Value &quot;, String::numberToStringECMAScript(value), &quot; is outside the range [&quot;, String::numberToStringECMAScript(min), &quot;, &quot;, String::numberToStringECMAScript(max), &quot;]&quot;);
-}
-
-static double enforceRange(ExecState&amp; state, double x, double minimum, double maximum)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (std::isnan(x) || std::isinf(x)) {
-        throwTypeError(&amp;state, scope, rangeErrorString(x, minimum, maximum));
-        return 0;
-    }
-    x = trunc(x);
-    if (x &lt; minimum || x &gt; maximum) {
-        throwTypeError(&amp;state, scope, rangeErrorString(x, minimum, maximum));
-        return 0;
-    }
-    return x;
-}
-
-template &lt;typename T&gt;
-struct IntTypeLimits {
-};
-
-template &lt;&gt;
-struct IntTypeLimits&lt;int8_t&gt; {
-    static const int8_t minValue = -128;
-    static const int8_t maxValue = 127;
-    static const unsigned numberOfValues = 256; // 2^8
-};
-
-template &lt;&gt;
-struct IntTypeLimits&lt;uint8_t&gt; {
-    static const uint8_t maxValue = 255;
-    static const unsigned numberOfValues = 256; // 2^8
-};
-
-template &lt;&gt;
-struct IntTypeLimits&lt;int16_t&gt; {
-    static const short minValue = -32768;
-    static const short maxValue = 32767;
-    static const unsigned numberOfValues = 65536; // 2^16
-};
-
-template &lt;&gt;
-struct IntTypeLimits&lt;uint16_t&gt; {
-    static const unsigned short maxValue = 65535;
-    static const unsigned numberOfValues = 65536; // 2^16
-};
-
-template &lt;typename T&gt;
-static inline T toSmallerInt(ExecState&amp; state, JSValue value, IntegerConversionConfiguration configuration)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    static_assert(std::is_signed&lt;T&gt;::value &amp;&amp; std::is_integral&lt;T&gt;::value, &quot;Should only be used for signed integral types&quot;);
-
-    typedef IntTypeLimits&lt;T&gt; LimitsTrait;
-    // Fast path if the value is already a 32-bit signed integer in the right range.
-    if (value.isInt32()) {
-        int32_t d = value.asInt32();
-        if (d &gt;= LimitsTrait::minValue &amp;&amp; d &lt;= LimitsTrait::maxValue)
-            return static_cast&lt;T&gt;(d);
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            throwTypeError(&amp;state, scope);
-            return 0;
-        case IntegerConversionConfiguration::Clamp:
-            return d &lt; LimitsTrait::minValue ? LimitsTrait::minValue : LimitsTrait::maxValue;
-        }
-        d %= LimitsTrait::numberOfValues;
-        return static_cast&lt;T&gt;(d &gt; LimitsTrait::maxValue ? d - LimitsTrait::numberOfValues : d);
-    }
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-
-    switch (configuration) {
-    case IntegerConversionConfiguration::Normal:
-        break;
-    case IntegerConversionConfiguration::EnforceRange:
-        return enforceRange(state, x, LimitsTrait::minValue, LimitsTrait::maxValue);
-    case IntegerConversionConfiguration::Clamp:
-        return std::isnan(x) ? 0 : clampTo&lt;T&gt;(x);
-    }
-
-    if (std::isnan(x) || std::isinf(x) || !x)
-        return 0;
-
-    x = x &lt; 0 ? -floor(fabs(x)) : floor(fabs(x));
-    x = fmod(x, LimitsTrait::numberOfValues);
-
-    return static_cast&lt;T&gt;(x &gt; LimitsTrait::maxValue ? x - LimitsTrait::numberOfValues : x);
-}
-
-template &lt;typename T&gt;
-static inline T toSmallerUInt(ExecState&amp; state, JSValue value, IntegerConversionConfiguration configuration)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    static_assert(std::is_unsigned&lt;T&gt;::value &amp;&amp; std::is_integral&lt;T&gt;::value, &quot;Should only be used for unsigned integral types&quot;);
-
-    typedef IntTypeLimits&lt;T&gt; LimitsTrait;
-    // Fast path if the value is already a 32-bit unsigned integer in the right range.
-    if (value.isUInt32()) {
-        uint32_t d = value.asUInt32();
-        if (d &lt;= LimitsTrait::maxValue)
-            return static_cast&lt;T&gt;(d);
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            return static_cast&lt;T&gt;(d);
-        case IntegerConversionConfiguration::EnforceRange:
-            throwTypeError(&amp;state, scope);
-            return 0;
-        case IntegerConversionConfiguration::Clamp:
-            return LimitsTrait::maxValue;
-        }
-    }
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-
-    switch (configuration) {
-    case IntegerConversionConfiguration::Normal:
-        break;
-    case IntegerConversionConfiguration::EnforceRange:
-        return enforceRange(state, x, 0, LimitsTrait::maxValue);
-    case IntegerConversionConfiguration::Clamp:
-        return std::isnan(x) ? 0 : clampTo&lt;T&gt;(x);
-    }
-
-    if (std::isnan(x) || std::isinf(x) || !x)
-        return 0;
-
-    x = x &lt; 0 ? -floor(fabs(x)) : floor(fabs(x));
-    return static_cast&lt;T&gt;(fmod(x, LimitsTrait::numberOfValues));
-}
-
-int8_t toInt8EnforceRange(JSC::ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
-}
-
-uint8_t toUInt8EnforceRange(JSC::ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
-}
-
-int8_t toInt8Clamp(JSC::ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
-}
-
-uint8_t toUInt8Clamp(JSC::ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-byte
-int8_t toInt8(ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::Normal);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-octet
-uint8_t toUInt8(ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::Normal);
-}
-
-int16_t toInt16EnforceRange(ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
-}
-
-uint16_t toUInt16EnforceRange(ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
-}
-
-int16_t toInt16Clamp(ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
-}
-
-uint16_t toUInt16Clamp(ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-short
-int16_t toInt16(ExecState&amp; state, JSValue value)
-{
-    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::Normal);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-unsigned-short
-uint16_t toUInt16(ExecState&amp; state, JSValue value)
-{
-    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::Normal);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-long
-int32_t toInt32EnforceRange(ExecState&amp; state, JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (value.isInt32())
-        return value.asInt32();
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-    return enforceRange(state, x, kMinInt32, kMaxInt32);
-}
-
-int32_t toInt32Clamp(ExecState&amp; state, JSValue value)
-{
-    if (value.isInt32())
-        return value.asInt32();
-
-    double x = value.toNumber(&amp;state);
-    return std::isnan(x) ? 0 : clampTo&lt;int32_t&gt;(x);
-}
-
-uint32_t toUInt32Clamp(ExecState&amp; state, JSValue value)
-{
-    if (value.isUInt32())
-        return value.asUInt32();
-
-    double x = value.toNumber(&amp;state);
-    return std::isnan(x) ? 0 : clampTo&lt;uint32_t&gt;(x);
-}
-
-// http://www.w3.org/TR/WebIDL/#es-unsigned-long
-uint32_t toUInt32EnforceRange(ExecState&amp; state, JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (value.isUInt32())
-        return value.asUInt32();
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-    return enforceRange(state, x, 0, kMaxUInt32);
-}
-
-int64_t toInt64EnforceRange(ExecState&amp; state, JSC::JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-    return enforceRange(state, x, -kJSMaxInteger, kJSMaxInteger);
-}
-
-uint64_t toUInt64EnforceRange(ExecState&amp; state, JSC::JSValue value)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    double x = value.toNumber(&amp;state);
-    RETURN_IF_EXCEPTION(scope, 0);
-    return enforceRange(state, x, 0, kJSMaxInteger);
-}
-
-int64_t toInt64Clamp(ExecState&amp; state, JSC::JSValue value)
-{
-    double x = value.toNumber(&amp;state);
-    return std::isnan(x) ? 0 : static_cast&lt;int64_t&gt;(std::min&lt;double&gt;(std::max&lt;double&gt;(x, -kJSMaxInteger), kJSMaxInteger));
-}
-
-uint64_t toUInt64Clamp(ExecState&amp; state, JSC::JSValue value)
-{
-    double x = value.toNumber(&amp;state);
-    return std::isnan(x) ? 0 : static_cast&lt;uint64_t&gt;(std::min&lt;double&gt;(std::max&lt;double&gt;(x, 0), kJSMaxInteger));
-}
-
-// http://www.w3.org/TR/WebIDL/#es-long-long
-int64_t toInt64(ExecState&amp; state, JSValue value)
-{
-    double x = value.toNumber(&amp;state);
-
-    // Map NaNs and +/-Infinity to 0; convert finite values modulo 2^64.
-    unsigned long long n;
-    doubleToInteger(x, n);
-    return n;
-}
-
-// http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
-uint64_t toUInt64(ExecState&amp; state, JSValue value)
-{
-    double x = value.toNumber(&amp;state);
-
-    // Map NaNs and +/-Infinity to 0; convert finite values modulo 2^64.
-    unsigned long long n;
-    doubleToInteger(x, n);
-    return n;
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -29,12 +29,10 @@
</span><span class="cx"> #include &lt;heap/HeapInlines.h&gt;
</span><span class="cx"> #include &lt;heap/SlotVisitorInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/AuxiliaryBarrierInlines.h&gt;
</span><del>-#include &lt;runtime/IteratorOperations.h&gt;
</del><span class="cx"> #include &lt;runtime/JSArray.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCJSValueInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCellInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/JSObjectInlines.h&gt;
</span><del>-#include &lt;runtime/JSTypedArrays.h&gt;
</del><span class="cx"> #include &lt;runtime/Lookup.h&gt;
</span><span class="cx"> #include &lt;runtime/ObjectConstructor.h&gt;
</span><span class="cx"> #include &lt;runtime/StructureInlines.h&gt;
</span><span class="lines">@@ -41,12 +39,8 @@
</span><span class="cx"> #include &lt;runtime/WriteBarrier.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><del>-#include &lt;wtf/Noncopyable.h&gt;
</del><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><del>-// FIXME: We could make this file a lot easier to read by putting all function declarations at the top,
-// and function definitions below, even for template and inline functions.
-
</del><span class="cx"> namespace JSC {
</span><span class="cx"> class JSFunction;
</span><span class="cx"> }
</span><span class="lines">@@ -61,123 +55,24 @@
</span><span class="cx"> // object, to let the engine know that collecting the JSString wrapper is unlikely to save memory.
</span><span class="cx"> JSC::JSValue jsOwnedStringOrNull(JSC::ExecState*, const String&amp;);
</span><span class="cx"> 
</span><del>-String propertyNameToString(JSC::PropertyName);
-AtomicString propertyNameToAtomicString(JSC::PropertyName);
-
-WEBCORE_EXPORT String identifierToByteString(JSC::ExecState&amp;, const JSC::Identifier&amp;);
-WEBCORE_EXPORT String valueToByteString(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT String identifierToUSVString(JSC::ExecState&amp;, const JSC::Identifier&amp;);
-WEBCORE_EXPORT String valueToUSVString(JSC::ExecState&amp;, JSC::JSValue);
-
-// The following functions convert values to integers as per the WebIDL specification.
-// The conversion fails if the value cannot be converted to a number or, if EnforceRange is specified,
-// the value is outside the range of the destination integer type.
-
-WEBCORE_EXPORT int8_t toInt8EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint8_t toUInt8EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int16_t toInt16EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint16_t toUInt16EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int32_t toInt32EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint32_t toUInt32EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int64_t toInt64EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint64_t toUInt64EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
-
-WEBCORE_EXPORT int8_t toInt8Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint8_t toUInt8Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int16_t toInt16Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint16_t toUInt16Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int32_t toInt32Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint32_t toUInt32Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int64_t toInt64Clamp(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint64_t toUInt64Clamp(JSC::ExecState&amp;, JSC::JSValue);
-
-WEBCORE_EXPORT int8_t toInt8(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint8_t toUInt8(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int16_t toInt16(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint16_t toUInt16(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT int64_t toInt64(JSC::ExecState&amp;, JSC::JSValue);
-WEBCORE_EXPORT uint64_t toUInt64(JSC::ExecState&amp;, JSC::JSValue);
-
-JSC::JSValue jsDate(JSC::ExecState*, double value);
-
-// NaN if the value can't be converted to a date.
-double valueToDate(JSC::ExecState*, JSC::JSValue);
-
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBuffer&amp;);
-JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, JSC::ArrayBufferView&amp;);
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBuffer*);
-JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, JSC::ArrayBufferView*);
-
-RefPtr&lt;JSC::ArrayBufferView&gt; toPossiblySharedArrayBufferView(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int8Array&gt; toPossiblySharedInt8Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int16Array&gt; toPossiblySharedInt16Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int32Array&gt; toPossiblySharedInt32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint8Array&gt; toPossiblySharedUint8Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint8ClampedArray&gt; toPossiblySharedUint8ClampedArray(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint16Array&gt; toPossiblySharedUint16Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint32Array&gt; toPossiblySharedUint32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Float32Array&gt; toPossiblySharedFloat32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Float64Array&gt; toPossiblySharedFloat64Array(JSC::VM&amp;, JSC::JSValue);
-
-RefPtr&lt;JSC::ArrayBufferView&gt; toUnsharedArrayBufferView(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int8Array&gt; toUnsharedInt8Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int16Array&gt; toUnsharedInt16Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Int32Array&gt; toUnsharedInt32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint8Array&gt; toUnsharedUint8Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint8ClampedArray&gt; toUnsharedUint8ClampedArray(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint16Array&gt; toUnsharedUint16Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Uint32Array&gt; toUnsharedUint32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Float32Array&gt; toUnsharedFloat32Array(JSC::VM&amp;, JSC::JSValue);
-RefPtr&lt;JSC::Float64Array&gt; toUnsharedFloat64Array(JSC::VM&amp;, JSC::JSValue);
-
-String propertyNameToString(JSC::PropertyName);
-AtomicString propertyNameToAtomicString(JSC::PropertyName);
-
</del><span class="cx"> WEBCORE_EXPORT bool hasIteratorMethod(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span><del>-template&lt;JSC::NativeFunction, int length&gt; JSC::EncodedJSValue nonCachingStaticFunctionGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-
-
-// Inline functions and template definitions.
-
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, JSC::ArrayBuffer&amp; buffer)
</del><ins>+inline String propertyNameToString(JSC::PropertyName propertyName)
</ins><span class="cx"> {
</span><del>-    if (auto result = getCachedWrapper(globalObject-&gt;world(), buffer))
-        return result;
-
-    // The JSArrayBuffer::create function will register the wrapper in finishCreation.
-    return JSC::JSArrayBuffer::create(state-&gt;vm(), globalObject-&gt;arrayBufferStructure(buffer.sharingMode()), &amp;buffer);
</del><ins>+    ASSERT(!propertyName.isSymbol());
+    return propertyName.uid() ? propertyName.uid() : propertyName.publicName();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline JSC::JSValue toJS(JSC::ExecState* state, JSC::JSGlobalObject* globalObject, JSC::ArrayBufferView&amp; view)
</del><ins>+inline AtomicString propertyNameToAtomicString(JSC::PropertyName propertyName)
</ins><span class="cx"> {
</span><del>-    return view.wrap(state, globalObject);
</del><ins>+    return AtomicString(propertyName.uid() ? propertyName.uid() : propertyName.publicName());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, JSC::ArrayBuffer* buffer)
</del><ins>+template&lt;JSC::NativeFunction nativeFunction, int length&gt; JSC::EncodedJSValue nonCachingStaticFunctionGetter(JSC::ExecState* exec, JSC::EncodedJSValue, JSC::PropertyName propertyName)
</ins><span class="cx"> {
</span><del>-    if (!buffer)
-        return JSC::jsNull();
-    return toJS(state, globalObject, *buffer);
</del><ins>+    return JSC::JSValue::encode(JSC::JSFunction::create(exec-&gt;vm(), exec-&gt;lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline JSC::JSValue toJS(JSC::ExecState* state, JSC::JSGlobalObject* globalObject, JSC::ArrayBufferView* view)
-{
-    if (!view)
-        return JSC::jsNull();
-    return toJS(state, globalObject, *view);
-}
-
-template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Ref&lt;T&gt;&amp;&amp; ptr)
-{
-    return toJS(exec, globalObject, ptr.get());
-}
-
-template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, RefPtr&lt;T&gt;&amp;&amp; ptr)
-{
-    return toJS(exec, globalObject, ptr.get());
-}
-
</del><span class="cx"> template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector&lt;T&gt;&amp; vector)
</span><span class="cx"> {
</span><span class="cx">     JSC::VM&amp; vm = globalObject-&gt;vm();
</span><span class="lines">@@ -192,75 +87,4 @@
</span><span class="cx">     return array;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector&lt;RefPtr&lt;T&gt;&gt;&amp; vector)
-{
-    JSC::VM&amp; vm = globalObject-&gt;vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    JSC::JSArray* array = constructEmptyArray(exec, nullptr, vector.size());
-    RETURN_IF_EXCEPTION(scope, JSC::JSValue());
-    for (size_t i = 0; i &lt; vector.size(); ++i) {
-        array-&gt;putDirectIndex(exec, i, toJS(exec, globalObject, vector[i].get()));
-        RETURN_IF_EXCEPTION(scope, JSC::JSValue());
-    }
-    return array;
-}
-
-inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject*, const JSC::PrivateName&amp; privateName)
-{
-    return JSC::Symbol::create(exec-&gt;vm(), privateName.uid());
-}
-
-inline RefPtr&lt;JSC::ArrayBufferView&gt; toPossiblySharedArrayBufferView(JSC::VM&amp; vm, JSC::JSValue value)
-{
-    auto* wrapper = jsDynamicDowncast&lt;JSC::JSArrayBufferView*&gt;(vm, value);
-    if (!wrapper)
-        return nullptr;
-    return wrapper-&gt;possiblySharedImpl();
-}
-
-inline RefPtr&lt;JSC::ArrayBufferView&gt; toUnsharedArrayBufferView(JSC::VM&amp; vm, JSC::JSValue value)
-{
-    auto result = toPossiblySharedArrayBufferView(vm, value);
-    if (!result || result-&gt;isShared())
-        return nullptr;
-    return result;
-}
-
-inline RefPtr&lt;JSC::Int8Array&gt; toPossiblySharedInt8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int8Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Int16Array&gt; toPossiblySharedInt16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int16Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Int32Array&gt; toPossiblySharedInt32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint8Array&gt; toPossiblySharedUint8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint8Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint8ClampedArray&gt; toPossiblySharedUint8ClampedArray(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint8ClampedAdaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint16Array&gt; toPossiblySharedUint16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint16Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint32Array&gt; toPossiblySharedUint32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Float32Array&gt; toPossiblySharedFloat32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Float32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Float64Array&gt; toPossiblySharedFloat64Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Float64Adaptor&gt;(vm, value); }
-
-inline RefPtr&lt;JSC::Int8Array&gt; toUnsharedInt8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int8Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Int16Array&gt; toUnsharedInt16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int16Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Int32Array&gt; toUnsharedInt32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint8Array&gt; toUnsharedUint8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint8Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint8ClampedArray&gt; toUnsharedUint8ClampedArray(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint8ClampedAdaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint16Array&gt; toUnsharedUint16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint16Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Uint32Array&gt; toUnsharedUint32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Float32Array&gt; toUnsharedFloat32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Float32Adaptor&gt;(vm, value); }
-inline RefPtr&lt;JSC::Float64Array&gt; toUnsharedFloat64Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Float64Adaptor&gt;(vm, value); }
-
-inline String propertyNameToString(JSC::PropertyName propertyName)
-{
-    ASSERT(!propertyName.isSymbol());
-    return propertyName.uid() ? propertyName.uid() : propertyName.publicName();
-}
-
-inline AtomicString propertyNameToAtomicString(JSC::PropertyName propertyName)
-{
-    return AtomicString(propertyName.uid() ? propertyName.uid() : propertyName.publicName());
-}
-
-template&lt;JSC::NativeFunction nativeFunction, int length&gt; JSC::EncodedJSValue nonCachingStaticFunctionGetter(JSC::ExecState* exec, JSC::EncodedJSValue, JSC::PropertyName propertyName)
-{
-    return JSC::JSValue::encode(JSC::JSFunction::create(exec-&gt;vm(), exec-&gt;lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -25,1876 +25,25 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;BufferSource.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDLTypes.h&quot;
-#include &quot;JSDOMBinding.h&quot;
-#include &quot;JSDOMExceptionHandling.h&quot;
-#include &lt;runtime/JSGlobalObjectInlines.h&gt;
-#include &lt;runtime/JSONObject.h&gt;
-
-namespace WebCore {
-
-// Conversion from JSValue -&gt; Implementation
-template&lt;typename T&gt; struct Converter;
-
-enum class IntegerConversionConfiguration { Normal, EnforceRange, Clamp };
-enum class StringConversionConfiguration { Normal, TreatNullAsEmptyString };
-
-struct DefaultExceptionThrower {
-    void operator()(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope)
-    {
-        throwTypeError(&amp;state, scope);
-    }
-};
-
-template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSC::JSObject&amp;);
-template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSDOMGlobalObject&amp;);
-template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, IntegerConversionConfiguration);
-template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, StringConversionConfiguration);
-template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, ExceptionThrower&amp;&amp;);
-template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSC::JSObject&amp;, ExceptionThrower&amp;&amp;);
-template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSDOMGlobalObject&amp;, ExceptionThrower&amp;&amp;);
-
-// Specialized by generated code for IDL dictionary conversion.
-template&lt;typename T&gt; T convertDictionary(JSC::ExecState&amp;, JSC::JSValue);
-
-// Specialized by generated code for IDL enumeration conversion.
-template&lt;typename T&gt; std::optional&lt;T&gt; parseEnumeration(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;typename T&gt; T convertEnumeration(JSC::ExecState&amp;, JSC::JSValue);
-template&lt;typename T&gt; const char* expectedEnumerationValues();
-
-template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-{
-    return Converter&lt;T&gt;::convert(state, value);
-}
-
-template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
-{
-    return Converter&lt;T&gt;::convert(state, value, thisObject);
-}
-
-template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject)
-{
-    return Converter&lt;T&gt;::convert(state, value, globalObject);
-}
-
-template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
-{
-    return Converter&lt;T&gt;::convert(state, value, configuration);
-}
-
-template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration)
-{
-    return Converter&lt;T&gt;::convert(state, value, configuration);
-}
-
-template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower)
-{
-    return Converter&lt;T&gt;::convert(state, value, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-}
-
-template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject, ExceptionThrower&amp;&amp; exceptionThrower)
-{
-    return Converter&lt;T&gt;::convert(state, value, thisObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-}
-
-template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower)
-{
-    return Converter&lt;T&gt;::convert(state, value, globalObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-}
-
-// Conversion from Implementation -&gt; JSValue
-template&lt;typename T&gt; struct JSConverter;
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(U&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, U&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp;);
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
-
-// Specialized by generated code for IDL enumeration conversion.
-template&lt;typename T&gt; JSC::JSString* convertEnumerationToJS(JSC::ExecState&amp;, T);
-
-
-template&lt;typename T, bool needsState = JSConverter&lt;T&gt;::needsState, bool needsGlobalObject = JSConverter&lt;T&gt;::needsGlobalObject&gt;
-struct JSConverterOverloader;
-
-template&lt;typename T&gt;
-struct JSConverterOverloader&lt;T, true, true&gt; {
-    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        return JSConverter&lt;T&gt;::convert(state, globalObject, std::forward&lt;U&gt;(value));
-    }
-};
-
-template&lt;typename T&gt;
-struct JSConverterOverloader&lt;T, true, false&gt; {
-    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, U&amp;&amp; value)
-    {
-        return JSConverter&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
-    }
-
-    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp;, U&amp;&amp; value)
-    {
-        return JSConverter&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
-    }
-};
-
-template&lt;typename T&gt;
-struct JSConverterOverloader&lt;T, false, false&gt; {
-    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp;, U&amp;&amp; value)
-    {
-        return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
-    }
-
-    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp; value)
-    {
-        return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
-    }
-};
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(U&amp;&amp; value)
-{
-    return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, U&amp;&amp; value)
-{
-    return JSConverterOverloader&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-{
-    return JSConverterOverloader&lt;T&gt;::convert(state, globalObject, std::forward&lt;U&gt;(value));
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
-{
-    if (UNLIKELY(value.hasException())) {
-        propagateException(state, throwScope, value.releaseException());
-        return { };
-    }
-
-    return toJS&lt;T&gt;(state, value.releaseReturnValue());
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
-{
-    if (UNLIKELY(value.hasException())) {
-        propagateException(state, throwScope, value.releaseException());
-        return { };
-    }
-
-    return toJS&lt;T&gt;(state, globalObject, value.releaseReturnValue());
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-{
-    return JSConverter&lt;T&gt;::convertNewlyCreated(state, globalObject, std::forward&lt;U&gt;(value));
-}
-
-template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
-{
-    if (UNLIKELY(value.hasException())) {
-        propagateException(state, throwScope, value.releaseException());
-        return { };
-    }
-
-    return toJSNewlyCreated&lt;T&gt;(state, globalObject, value.releaseReturnValue());
-}
-
-
-template&lt;typename T&gt; struct DefaultConverter {
-    using ReturnType = typename T::ImplementationType;
-};
-
-// MARK: -
-// MARK: Any type
-
-template&lt;&gt; struct Converter&lt;IDLAny&gt; : DefaultConverter&lt;IDLAny&gt; {
-    using ReturnType = JSC::JSValue;
-    
-    static JSC::JSValue convert(JSC::ExecState&amp;, JSC::JSValue value)
-    {
-        return value;
-    }
-
-    static JSC::JSValue convert(const JSC::Strong&lt;JSC::Unknown&gt;&amp; value)
-    {
-        return value.get();
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLAny&gt; {
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(const JSC::JSValue&amp; value)
-    {
-        return value;
-    }
-
-    static JSC::JSValue convert(const JSC::Strong&lt;JSC::Unknown&gt;&amp; value)
-    {
-        return value.get();
-    }
-};
-
-// MARK: -
-// MARK: Nullable type
-
-namespace Detail {
-    template&lt;typename IDLType&gt;
-    struct NullableConversionType;
-
-    template&lt;typename IDLType&gt; 
-    struct NullableConversionType {
-        using Type = typename IDLNullable&lt;IDLType&gt;::ImplementationType;
-    };
-
-    template&lt;typename T&gt;
-    struct NullableConversionType&lt;IDLInterface&lt;T&gt;&gt; {
-        using Type = typename Converter&lt;IDLInterface&lt;T&gt;&gt;::ReturnType;
-    };
-
-    template&lt;&gt;
-    struct NullableConversionType&lt;IDLAny&gt; {
-        using Type = typename Converter&lt;IDLAny&gt;::ReturnType;
-    };
-}
-
-template&lt;typename T&gt; struct Converter&lt;IDLNullable&lt;T&gt;&gt; : DefaultConverter&lt;IDLNullable&lt;T&gt;&gt; {
-    using ReturnType = typename Detail::NullableConversionType&lt;T&gt;::Type;
-    
-    // 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.
-    //
-    // 2. Otherwise, if V is null or undefined, then return the IDL nullable type T? value null.
-    // 3. Otherwise, return the result of converting V using the rules for the inner IDL type T.
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value);
-    }
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, thisObject);
-    }
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, globalObject);
-    }
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, configuration);
-    }
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, configuration);
-    }
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-    }
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject, ExceptionThrower&amp;&amp; exceptionThrower)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, thisObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-    }
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower)
-    {
-        if (value.isUndefinedOrNull())
-            return T::nullValue();
-        return Converter&lt;T&gt;::convert(state, value, globalObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLNullable&lt;T&gt;&gt; {
-    using ImplementationType = typename IDLNullable&lt;T&gt;::ImplementationType;
-
-    static constexpr bool needsState = JSConverter&lt;T&gt;::needsState;
-    static constexpr bool needsGlobalObject = JSConverter&lt;T&gt;::needsGlobalObject;
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convert(U&amp;&amp; value)
-    {
-        if (T::isNullValue(value))
-            return JSC::jsNull();
-        return JSConverter&lt;T&gt;::convert(T::extractValueFromNullable(value));
-    }
-    template&lt;typename U&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, U&amp;&amp; value)
-    {
-        if (T::isNullValue(value))
-            return JSC::jsNull();
-        return JSConverter&lt;T&gt;::convert(state, T::extractValueFromNullable(value));
-    }
-    template&lt;typename U&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        if (T::isNullValue(value))
-            return JSC::jsNull();
-        return JSConverter&lt;T&gt;::convert(state, globalObject, T::extractValueFromNullable(value));
-    }
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        if (T::isNullValue(value))
-            return JSC::jsNull();
-        return JSConverter&lt;T&gt;::convert(state, globalObject, T::extractValueFromNullable(value));
-    }
-};
-
-// MARK: -
-// MARK: Null type
-
-template&lt;&gt; struct Converter&lt;IDLNull&gt; : DefaultConverter&lt;IDLNull&gt; {
-    static std::nullptr_t convert(JSC::ExecState&amp;, JSC::JSValue)
-    {
-        return nullptr;
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLNull&gt; {
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(std::nullptr_t)
-    {
-        return JSC::jsNull();
-    }
-};
-
-// MARK: -
-// MARK: Boolean type
-
-template&lt;&gt; struct Converter&lt;IDLBoolean&gt; : DefaultConverter&lt;IDLBoolean&gt; {
-    static bool convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return value.toBoolean(&amp;state);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLBoolean&gt; {
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(bool value)
-    {
-        return JSC::jsBoolean(value);
-    }
-};
-
-// ArrayBuffer support.
-template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;JSC::ArrayBuffer&gt; {
-    using WrapperClass = JSC::JSArrayBuffer;
-    using ToWrappedReturnType = JSC::ArrayBuffer*;
-};
-
-// ArrayBufferView support.
-template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;JSC::ArrayBufferView&gt; {
-    using WrapperClass = JSC::JSArrayBufferView;
-    using ToWrappedReturnType = RefPtr&lt;ArrayBufferView&gt;;
-};
-
-// Typed arrays support.
-template&lt;typename Adaptor&gt; struct JSDOMWrapperConverterTraits&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt; {
-    using WrapperClass = JSC::JSGenericTypedArrayView&lt;Adaptor&gt;;
-    using ToWrappedReturnType = RefPtr&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;;
-};
-
-// MARK: -
-// MARK: Interface type
-
-template&lt;typename T&gt; struct Converter&lt;IDLInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLInterface&lt;T&gt;&gt; {
-    using ReturnType = typename JSDOMWrapperConverterTraits&lt;T&gt;::ToWrappedReturnType;
-    using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
-
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-        ReturnType object = WrapperType::toWrapped(vm, value);
-        if (UNLIKELY(!object))
-            exceptionThrower(state, scope);
-        return object;
-    }
-};
-
-namespace Detail {
-
-template &lt;typename T&gt; inline T* getPtrOrRef(const T* p) { return const_cast&lt;T*&gt;(p); }
-template &lt;typename T&gt; inline T&amp; getPtrOrRef(const T&amp; p) { return const_cast&lt;T&amp;&gt;(p); }
-template &lt;typename T&gt; inline T* getPtrOrRef(const RefPtr&lt;T&gt;&amp; p) { return p.get(); }
-template &lt;typename T&gt; inline T&amp; getPtrOrRef(const Ref&lt;T&gt;&amp; p) { return p.get(); }
-
-}
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLInterface&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template &lt;typename U&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const U&amp; value)
-    {
-        return toJS(&amp;state, &amp;globalObject, Detail::getPtrOrRef(value));
-    }
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        return toJSNewlyCreated(&amp;state, &amp;globalObject, std::forward&lt;U&gt;(value));
-    }
-};
-
-// MARK: -
-// MARK: Integer types
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toInt8EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toInt8Clamp(state, value);
-        }
-        return toInt8(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLByte&gt; {
-    using Type = typename IDLByte::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toUInt8EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toUInt8Clamp(state, value);
-        }
-        return toUInt8(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLOctet&gt; {
-    using Type = typename IDLOctet::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toInt16EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toInt16Clamp(state, value);
-        }
-        return toInt16(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLShort&gt; {
-    using Type = typename IDLShort::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toUInt16EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toUInt16Clamp(state, value);
-        }
-        return toUInt16(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUnsignedShort&gt; {
-    using Type = typename IDLUnsignedShort::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLLong&gt; : DefaultConverter&lt;IDLLong&gt; {
-    static inline int32_t convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
-    {
-        return JSC::toInt32(number);
-    }
-
-    static int32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toInt32EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toInt32Clamp(state, value);
-        }
-        return value.toInt32(&amp;state);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLLong&gt; {
-    using Type = typename IDLLong::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toUInt32EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toUInt32Clamp(state, value);
-        }
-        return value.toUInt32(&amp;state);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUnsignedLong&gt; {
-    using Type = typename IDLUnsignedLong::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        if (value.isInt32())
-            return value.asInt32();
-
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toInt64EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toInt64Clamp(state, value);
-        }
-        return toInt64(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLLongLong&gt; {
-    using Type = typename IDLLongLong::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-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 = IntegerConversionConfiguration::Normal)
-    {
-        if (value.isUInt32())
-            return value.asUInt32();
-
-        switch (configuration) {
-        case IntegerConversionConfiguration::Normal:
-            break;
-        case IntegerConversionConfiguration::EnforceRange:
-            return toUInt64EnforceRange(state, value);
-        case IntegerConversionConfiguration::Clamp:
-            return toUInt64Clamp(state, value);
-        }
-        return toUInt64(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUnsignedLongLong&gt; {
-    using Type = typename IDLUnsignedLongLong::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-// MARK: -
-// MARK: Floating point types
-
-template&lt;&gt; struct Converter&lt;IDLFloat&gt; : DefaultConverter&lt;IDLFloat&gt; {
-
-    static inline float convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
-    {
-        if (UNLIKELY(!std::isfinite(number)))
-            throwNonFiniteTypeError(state, scope);
-        return static_cast&lt;float&gt;(number);
-    }
-
-    static float 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 static_cast&lt;float&gt;(number);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLFloat&gt; {
-    using Type = typename IDLFloat::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLUnrestrictedFloat&gt; : DefaultConverter&lt;IDLUnrestrictedFloat&gt; {
-    static inline float convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
-    {
-        return static_cast&lt;float&gt;(number);
-    }
-
-    static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return static_cast&lt;float&gt;(value.toNumber(&amp;state));
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUnrestrictedFloat&gt; {
-    using Type = typename IDLUnrestrictedFloat::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLDouble&gt; : DefaultConverter&lt;IDLDouble&gt; {
-    static inline double convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
-    {
-        if (UNLIKELY(!std::isfinite(number)))
-            throwNonFiniteTypeError(state, scope);
-        return number;
-    }
-
-    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 JSConverter&lt;IDLDouble&gt; {
-    using Type = typename IDLDouble::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLUnrestrictedDouble&gt; : DefaultConverter&lt;IDLUnrestrictedDouble&gt; {
-    static inline double convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
-    {
-        return number;
-    }
-
-    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return value.toNumber(&amp;state);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUnrestrictedDouble&gt; {
-    using Type = typename IDLUnrestrictedDouble::ImplementationType;
-
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(Type value)
-    {
-        return JSC::jsNumber(value);
-    }
-
-    // Add overload for MediaTime.
-    static JSC::JSValue convert(MediaTime value)
-    {
-        return JSC::jsNumber(value.toDouble());
-    }
-};
-
-// 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, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
-    {
-        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
-            return emptyString();
-        return value.toWTFString(&amp;state);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLDOMString&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
-    {
-        return JSC::jsStringWithCache(&amp;state, value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLByteString&gt; : DefaultConverter&lt;IDLByteString&gt; {
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
-    {
-        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
-            return emptyString();
-        return valueToByteString(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLByteString&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
-    {
-        return JSC::jsStringWithCache(&amp;state, value);
-    }
-};
-
-template&lt;&gt; struct Converter&lt;IDLUSVString&gt; : DefaultConverter&lt;IDLUSVString&gt; {
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
-    {
-        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
-            return emptyString();
-        return valueToUSVString(state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLUSVString&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
-    {
-        return JSC::jsStringWithCache(&amp;state, value);
-    }
-};
-
-// MARK: -
-// MARK: Object type
-
-template&lt;&gt; struct Converter&lt;IDLObject&gt; : DefaultConverter&lt;IDLObject&gt; {
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static JSC::Strong&lt;JSC::JSObject&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        if (!value.isObject()) {
-            exceptionThrower(state, scope);
-            return { };
-        }
-        
-        return { vm, JSC::asObject(value) };
-    }
-};
-
-// MARK: -
-// MARK: Array-like types
-
-namespace Detail {
-    template&lt;typename IDLType&gt;
-    struct GenericSequenceConverter {
-        using ReturnType = Vector&lt;typename IDLType::ImplementationType&gt;;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSObject* jsObject)
-        {
-            ReturnType result;
-            forEachInIterable(&amp;state, jsObject, [&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;
-        }
-    };
-
-    // Specialization for numeric types
-    // FIXME: This is only implemented for the IDLFloatingPointTypes and IDLLong. To add
-    // support for more numeric types, add an overload of Converter&lt;IDLType&gt;::convert that
-    // takes an ExecState, ThrowScope, double as its arguments.
-    template&lt;typename IDLType&gt;
-    struct NumericSequenceConverter {
-        using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
-        using ReturnType = typename GenericConverter::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 { };
-            }
-
-            JSC::JSObject* object = JSC::asObject(value);
-            if (!JSC::isJSArray(object))
-                return GenericConverter::convert(state, object);
-
-            JSC::JSArray* array = JSC::asArray(object);
-            if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
-                return GenericConverter::convert(state, object);
-
-            unsigned length = array-&gt;length();
-
-            ReturnType result;
-            if (!result.tryReserveCapacity(length)) {
-                // FIXME: Is the right exception to throw?
-                throwTypeError(&amp;state, scope);
-                return { };
-            }
-
-            JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
-
-            if (indexingType == JSC::ContiguousShape) {
-                for (unsigned i = 0; i &lt; length; i++) {
-                    auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
-                    if (!indexValue)
-                        result.uncheckedAppend(0);
-                    else {
-                        auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
-                        RETURN_IF_EXCEPTION(scope, { });
-
-                        result.uncheckedAppend(convertedValue);
-                    }
-                }
-                return result;
-            }
-            
-            if (indexingType == JSC::Int32Shape) {
-                for (unsigned i = 0; i &lt; length; i++) {
-                    auto indexValue = array-&gt;butterfly()-&gt;contiguousInt32()[i].get();
-                    ASSERT(!indexValue || indexValue.isInt32());
-                    if (!indexValue)
-                        result.uncheckedAppend(0);
-                    else
-                        result.uncheckedAppend(indexValue.asInt32());
-                }
-                return result;
-            }
-
-            if (indexingType == JSC::DoubleShape) {
-                for (unsigned i = 0; i &lt; length; i++) {
-                    auto doubleValue = array-&gt;butterfly()-&gt;contiguousDouble()[i];
-                    if (std::isnan(doubleValue))
-                        result.uncheckedAppend(0);
-                    else {
-                        auto convertedValue = Converter&lt;IDLType&gt;::convert(state, scope, doubleValue);
-                        RETURN_IF_EXCEPTION(scope, { });
-
-                        result.uncheckedAppend(convertedValue);
-                    }
-                }
-                return result;
-            }
-
-            for (unsigned i = 0; i &lt; length; i++) {
-                auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
-                RETURN_IF_EXCEPTION(scope, { });
-                
-                if (!indexValue)
-                    result.uncheckedAppend(0);
-                else {
-                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
-                    RETURN_IF_EXCEPTION(scope, { });
-                    
-                    result.uncheckedAppend(convertedValue);
-                }
-            }
-            return result;
-        }
-    };
-
-    template&lt;typename IDLType&gt;
-    struct SequenceConverter {
-        using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
-        using ReturnType = typename GenericConverter::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 { };
-            }
-
-            JSC::JSObject* object = JSC::asObject(value);
-            if (!JSC::isJSArray(object))
-                return GenericConverter::convert(state, object);
-
-            JSC::JSArray* array = JSC::asArray(object);
-            if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
-                return GenericConverter::convert(state, object);
-
-            unsigned length = array-&gt;length();
-
-            ReturnType result;
-            if (!result.tryReserveCapacity(length)) {
-                // FIXME: Is the right exception to throw?
-                throwTypeError(&amp;state, scope);
-                return { };
-            }
-
-            JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
-
-            if (indexingType == JSC::ContiguousShape) {
-                for (unsigned i = 0; i &lt; length; i++) {
-                    auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
-                    if (!indexValue)
-                        indexValue = JSC::jsUndefined();
-
-                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
-                    RETURN_IF_EXCEPTION(scope, { });
-
-                    result.uncheckedAppend(convertedValue);
-                }
-                return result;
-            }
-
-            for (unsigned i = 0; i &lt; length; i++) {
-                auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
-                RETURN_IF_EXCEPTION(scope, { });
-
-                if (!indexValue)
-                    indexValue = JSC::jsUndefined();
-
-                auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
-                RETURN_IF_EXCEPTION(scope, { });
-                
-                result.uncheckedAppend(convertedValue);
-            }
-            return result;
-        }
-    };
-
-    template&lt;&gt;
-    struct SequenceConverter&lt;IDLLong&gt; {
-        using ReturnType = typename GenericSequenceConverter&lt;IDLLong&gt;::ReturnType;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            return NumericSequenceConverter&lt;IDLLong&gt;::convert(state, value);
-        }
-    };
-
-    template&lt;&gt;
-    struct SequenceConverter&lt;IDLFloat&gt; {
-        using ReturnType = typename GenericSequenceConverter&lt;IDLFloat&gt;::ReturnType;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            return NumericSequenceConverter&lt;IDLFloat&gt;::convert(state, value);
-        }
-    };
-
-    template&lt;&gt;
-    struct SequenceConverter&lt;IDLUnrestrictedFloat&gt; {
-        using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::ReturnType;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            return NumericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::convert(state, value);
-        }
-    };
-
-    template&lt;&gt;
-    struct SequenceConverter&lt;IDLDouble&gt; {
-        using ReturnType = typename GenericSequenceConverter&lt;IDLDouble&gt;::ReturnType;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            return NumericSequenceConverter&lt;IDLDouble&gt;::convert(state, value);
-        }
-    };
-
-    template&lt;&gt;
-    struct SequenceConverter&lt;IDLUnrestrictedDouble&gt; {
-        using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::ReturnType;
-
-        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            return NumericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::convert(state, value);
-        }
-    };
-}
-
-template&lt;typename T&gt; struct Converter&lt;IDLSequence&lt;T&gt;&gt; : DefaultConverter&lt;IDLSequence&lt;T&gt;&gt; {
-    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLSequence&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template&lt;typename U, size_t inlineCapacity&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; exec, JSDOMGlobalObject&amp; globalObject, const Vector&lt;U, inlineCapacity&gt;&amp; vector)
-    {
-        JSC::MarkedArgumentBuffer list;
-        for (auto&amp; element : vector)
-            list.append(toJS&lt;T&gt;(exec, globalObject, element));
-        return JSC::constructArray(&amp;exec, nullptr, &amp;globalObject, list);
-    }
-};
-
-template&lt;typename T&gt; struct Converter&lt;IDLFrozenArray&lt;T&gt;&gt; : DefaultConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
-    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template&lt;typename U, size_t inlineCapacity&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; exec, JSDOMGlobalObject&amp; globalObject, const Vector&lt;U, inlineCapacity&gt;&amp; vector)
-    {
-        JSC::MarkedArgumentBuffer list;
-        for (auto&amp; element : vector)
-            list.append(toJS&lt;T&gt;(exec, globalObject, element));
-        auto* array = JSC::constructArray(&amp;exec, nullptr, &amp;globalObject, list);
-        return JSC::objectConstructorFreeze(&amp;exec, array);
-    }
-};
-
-// MARK: -
-// MARK: Record type
-
-namespace Detail {
-    template&lt;typename IDLStringType&gt;
-    struct IdentifierConverter;
-
-    template&lt;&gt; struct IdentifierConverter&lt;IDLDOMString&gt; {
-        static String convert(JSC::ExecState&amp;, const JSC::Identifier&amp; identifier)
-        {
-            return identifier.string();
-        }
-    };
-
-    template&lt;&gt; struct IdentifierConverter&lt;IDLByteString&gt; {
-        static String convert(JSC::ExecState&amp; state, const JSC::Identifier&amp; identifier)
-        {
-            return identifierToByteString(state, identifier);
-        }
-    };
-
-    template&lt;&gt; struct IdentifierConverter&lt;IDLUSVString&gt; {
-        static String convert(JSC::ExecState&amp; state, const JSC::Identifier&amp; identifier)
-        {
-            return identifierToUSVString(state, identifier);
-        }
-    };
-}
-
-template&lt;typename K, typename V&gt; struct Converter&lt;IDLRecord&lt;K, V&gt;&gt; : DefaultConverter&lt;IDLRecord&lt;K, V&gt;&gt; {
-    using ReturnType = typename IDLRecord&lt;K, V&gt;::ImplementationType;
-    using KeyType = typename K::ImplementationType;
-    using ValueType = typename V::ImplementationType;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        auto&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        // 1. Let result be a new empty instance of record&lt;K, V&gt;.
-        // 2. If Type(O) is Undefined or Null, return result.
-        if (value.isUndefinedOrNull())
-            return { };
-        
-        // 3. If Type(O) is not Object, throw a TypeError.
-        if (!value.isObject()) {
-            throwTypeError(&amp;state, scope);
-            return { };
-        }
-        
-        JSC::JSObject* object = JSC::asObject(value);
-    
-        ReturnType result;
-    
-        // 4. Let keys be ? O.[[OwnPropertyKeys]]().
-        JSC::PropertyNameArray keys(&amp;vm, JSC::PropertyNameMode::Strings);
-        object-&gt;getOwnPropertyNames(object, &amp;state, keys, JSC::EnumerationMode());
-        RETURN_IF_EXCEPTION(scope, { });
-
-        // 5. Repeat, for each element key of keys in List order:
-        for (auto&amp; key : keys) {
-            // 1. Let desc be ? O.[[GetOwnProperty]](key).
-            JSC::PropertyDescriptor descriptor;
-            bool didGetDescriptor = object-&gt;getOwnPropertyDescriptor(&amp;state, key, descriptor);
-            RETURN_IF_EXCEPTION(scope, { });
-
-            if (!didGetDescriptor)
-                continue;
-
-            // 2. If desc is not undefined and desc.[[Enumerable]] is true:
-            
-            // FIXME: Do we need to check for enumerable / undefined, or is this handled by the default
-            // enumeration mode?
-
-            if (!descriptor.value().isUndefined() &amp;&amp; descriptor.enumerable()) {
-                // 1. Let typedKey be key converted to an IDL value of type K.
-                auto typedKey = Detail::IdentifierConverter&lt;K&gt;::convert(state, key);
-
-                // 2. Let value be ? Get(O, key).
-                auto subValue = object-&gt;get(&amp;state, key);
-                RETURN_IF_EXCEPTION(scope, { });
-
-                // 3. Let typedValue be value converted to an IDL value of type V.
-                auto typedValue = Converter&lt;V&gt;::convert(state, subValue);
-                RETURN_IF_EXCEPTION(scope, { });
-                
-                // 4. If typedKey is already a key in result, set its value to typedValue.
-                // Note: This can happen when O is a proxy object.
-                // FIXME: Handle this case.
-                
-                // 5. Otherwise, append to result a mapping (typedKey, typedValue).
-                result.append({ typedKey, typedValue });
-            }
-        }
-
-        // 6. Return result.
-        return result;
-    }
-};
-
-template&lt;typename K, typename V&gt; struct JSConverter&lt;IDLRecord&lt;K, V&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template&lt;typename MapType&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const MapType&amp; map)
-    {
-        auto&amp; vm = state.vm();
-    
-        // 1. Let result be ! ObjectCreate(%ObjectPrototype%).
-        auto result = constructEmptyObject(&amp;state);
-        
-        // 2. Repeat, for each mapping (key, value) in D:
-        for (const auto&amp; keyValuePair : map) {
-            // 1. Let esKey be key converted to an ECMAScript value.
-            // Note, this step is not required, as we need the key to be
-            // an Identifier, not a JSValue.
-
-            // 2. Let esValue be value converted to an ECMAScript value.
-            auto esValue = toJS&lt;V&gt;(state, globalObject, keyValuePair.value);
-
-            // 3. Let created be ! CreateDataProperty(result, esKey, esValue).
-            bool created = result-&gt;putDirect(vm, JSC::Identifier::fromString(&amp;vm, keyValuePair.key), esValue);
-
-            // 4. Assert: created is true.
-            ASSERT_UNUSED(created, created);
-        }
-
-        // 3. Return result.
-        return result;
-    }
-};
-
-// 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 = T;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return convertDictionary&lt;T&gt;(state, value);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLDictionary&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const T&amp; dictionary)
-    {
-        return convertDictionaryToJS(state, globalObject, dictionary);
-    }
-};
-
-// 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);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLEnumeration&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; exec, T value)
-    {
-        return convertEnumerationToJS(exec, value);
-    }
-};
-
-// MARK: -
-// MARK: Callback function type
-
-template&lt;typename T&gt; struct Converter&lt;IDLCallbackFunction&lt;T&gt;&gt; : DefaultConverter&lt;IDLCallbackFunction&lt;T&gt;&gt; {
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        if (!value.isFunction()) {
-            exceptionThrower(state, scope);
-            return nullptr;
-        }
-        
-        return T::create(JSC::asObject(value), &amp;globalObject);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLCallbackFunction&lt;T&gt;&gt; {
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    template &lt;typename U&gt;
-    static JSC::JSValue convert(const U&amp; value)
-    {
-        return toJS(Detail::getPtrOrRef(value));
-    }
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convertNewlyCreated(U&amp;&amp; value)
-    {
-        return toJSNewlyCreated(std::forward&lt;U&gt;(value));
-    }
-};
-
-// MARK: -
-// MARK: Callback interface type
-
-template&lt;typename T&gt; struct Converter&lt;IDLCallbackInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLCallbackInterface&lt;T&gt;&gt; {
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        if (!value.isObject()) {
-            exceptionThrower(state, scope);
-            return nullptr;
-        }
-
-        return T::create(JSC::asObject(value), &amp;globalObject);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLCallbackInterface&lt;T&gt;&gt; {
-    static constexpr bool needsState = false;
-    static constexpr bool needsGlobalObject = false;
-
-    template &lt;typename U&gt;
-    static JSC::JSValue convert(const U&amp; value)
-    {
-        return toJS(Detail::getPtrOrRef(value));
-    }
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convertNewlyCreated(U&amp;&amp; value)
-    {
-        return toJSNewlyCreated(std::forward&lt;U&gt;(value));
-    }
-};
-
-// MARK: -
-// MARK: Union type
-
-template&lt;typename ReturnType, typename T, bool enabled&gt;
-struct ConditionalConverter;
-
-template&lt;typename ReturnType, typename T&gt;
-struct ConditionalConverter&lt;ReturnType, T, true&gt; {
-    static std::optional&lt;ReturnType&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return ReturnType(Converter&lt;T&gt;::convert(state, value));
-    }
-};
-
-template&lt;typename ReturnType, typename T&gt;
-struct ConditionalConverter&lt;ReturnType, T, false&gt; {
-    static std::optional&lt;ReturnType&gt; convert(JSC::ExecState&amp;, JSC::JSValue)
-    {
-        return std::nullopt;
-    }
-};
-
-namespace Detail {
-    template&lt;typename List, bool condition&gt;
-    struct ConditionalFront;
-
-    template&lt;typename List&gt;
-    struct ConditionalFront&lt;List, true&gt;
-    {
-        using type = brigand::front&lt;List&gt;;
-    };
-
-    template&lt;typename List&gt;
-    struct ConditionalFront&lt;List, false&gt;
-    {
-        using type = void;
-    };
-}
-
-template&lt;typename List, bool condition&gt;
-using ConditionalFront = typename Detail::ConditionalFront&lt;List, condition&gt;::type;
-
-template&lt;typename... T&gt; struct Converter&lt;IDLUnion&lt;T...&gt;&gt; : DefaultConverter&lt;IDLUnion&lt;T...&gt;&gt; {
-    using Type = IDLUnion&lt;T...&gt;;
-    using TypeList = typename Type::TypeList;
-    using ReturnType = typename Type::ImplementationType;
-
-    using NumericTypeList = brigand::filter&lt;TypeList, IsIDLNumber&lt;brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfNumericTypes = brigand::size&lt;NumericTypeList&gt;::value;
-    static_assert(numberOfNumericTypes == 0 || numberOfNumericTypes == 1, &quot;There can be 0 or 1 numeric types in an IDLUnion.&quot;);
-    using NumericType = ConditionalFront&lt;NumericTypeList, numberOfNumericTypes != 0&gt;;
-
-    // FIXME: This should also check for IDLEnumeration&lt;T&gt;.
-    using StringTypeList = brigand::filter&lt;TypeList, std::is_base_of&lt;IDLString, brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfStringTypes = brigand::size&lt;StringTypeList&gt;::value;
-    static_assert(numberOfStringTypes == 0 || numberOfStringTypes == 1, &quot;There can be 0 or 1 string types in an IDLUnion.&quot;);
-    using StringType = ConditionalFront&lt;StringTypeList, numberOfStringTypes != 0&gt;;
-
-    using SequenceTypeList = brigand::filter&lt;TypeList, IsIDLSequence&lt;brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfSequenceTypes = brigand::size&lt;SequenceTypeList&gt;::value;
-    static_assert(numberOfSequenceTypes == 0 || numberOfSequenceTypes == 1, &quot;There can be 0 or 1 sequence types in an IDLUnion.&quot;);
-    using SequenceType = ConditionalFront&lt;SequenceTypeList, numberOfSequenceTypes != 0&gt;;
-
-    using FrozenArrayTypeList = brigand::filter&lt;TypeList, IsIDLFrozenArray&lt;brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfFrozenArrayTypes = brigand::size&lt;FrozenArrayTypeList&gt;::value;
-    static_assert(numberOfFrozenArrayTypes == 0 || numberOfFrozenArrayTypes == 1, &quot;There can be 0 or 1 FrozenArray types in an IDLUnion.&quot;);
-    using FrozenArrayType = ConditionalFront&lt;FrozenArrayTypeList, numberOfFrozenArrayTypes != 0&gt;;
-
-    using DictionaryTypeList = brigand::filter&lt;TypeList, IsIDLDictionary&lt;brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfDictionaryTypes = brigand::size&lt;DictionaryTypeList&gt;::value;
-    static_assert(numberOfDictionaryTypes == 0 || numberOfDictionaryTypes == 1, &quot;There can be 0 or 1 dictionary types in an IDLUnion.&quot;);
-    static constexpr bool hasDictionaryType = numberOfDictionaryTypes != 0;
-    using DictionaryType = ConditionalFront&lt;DictionaryTypeList, hasDictionaryType&gt;;
-
-    using RecordTypeList = brigand::filter&lt;TypeList, IsIDLRecord&lt;brigand::_1&gt;&gt;;
-    static constexpr size_t numberOfRecordTypes = brigand::size&lt;RecordTypeList&gt;::value;
-    static_assert(numberOfRecordTypes == 0 || numberOfRecordTypes == 1, &quot;There can be 0 or 1 record types in an IDLUnion.&quot;);
-    static constexpr bool hasRecordType = numberOfRecordTypes != 0;
-    using RecordType = ConditionalFront&lt;RecordTypeList, hasRecordType&gt;;
-
-    static constexpr bool hasObjectType = (numberOfSequenceTypes + numberOfFrozenArrayTypes + numberOfDictionaryTypes + numberOfRecordTypes) &gt; 0;
-
-    using InterfaceTypeList = brigand::filter&lt;TypeList, IsIDLInterface&lt;brigand::_1&gt;&gt;;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        // 1. If the union type includes a nullable type and V is null or undefined, then return the IDL value null.
-        constexpr bool hasNullType = brigand::any&lt;TypeList, std::is_same&lt;IDLNull, brigand::_1&gt;&gt;::value;
-        if (hasNullType) {
-            if (value.isUndefinedOrNull())
-                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLNull, hasNullType&gt;::convert(state, value).value());
-        }
-        
-        // 2. Let types be the flattened member types of the union type.
-        // NOTE: Union is expected to be pre-flattented.
-        
-        // 3. If V is null or undefined then:
-        if (hasDictionaryType || hasRecordType) {
-            if (value.isUndefinedOrNull()) {
-                //     1. If types includes a dictionary type, then return the result of converting V to that dictionary type.
-                if (hasDictionaryType)
-                    return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, DictionaryType, hasDictionaryType&gt;::convert(state, value).value());
-                
-                //     2. If types includes a record type, then return the result of converting V to that record type.
-                if (hasRecordType)
-                    return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, RecordType, hasRecordType&gt;::convert(state, value).value());
-            }
-        }
-
-        // 4. If V is a platform object, then:
-        //     1. If types includes an interface type that V implements, then return the IDL value that is a reference to the object V.
-        //     2. If types includes object, then return the IDL value that is a reference to the object V.
-        //         (FIXME: Add support for object and step 4.2)
-        if (brigand::any&lt;TypeList, IsIDLInterface&lt;brigand::_1&gt;&gt;::value) {
-            std::optional&lt;ReturnType&gt; returnValue;
-            brigand::for_each&lt;InterfaceTypeList&gt;([&amp;](auto&amp;&amp; type) {
-                if (returnValue)
-                    return;
-                
-                using Type = typename WTF::RemoveCVAndReference&lt;decltype(type)&gt;::type::type;
-                using ImplementationType = typename Type::ImplementationType;
-                using RawType = typename Type::RawType;
-                using WrapperType = typename JSDOMWrapperConverterTraits&lt;RawType&gt;::WrapperClass;
-
-                auto castedValue = WrapperType::toWrapped(vm, value);
-                if (!castedValue)
-                    return;
-                
-                returnValue = ReturnType(ImplementationType(castedValue));
-            });
-
-            if (returnValue)
-                return WTFMove(returnValue.value());
-        }
-        
-        // FIXME: Add support for steps 5 - 10.
-
-        // 11. If V is any kind of object, then:
-        if (hasObjectType) {
-            if (value.isCell()) {
-                JSC::JSCell* cell = value.asCell();
-                if (cell-&gt;isObject()) {
-                    // FIXME: We should be able to optimize the following code by making use
-                    // of the fact that we have proved that the value is an object. 
-                
-                    //     1. If types includes a sequence type, then:
-                    //         1. Let method be the result of GetMethod(V, @@iterator).
-                    //         2. ReturnIfAbrupt(method).
-                    //         3. If method is not undefined, return the result of creating a
-                    //            sequence of that type from V and method.        
-                    constexpr bool hasSequenceType = numberOfSequenceTypes != 0;
-                    if (hasSequenceType) {
-                        bool hasIterator = hasIteratorMethod(state, value);
-                        RETURN_IF_EXCEPTION(scope, ReturnType());
-                        if (hasIterator)
-                            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, SequenceType, hasSequenceType&gt;::convert(state, value).value());
-                    }
-
-                    //     2. If types includes a frozen array type, then:
-                    //         1. Let method be the result of GetMethod(V, @@iterator).
-                    //         2. ReturnIfAbrupt(method).
-                    //         3. If method is not undefined, return the result of creating a
-                    //            frozen array of that type from V and method.
-                    constexpr bool hasFrozenArrayType = numberOfFrozenArrayTypes != 0;
-                    if (hasFrozenArrayType) {
-                        bool hasIterator = hasIteratorMethod(state, value);
-                        RETURN_IF_EXCEPTION(scope, ReturnType());
-                        if (hasIterator)
-                            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, FrozenArrayType, hasFrozenArrayType&gt;::convert(state, value).value());
-                    }
-
-                    //     3. If types includes a dictionary type, then return the result of
-                    //        converting V to that dictionary type.
-                    if (hasDictionaryType)
-                        return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, DictionaryType, hasDictionaryType&gt;::convert(state, value).value());
-
-                    //     4. If types includes a record type, then return the result of converting V to that record type.
-                    if (hasRecordType)
-                        return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, RecordType, hasRecordType&gt;::convert(state, value).value());
-
-                    //     5. If types includes a callback interface type, then return the result of converting V to that interface type.
-                    //         (FIXME: Add support for callback interface type and step 12.5)
-                    //     6. If types includes object, then return the IDL value that is a reference to the object V.
-                    //         (FIXME: Add support for object and step 12.6)
-                }
-            }
-        }
-
-        // 12. If V is a Boolean value, then:
-        //     1. If types includes a boolean, then return the result of converting V to boolean.
-        constexpr bool hasBooleanType = brigand::any&lt;TypeList, std::is_same&lt;IDLBoolean, brigand::_1&gt;&gt;::value;
-        if (hasBooleanType) {
-            if (value.isBoolean())
-                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLBoolean, hasBooleanType&gt;::convert(state, value).value());
-        }
-        
-        // 13. If V is a Number value, then:
-        //     1. If types includes a numeric type, then return the result of converting V to that numeric type.
-        constexpr bool hasNumericType = brigand::size&lt;NumericTypeList&gt;::value != 0;
-        if (hasNumericType) {
-            if (value.isNumber())
-                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, NumericType, hasNumericType&gt;::convert(state, value).value());
-        }
-        
-        // 14. If types includes a string type, then return the result of converting V to that type.
-        constexpr bool hasStringType = brigand::size&lt;StringTypeList&gt;::value != 0;
-        if (hasStringType)
-            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, StringType, hasStringType&gt;::convert(state, value).value());
-
-        // 15. If types includes a numeric type, then return the result of converting V to that numeric type.
-        if (hasNumericType)
-            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, NumericType, hasNumericType&gt;::convert(state, value).value());
-
-        // 16. If types includes a boolean, then return the result of converting V to boolean.
-        if (hasBooleanType)
-            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLBoolean, hasBooleanType&gt;::convert(state, value).value());
-
-        // 17. Throw a TypeError.
-        throwTypeError(&amp;state, scope);
-        return ReturnType();
-    }
-};
-
-template&lt;typename... T&gt; struct JSConverter&lt;IDLUnion&lt;T...&gt;&gt; {
-    using Type = IDLUnion&lt;T...&gt;;
-    using TypeList = typename Type::TypeList;
-    using ImplementationType = typename Type::ImplementationType;
-
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    using Sequence = brigand::make_sequence&lt;brigand::ptrdiff_t&lt;0&gt;, WTF::variant_size&lt;ImplementationType&gt;::value&gt;;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const ImplementationType&amp; variant)
-    {
-        auto index = variant.index();
-
-        std::optional&lt;JSC::JSValue&gt; returnValue;
-        brigand::for_each&lt;Sequence&gt;([&amp;](auto&amp;&amp; type) {
-            using I = typename WTF::RemoveCVAndReference&lt;decltype(type)&gt;::type::type;
-            if (I::value == index) {
-                ASSERT(!returnValue);
-                returnValue = toJS&lt;brigand::at&lt;TypeList, I&gt;&gt;(state, globalObject, WTF::get&lt;I::value&gt;(variant));
-            }
-        });
-
-        ASSERT(returnValue);
-        return returnValue.value();
-    }
-};
-
-// MARK: -
-// MARK: Date type
-
-template&lt;&gt; struct Converter&lt;IDLDate&gt; : DefaultConverter&lt;IDLDate&gt; {
-    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return valueToDate(&amp;state, value);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLDate&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, double value)
-    {
-        return jsDate(&amp;state, value);
-    }
-};
-
-// MARK: -
-// MARK: IDLJSON type
-
-template&lt;&gt; struct Converter&lt;IDLJSON&gt; : DefaultConverter&lt;IDLJSON&gt; {
-    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return JSC::JSONStringify(&amp;state, value, 0);
-    }
-};
-
-template&lt;&gt; struct JSConverter&lt;IDLJSON&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = false;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
-    {
-        return JSC::JSONParse(&amp;state, value);
-    }
-};
-
-// MARK: -
-// MARK: SerializedScriptValue type
-
-template&lt;typename T&gt; struct Converter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; : DefaultConverter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; {
-    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-    {
-        return T::create(state, value);
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, RefPtr&lt;T&gt; value)
-    {
-        return value ? value-&gt;deserialize(state, &amp;globalObject) : JSC::jsNull();
-    }
-};
-
-// MARK: -
-// MARK: Event Listener type
-
-template&lt;typename T&gt; struct Converter&lt;IDLEventListener&lt;T&gt;&gt; : DefaultConverter&lt;IDLEventListener&lt;T&gt;&gt; {
-    using ReturnType = RefPtr&lt;T&gt;;
-
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
-    {
-        auto scope = DECLARE_THROW_SCOPE(state.vm());
-
-        auto listener = T::create(value, thisObject, false, currentWorld(&amp;state));
-        if (!listener)
-            throwTypeError(&amp;state, scope);
-    
-        return listener;
-    }
-};
-
-// MARK: -
-// MARK: XPathNSResolver type
-
-template&lt;typename T&gt; struct Converter&lt;IDLXPathNSResolver&lt;T&gt;&gt; : DefaultConverter&lt;IDLXPathNSResolver&lt;T&gt;&gt; {
-    using ReturnType = RefPtr&lt;T&gt;;
-    using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
-
-    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
-    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
-    {
-        JSC::VM&amp; vm = state.vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-        ReturnType object = WrapperType::toWrapped(vm, state, value);
-        if (UNLIKELY(!object))
-            exceptionThrower(state, scope);
-        return object;
-    }
-};
-
-template&lt;typename T&gt; struct JSConverter&lt;IDLXPathNSResolver&lt;T&gt;&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template &lt;typename U&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const U&amp; value)
-    {
-        return toJS(&amp;state, &amp;globalObject, Detail::getPtrOrRef(value));
-    }
-
-    template&lt;typename U&gt;
-    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        return toJSNewlyCreated(&amp;state, &amp;globalObject, std::forward&lt;U&gt;(value));
-    }
-};
-
-// MARK: -
-// MARK: IDLIDBKey type
-
-template&lt;&gt; struct JSConverter&lt;IDLIDBKey&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    template &lt;typename U&gt;
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
-    {
-        return toJS(state, globalObject, std::forward&lt;U&gt;(value));
-    }
-};
-
-#if ENABLE(WEBGL)
-
-// MARK: -
-// MARK: IDLWebGLAny type
-
-template&lt;&gt; struct JSConverter&lt;IDLWebGLAny&gt; {
-    static constexpr bool needsState = true;
-    static constexpr bool needsGlobalObject = true;
-
-    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const WebGLAny&amp; value)
-    {
-        return convertToJSValue(state, globalObject, value);
-    }
-};
-
-#endif
-
-// MARK: -
-// MARK: Support for variadic tail convertions
-
-namespace Detail {
-    template&lt;typename IDLType&gt;
-    struct VariadicConverterBase;
-
-    template&lt;typename IDLType&gt; 
-    struct VariadicConverterBase {
-        using Item = typename IDLType::ImplementationType;
-
-        static std::optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
-        {
-            auto&amp; vm = state.vm();
-            auto scope = DECLARE_THROW_SCOPE(vm);
-
-            auto result = Converter&lt;IDLType&gt;::convert(state, value);
-            RETURN_IF_EXCEPTION(scope, std::nullopt);
-
-            return WTFMove(result);
-        }
-    };
-
-    template&lt;typename T&gt;
-    struct VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
-        using Item = std::reference_wrapper&lt;T&gt;;
-
-        static std::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 std::nullopt;
-            return std::optional&lt;Item&gt;(*result);
-        }
-    };
-
-    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;
-            std::optional&lt;Container&gt; arguments;
-        };
-    };
-}
-
-template&lt;typename IDLType&gt; typename Detail::VariadicConverter&lt;IDLType&gt;::Result convertVariadicArguments(JSC::ExecState&amp; state, size_t startIndex)
-{
-    size_t length = state.argumentCount();
-    if (startIndex &gt; length)
-        return { 0, std::nullopt };
-
-    typename Detail::VariadicConverter&lt;IDLType&gt;::Container result;
-    result.reserveInitialCapacity(length - startIndex);
-
-    for (size_t i = startIndex; i &lt; length; ++i) {
-        auto value = Detail::VariadicConverter&lt;IDLType&gt;::convert(state, state.uncheckedArgument(i));
-        if (!value)
-            return { i, std::nullopt };
-        result.uncheckedAppend(WTFMove(*value));
-    }
-
-    return { length, WTFMove(result) };
-}
-
-} // namespace WebCore
</del><ins>+#include &quot;JSDOMConvertAny.h&quot;
+#include &quot;JSDOMConvertBoolean.h&quot;
+#include &quot;JSDOMConvertBufferSource.h&quot;
+#include &quot;JSDOMConvertCallbacks.h&quot;
+#include &quot;JSDOMConvertDate.h&quot;
+#include &quot;JSDOMConvertDictionary.h&quot;
+#include &quot;JSDOMConvertEnumeration.h&quot;
+#include &quot;JSDOMConvertEventListener.h&quot;
+#include &quot;JSDOMConvertIndexedDB.h&quot;
+#include &quot;JSDOMConvertInterface.h&quot;
+#include &quot;JSDOMConvertJSON.h&quot;
+#include &quot;JSDOMConvertNull.h&quot;
+#include &quot;JSDOMConvertNullable.h&quot;
+#include &quot;JSDOMConvertNumbers.h&quot;
+#include &quot;JSDOMConvertObject.h&quot;
+#include &quot;JSDOMConvertRecord.h&quot;
+#include &quot;JSDOMConvertSequences.h&quot;
+#include &quot;JSDOMConvertSerializedScriptValue.h&quot;
+#include &quot;JSDOMConvertStrings.h&quot;
+#include &quot;JSDOMConvertUnion.h&quot;
+#include &quot;JSDOMConvertWebGL.h&quot;
+#include &quot;JSDOMConvertXPathNSResolver.h&quot;
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertAnyhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertAny.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertAny.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertAny.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct Converter&lt;IDLAny&gt; : DefaultConverter&lt;IDLAny&gt; {
+    using ReturnType = JSC::JSValue;
+    
+    static JSC::JSValue convert(JSC::ExecState&amp;, JSC::JSValue value)
+    {
+        return value;
+    }
+
+    static JSC::JSValue convert(const JSC::Strong&lt;JSC::Unknown&gt;&amp; value)
+    {
+        return value.get();
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLAny&gt; {
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(const JSC::JSValue&amp; value)
+    {
+        return value;
+    }
+
+    static JSC::JSValue convert(const JSC::Strong&lt;JSC::Unknown&gt;&amp; value)
+    {
+        return value.get();
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertBasehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,183 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;JSDOMExceptionHandling.h&quot;
+
+namespace WebCore {
+
+// Conversion from JSValue -&gt; Implementation
+template&lt;typename T&gt; struct Converter;
+
+
+struct DefaultExceptionThrower {
+    void operator()(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope)
+    {
+        throwTypeError(&amp;state, scope);
+    }
+};
+
+template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSC::JSObject&amp;);
+template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSDOMGlobalObject&amp;);
+template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, ExceptionThrower&amp;&amp;);
+template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSC::JSObject&amp;, ExceptionThrower&amp;&amp;);
+template&lt;typename T, typename ExceptionThrower&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, JSDOMGlobalObject&amp;, ExceptionThrower&amp;&amp;);
+
+template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+{
+    return Converter&lt;T&gt;::convert(state, value);
+}
+
+template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
+{
+    return Converter&lt;T&gt;::convert(state, value, thisObject);
+}
+
+template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject)
+{
+    return Converter&lt;T&gt;::convert(state, value, globalObject);
+}
+
+template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower)
+{
+    return Converter&lt;T&gt;::convert(state, value, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+}
+
+template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject, ExceptionThrower&amp;&amp; exceptionThrower)
+{
+    return Converter&lt;T&gt;::convert(state, value, thisObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+}
+
+template&lt;typename T, typename ExceptionThrower&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower)
+{
+    return Converter&lt;T&gt;::convert(state, value, globalObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+}
+
+// Conversion from Implementation -&gt; JSValue
+template&lt;typename T&gt; struct JSConverter;
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(U&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, U&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp;);
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, JSC::ThrowScope&amp;, ExceptionOr&lt;U&gt;&amp;&amp;);
+
+template&lt;typename T, bool needsState = JSConverter&lt;T&gt;::needsState, bool needsGlobalObject = JSConverter&lt;T&gt;::needsGlobalObject&gt;
+struct JSConverterOverloader;
+
+template&lt;typename T&gt;
+struct JSConverterOverloader&lt;T, true, true&gt; {
+    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        return JSConverter&lt;T&gt;::convert(state, globalObject, std::forward&lt;U&gt;(value));
+    }
+};
+
+template&lt;typename T&gt;
+struct JSConverterOverloader&lt;T, true, false&gt; {
+    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, U&amp;&amp; value)
+    {
+        return JSConverter&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
+    }
+
+    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp;, U&amp;&amp; value)
+    {
+        return JSConverter&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
+    }
+};
+
+template&lt;typename T&gt;
+struct JSConverterOverloader&lt;T, false, false&gt; {
+    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp;, U&amp;&amp; value)
+    {
+        return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
+    }
+
+    template&lt;typename U&gt; static JSC::JSValue convert(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, U&amp;&amp; value)
+    {
+        return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
+    }
+};
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(U&amp;&amp; value)
+{
+    return JSConverter&lt;T&gt;::convert(std::forward&lt;U&gt;(value));
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, U&amp;&amp; value)
+{
+    return JSConverterOverloader&lt;T&gt;::convert(state, std::forward&lt;U&gt;(value));
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+{
+    return JSConverterOverloader&lt;T&gt;::convert(state, globalObject, std::forward&lt;U&gt;(value));
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
+{
+    if (UNLIKELY(value.hasException())) {
+        propagateException(state, throwScope, value.releaseException());
+        return { };
+    }
+
+    return toJS&lt;T&gt;(state, value.releaseReturnValue());
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJS(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
+{
+    if (UNLIKELY(value.hasException())) {
+        propagateException(state, throwScope, value.releaseException());
+        return { };
+    }
+
+    return toJS&lt;T&gt;(state, globalObject, value.releaseReturnValue());
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+{
+    return JSConverter&lt;T&gt;::convertNewlyCreated(state, globalObject, std::forward&lt;U&gt;(value));
+}
+
+template&lt;typename T, typename U&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, JSC::ThrowScope&amp; throwScope, ExceptionOr&lt;U&gt;&amp;&amp; value)
+{
+    if (UNLIKELY(value.hasException())) {
+        propagateException(state, throwScope, value.releaseException());
+        return { };
+    }
+
+    return toJSNewlyCreated&lt;T&gt;(state, globalObject, value.releaseReturnValue());
+}
+
+
+template&lt;typename T&gt; struct DefaultConverter {
+    using ReturnType = typename T::ImplementationType;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertBooleanhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertBoolean.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertBoolean.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertBoolean.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct Converter&lt;IDLBoolean&gt; : DefaultConverter&lt;IDLBoolean&gt; {
+    static bool convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return value.toBoolean(&amp;state);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLBoolean&gt; {
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(bool value)
+    {
+        return JSC::jsBoolean(value);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertBufferSourcehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;BufferSource.h&quot;
+#include &quot;JSDOMConvertInterface.h&quot;
+#include &quot;JSDOMWrapperCache.h&quot;
+#include &quot;JSDynamicDowncast.h&quot;
+#include &lt;runtime/JSTypedArrays.h&gt;
+
+namespace WebCore {
+
+// FIXME: It is wrong that we treat buffer related types as interfaces, they should be their own IDL type. 
+
+// Add adaptors to make ArrayBuffer / ArrayBufferView / typed arrays act like normal interfaces.
+
+template&lt;typename ImplementationClass&gt; struct JSDOMWrapperConverterTraits;
+
+template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;JSC::ArrayBuffer&gt; {
+    using WrapperClass = JSC::JSArrayBuffer;
+    using ToWrappedReturnType = JSC::ArrayBuffer*;
+};
+
+template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;JSC::ArrayBufferView&gt; {
+    using WrapperClass = JSC::JSArrayBufferView;
+    using ToWrappedReturnType = RefPtr&lt;ArrayBufferView&gt;;
+};
+
+template&lt;typename Adaptor&gt; struct JSDOMWrapperConverterTraits&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt; {
+    using WrapperClass = JSC::JSGenericTypedArrayView&lt;Adaptor&gt;;
+    using ToWrappedReturnType = RefPtr&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;;
+};
+
+
+inline RefPtr&lt;JSC::Int8Array&gt; toPossiblySharedInt8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int8Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Int16Array&gt; toPossiblySharedInt16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int16Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Int32Array&gt; toPossiblySharedInt32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Int32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint8Array&gt; toPossiblySharedUint8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint8Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint8ClampedArray&gt; toPossiblySharedUint8ClampedArray(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint8ClampedAdaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint16Array&gt; toPossiblySharedUint16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint16Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint32Array&gt; toPossiblySharedUint32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Uint32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Float32Array&gt; toPossiblySharedFloat32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Float32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Float64Array&gt; toPossiblySharedFloat64Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toPossiblySharedNativeTypedView&lt;JSC::Float64Adaptor&gt;(vm, value); }
+
+inline RefPtr&lt;JSC::Int8Array&gt; toUnsharedInt8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int8Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Int16Array&gt; toUnsharedInt16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int16Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Int32Array&gt; toUnsharedInt32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Int32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint8Array&gt; toUnsharedUint8Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint8Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint8ClampedArray&gt; toUnsharedUint8ClampedArray(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint8ClampedAdaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint16Array&gt; toUnsharedUint16Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint16Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Uint32Array&gt; toUnsharedUint32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Uint32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Float32Array&gt; toUnsharedFloat32Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Float32Adaptor&gt;(vm, value); }
+inline RefPtr&lt;JSC::Float64Array&gt; toUnsharedFloat64Array(JSC::VM&amp; vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView&lt;JSC::Float64Adaptor&gt;(vm, value); }
+
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, JSC::ArrayBuffer&amp; buffer)
+{
+    if (auto result = getCachedWrapper(globalObject-&gt;world(), buffer))
+        return result;
+
+    // The JSArrayBuffer::create function will register the wrapper in finishCreation.
+    return JSC::JSArrayBuffer::create(state-&gt;vm(), globalObject-&gt;arrayBufferStructure(buffer.sharingMode()), &amp;buffer);
+}
+
+inline JSC::JSValue toJS(JSC::ExecState* state, JSC::JSGlobalObject* globalObject, JSC::ArrayBufferView&amp; view)
+{
+    return view.wrap(state, globalObject);
+}
+
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, JSC::ArrayBuffer* buffer)
+{
+    if (!buffer)
+        return JSC::jsNull();
+    return toJS(state, globalObject, *buffer);
+}
+
+inline JSC::JSValue toJS(JSC::ExecState* state, JSC::JSGlobalObject* globalObject, JSC::ArrayBufferView* view)
+{
+    if (!view)
+        return JSC::jsNull();
+    return toJS(state, globalObject, *view);
+}
+
+inline RefPtr&lt;JSC::ArrayBufferView&gt; toPossiblySharedArrayBufferView(JSC::VM&amp; vm, JSC::JSValue value)
+{
+    auto* wrapper = jsDynamicDowncast&lt;JSC::JSArrayBufferView*&gt;(vm, value);
+    if (!wrapper)
+        return nullptr;
+    return wrapper-&gt;possiblySharedImpl();
+}
+
+inline RefPtr&lt;JSC::ArrayBufferView&gt; toUnsharedArrayBufferView(JSC::VM&amp; vm, JSC::JSValue value)
+{
+    auto result = toPossiblySharedArrayBufferView(vm, value);
+    if (!result || result-&gt;isShared())
+        return nullptr;
+    return result;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertCallbackshfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,100 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;typename T&gt; struct Converter&lt;IDLCallbackFunction&lt;T&gt;&gt; : DefaultConverter&lt;IDLCallbackFunction&lt;T&gt;&gt; {
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        if (!value.isFunction()) {
+            exceptionThrower(state, scope);
+            return nullptr;
+        }
+        
+        return T::create(JSC::asObject(value), &amp;globalObject);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLCallbackFunction&lt;T&gt;&gt; {
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    template &lt;typename U&gt;
+    static JSC::JSValue convert(const U&amp; value)
+    {
+        return toJS(Detail::getPtrOrRef(value));
+    }
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convertNewlyCreated(U&amp;&amp; value)
+    {
+        return toJSNewlyCreated(std::forward&lt;U&gt;(value));
+    }
+};
+
+
+template&lt;typename T&gt; struct Converter&lt;IDLCallbackInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLCallbackInterface&lt;T&gt;&gt; {
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        if (!value.isObject()) {
+            exceptionThrower(state, scope);
+            return nullptr;
+        }
+
+        return T::create(JSC::asObject(value), &amp;globalObject);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLCallbackInterface&lt;T&gt;&gt; {
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    template &lt;typename U&gt;
+    static JSC::JSValue convert(const U&amp; value)
+    {
+        return toJS(Detail::getPtrOrRef(value));
+    }
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convertNewlyCreated(U&amp;&amp; value)
+    {
+        return toJSNewlyCreated(std::forward&lt;U&gt;(value));
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertDatecppfromrev211548trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertDate.cpp (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertDate.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertDate.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ *  Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ *  Copyright (C) 2007 Samuel Weinig &lt;sam@webkit.org&gt;
+ *  Copyright (C) 2013 Michael Pruett &lt;michael@68k.org&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSDOMConvertDate.h&quot;
+
+#include &lt;heap/HeapInlines.h&gt;
+#include &lt;runtime/DateInstance.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;runtime/JSGlobalObject.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+// FIXME: This should get passed a global object rather than getting it out of the ExecState.
+JSValue jsDate(ExecState&amp; state, double value)
+{
+    return DateInstance::create(state.vm(), state.lexicalGlobalObject()-&gt;dateStructure(), value);
+}
+
+double valueToDate(ExecState&amp; state, JSValue value)
+{
+    if (value.isNumber())
+        return value.asNumber();
+    if (!value.inherits(state.vm(), DateInstance::info()))
+        return std::numeric_limits&lt;double&gt;::quiet_NaN();
+    return static_cast&lt;DateInstance*&gt;(value.toObject(&amp;state))-&gt;internalNumber();
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertDatehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertDate.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertDate.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertDate.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+JSC::JSValue jsDate(JSC::ExecState&amp;, double value);
+double valueToDate(JSC::ExecState&amp;, JSC::JSValue); // NaN if the value can't be converted to a date.
+
+template&lt;&gt; struct Converter&lt;IDLDate&gt; : DefaultConverter&lt;IDLDate&gt; {
+    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return valueToDate(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLDate&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    // FIXME: This should be taking a JSDOMGlobalObject and passing it to jsDate.
+    static JSC::JSValue convert(JSC::ExecState&amp; state, double value)
+    {
+        return jsDate(state, value);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertDictionaryhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertDictionary.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertDictionary.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertDictionary.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+// Specialized by generated code for IDL dictionary conversion.
+template&lt;typename T&gt; T convertDictionary(JSC::ExecState&amp;, JSC::JSValue);
+
+
+template&lt;typename T&gt; struct Converter&lt;IDLDictionary&lt;T&gt;&gt; : DefaultConverter&lt;IDLDictionary&lt;T&gt;&gt; {
+    using ReturnType = T;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return convertDictionary&lt;T&gt;(state, value);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLDictionary&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const T&amp; dictionary)
+    {
+        return convertDictionaryToJS(state, globalObject, dictionary);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertEnumerationhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertEnumeration.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertEnumeration.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertEnumeration.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+// Specialized by generated code for IDL enumeration conversion.
+template&lt;typename T&gt; std::optional&lt;T&gt; parseEnumeration(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;typename T&gt; T convertEnumeration(JSC::ExecState&amp;, JSC::JSValue);
+template&lt;typename T&gt; const char* expectedEnumerationValues();
+
+// Specialized by generated code for IDL enumeration conversion.
+template&lt;typename T&gt; JSC::JSString* convertEnumerationToJS(JSC::ExecState&amp;, T);
+
+
+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);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLEnumeration&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; exec, T value)
+    {
+        return convertEnumerationToJS(exec, value);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertEventListenerhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertEventListener.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertEventListener.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertEventListener.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;typename T&gt; struct Converter&lt;IDLEventListener&lt;T&gt;&gt; : DefaultConverter&lt;IDLEventListener&lt;T&gt;&gt; {
+    using ReturnType = RefPtr&lt;T&gt;;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
+    {
+        auto scope = DECLARE_THROW_SCOPE(state.vm());
+
+        auto listener = T::create(value, thisObject, false, currentWorld(&amp;state));
+        if (!listener)
+            throwTypeError(&amp;state, scope);
+    
+        return listener;
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertIndexedDBhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertIndexedDB.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertIndexedDB.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertIndexedDB.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct JSConverter&lt;IDLIDBKey&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template &lt;typename U&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        return toJS(state, globalObject, std::forward&lt;U&gt;(value));
+    }
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertInterfacehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertInterface.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertInterface.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertInterface.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+#include &quot;JSDOMExceptionHandling.h&quot;
+
+namespace WebCore {
+
+template&lt;typename ImplementationClass&gt; struct JSDOMWrapperConverterTraits;
+
+template&lt;typename T&gt; struct Converter&lt;IDLInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLInterface&lt;T&gt;&gt; {
+    using ReturnType = typename JSDOMWrapperConverterTraits&lt;T&gt;::ToWrappedReturnType;
+    using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
+
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
+    {
+        auto&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        ReturnType object = WrapperType::toWrapped(vm, value);
+        if (UNLIKELY(!object))
+            exceptionThrower(state, scope);
+        return object;
+    }
+};
+
+namespace Detail {
+
+template &lt;typename T&gt; inline T* getPtrOrRef(const T* p) { return const_cast&lt;T*&gt;(p); }
+template &lt;typename T&gt; inline T&amp; getPtrOrRef(const T&amp; p) { return const_cast&lt;T&amp;&gt;(p); }
+template &lt;typename T&gt; inline T* getPtrOrRef(const RefPtr&lt;T&gt;&amp; p) { return p.get(); }
+template &lt;typename T&gt; inline T&amp; getPtrOrRef(const Ref&lt;T&gt;&amp; p) { return p.get(); }
+
+}
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLInterface&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template &lt;typename U&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const U&amp; value)
+    {
+        return toJS(&amp;state, &amp;globalObject, Detail::getPtrOrRef(value));
+    }
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        return toJSNewlyCreated(&amp;state, &amp;globalObject, std::forward&lt;U&gt;(value));
+    }
+};
+
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertJSONhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertJSON.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertJSON.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertJSON.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+#include &lt;runtime/JSONObject.h&gt;
+
+namespace WebCore {
+
+template&lt;&gt; struct Converter&lt;IDLJSON&gt; : DefaultConverter&lt;IDLJSON&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return JSC::JSONStringify(&amp;state, value, 0);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLJSON&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
+    {
+        return JSC::JSONParse(&amp;state, value);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertNullhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertNull.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertNull.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertNull.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct Converter&lt;IDLNull&gt; : DefaultConverter&lt;IDLNull&gt; {
+    static std::nullptr_t convert(JSC::ExecState&amp;, JSC::JSValue)
+    {
+        return nullptr;
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLNull&gt; {
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(std::nullptr_t)
+    {
+        return JSC::jsNull();
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertNullablehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertNullable.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertNullable.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertNullable.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,162 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertAny.h&quot;
+#include &quot;JSDOMConvertInterface.h&quot;
+#include &quot;JSDOMConvertNumbers.h&quot;
+#include &quot;JSDOMConvertStrings.h&quot;
+
+namespace WebCore {
+
+namespace Detail {
+
+template&lt;typename IDLType&gt;
+struct NullableConversionType;
+
+template&lt;typename IDLType&gt; 
+struct NullableConversionType {
+    using Type = typename IDLNullable&lt;IDLType&gt;::ImplementationType;
+};
+
+template&lt;typename T&gt;
+struct NullableConversionType&lt;IDLInterface&lt;T&gt;&gt; {
+    using Type = typename Converter&lt;IDLInterface&lt;T&gt;&gt;::ReturnType;
+};
+
+template&lt;&gt;
+struct NullableConversionType&lt;IDLAny&gt; {
+    using Type = typename Converter&lt;IDLAny&gt;::ReturnType;
+};
+
+}
+
+template&lt;typename T&gt; struct Converter&lt;IDLNullable&lt;T&gt;&gt; : DefaultConverter&lt;IDLNullable&lt;T&gt;&gt; {
+    using ReturnType = typename Detail::NullableConversionType&lt;T&gt;::Type;
+    
+    // 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.
+    //
+    // 2. Otherwise, if V is null or undefined, then return the IDL nullable type T? value null.
+    // 3. Otherwise, return the result of converting V using the rules for the inner IDL type T.
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value);
+    }
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, thisObject);
+    }
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, globalObject);
+    }
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, configuration);
+    }
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, configuration);
+    }
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+    }
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSObject&amp; thisObject, ExceptionThrower&amp;&amp; exceptionThrower)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, thisObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+    }
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, JSDOMGlobalObject&amp; globalObject, ExceptionThrower&amp;&amp; exceptionThrower)
+    {
+        if (value.isUndefinedOrNull())
+            return T::nullValue();
+        return Converter&lt;T&gt;::convert(state, value, globalObject, std::forward&lt;ExceptionThrower&gt;(exceptionThrower));
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLNullable&lt;T&gt;&gt; {
+    using ImplementationType = typename IDLNullable&lt;T&gt;::ImplementationType;
+
+    static constexpr bool needsState = JSConverter&lt;T&gt;::needsState;
+    static constexpr bool needsGlobalObject = JSConverter&lt;T&gt;::needsGlobalObject;
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convert(U&amp;&amp; value)
+    {
+        if (T::isNullValue(value))
+            return JSC::jsNull();
+        return JSConverter&lt;T&gt;::convert(T::extractValueFromNullable(value));
+    }
+    template&lt;typename U&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, U&amp;&amp; value)
+    {
+        if (T::isNullValue(value))
+            return JSC::jsNull();
+        return JSConverter&lt;T&gt;::convert(state, T::extractValueFromNullable(value));
+    }
+    template&lt;typename U&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        if (T::isNullValue(value))
+            return JSC::jsNull();
+        return JSConverter&lt;T&gt;::convert(state, globalObject, T::extractValueFromNullable(value));
+    }
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        if (T::isNullValue(value))
+            return JSC::jsNull();
+        return JSConverter&lt;T&gt;::convert(state, globalObject, T::extractValueFromNullable(value));
+    }
+};
+
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertNumberscppfromrev211548trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,348 @@
</span><ins>+/*
+ *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ *  Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ *  Copyright (C) 2007 Samuel Weinig &lt;sam@webkit.org&gt;
+ *  Copyright (C) 2013 Michael Pruett &lt;michael@68k.org&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSDOMConvertNumbers.h&quot;
+
+#include &quot;JSDOMExceptionHandling.h&quot;
+#include &lt;heap/HeapInlines.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;wtf/MathExtras.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+static const int32_t kMaxInt32 = 0x7fffffff;
+static const int32_t kMinInt32 = -kMaxInt32 - 1;
+static const uint32_t kMaxUInt32 = 0xffffffffU;
+static const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, largest integer exactly representable in ECMAScript.
+
+static String rangeErrorString(double value, double min, double max)
+{
+    return makeString(&quot;Value &quot;, String::numberToStringECMAScript(value), &quot; is outside the range [&quot;, String::numberToStringECMAScript(min), &quot;, &quot;, String::numberToStringECMAScript(max), &quot;]&quot;);
+}
+
+static double enforceRange(ExecState&amp; state, double x, double minimum, double maximum)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (std::isnan(x) || std::isinf(x)) {
+        throwTypeError(&amp;state, scope, rangeErrorString(x, minimum, maximum));
+        return 0;
+    }
+    x = trunc(x);
+    if (x &lt; minimum || x &gt; maximum) {
+        throwTypeError(&amp;state, scope, rangeErrorString(x, minimum, maximum));
+        return 0;
+    }
+    return x;
+}
+
+template &lt;typename T&gt;
+struct IntTypeLimits {
+};
+
+template &lt;&gt;
+struct IntTypeLimits&lt;int8_t&gt; {
+    static const int8_t minValue = -128;
+    static const int8_t maxValue = 127;
+    static const unsigned numberOfValues = 256; // 2^8
+};
+
+template &lt;&gt;
+struct IntTypeLimits&lt;uint8_t&gt; {
+    static const uint8_t maxValue = 255;
+    static const unsigned numberOfValues = 256; // 2^8
+};
+
+template &lt;&gt;
+struct IntTypeLimits&lt;int16_t&gt; {
+    static const short minValue = -32768;
+    static const short maxValue = 32767;
+    static const unsigned numberOfValues = 65536; // 2^16
+};
+
+template &lt;&gt;
+struct IntTypeLimits&lt;uint16_t&gt; {
+    static const unsigned short maxValue = 65535;
+    static const unsigned numberOfValues = 65536; // 2^16
+};
+
+template &lt;typename T&gt;
+static inline T toSmallerInt(ExecState&amp; state, JSValue value, IntegerConversionConfiguration configuration)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    static_assert(std::is_signed&lt;T&gt;::value &amp;&amp; std::is_integral&lt;T&gt;::value, &quot;Should only be used for signed integral types&quot;);
+
+    typedef IntTypeLimits&lt;T&gt; LimitsTrait;
+    // Fast path if the value is already a 32-bit signed integer in the right range.
+    if (value.isInt32()) {
+        int32_t d = value.asInt32();
+        if (d &gt;= LimitsTrait::minValue &amp;&amp; d &lt;= LimitsTrait::maxValue)
+            return static_cast&lt;T&gt;(d);
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            throwTypeError(&amp;state, scope);
+            return 0;
+        case IntegerConversionConfiguration::Clamp:
+            return d &lt; LimitsTrait::minValue ? LimitsTrait::minValue : LimitsTrait::maxValue;
+        }
+        d %= LimitsTrait::numberOfValues;
+        return static_cast&lt;T&gt;(d &gt; LimitsTrait::maxValue ? d - LimitsTrait::numberOfValues : d);
+    }
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+
+    switch (configuration) {
+    case IntegerConversionConfiguration::Normal:
+        break;
+    case IntegerConversionConfiguration::EnforceRange:
+        return enforceRange(state, x, LimitsTrait::minValue, LimitsTrait::maxValue);
+    case IntegerConversionConfiguration::Clamp:
+        return std::isnan(x) ? 0 : clampTo&lt;T&gt;(x);
+    }
+
+    if (std::isnan(x) || std::isinf(x) || !x)
+        return 0;
+
+    x = x &lt; 0 ? -floor(fabs(x)) : floor(fabs(x));
+    x = fmod(x, LimitsTrait::numberOfValues);
+
+    return static_cast&lt;T&gt;(x &gt; LimitsTrait::maxValue ? x - LimitsTrait::numberOfValues : x);
+}
+
+template &lt;typename T&gt;
+static inline T toSmallerUInt(ExecState&amp; state, JSValue value, IntegerConversionConfiguration configuration)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    static_assert(std::is_unsigned&lt;T&gt;::value &amp;&amp; std::is_integral&lt;T&gt;::value, &quot;Should only be used for unsigned integral types&quot;);
+
+    typedef IntTypeLimits&lt;T&gt; LimitsTrait;
+    // Fast path if the value is already a 32-bit unsigned integer in the right range.
+    if (value.isUInt32()) {
+        uint32_t d = value.asUInt32();
+        if (d &lt;= LimitsTrait::maxValue)
+            return static_cast&lt;T&gt;(d);
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            return static_cast&lt;T&gt;(d);
+        case IntegerConversionConfiguration::EnforceRange:
+            throwTypeError(&amp;state, scope);
+            return 0;
+        case IntegerConversionConfiguration::Clamp:
+            return LimitsTrait::maxValue;
+        }
+    }
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+
+    switch (configuration) {
+    case IntegerConversionConfiguration::Normal:
+        break;
+    case IntegerConversionConfiguration::EnforceRange:
+        return enforceRange(state, x, 0, LimitsTrait::maxValue);
+    case IntegerConversionConfiguration::Clamp:
+        return std::isnan(x) ? 0 : clampTo&lt;T&gt;(x);
+    }
+
+    if (std::isnan(x) || std::isinf(x) || !x)
+        return 0;
+
+    x = x &lt; 0 ? -floor(fabs(x)) : floor(fabs(x));
+    return static_cast&lt;T&gt;(fmod(x, LimitsTrait::numberOfValues));
+}
+
+int8_t toInt8EnforceRange(JSC::ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
+}
+
+uint8_t toUInt8EnforceRange(JSC::ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
+}
+
+int8_t toInt8Clamp(JSC::ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
+}
+
+uint8_t toUInt8Clamp(JSC::ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-byte
+int8_t toInt8(ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int8_t&gt;(state, value, IntegerConversionConfiguration::Normal);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-octet
+uint8_t toUInt8(ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint8_t&gt;(state, value, IntegerConversionConfiguration::Normal);
+}
+
+int16_t toInt16EnforceRange(ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
+}
+
+uint16_t toUInt16EnforceRange(ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::EnforceRange);
+}
+
+int16_t toInt16Clamp(ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
+}
+
+uint16_t toUInt16Clamp(ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::Clamp);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-short
+int16_t toInt16(ExecState&amp; state, JSValue value)
+{
+    return toSmallerInt&lt;int16_t&gt;(state, value, IntegerConversionConfiguration::Normal);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-unsigned-short
+uint16_t toUInt16(ExecState&amp; state, JSValue value)
+{
+    return toSmallerUInt&lt;uint16_t&gt;(state, value, IntegerConversionConfiguration::Normal);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-long
+int32_t toInt32EnforceRange(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (value.isInt32())
+        return value.asInt32();
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+    return enforceRange(state, x, kMinInt32, kMaxInt32);
+}
+
+int32_t toInt32Clamp(ExecState&amp; state, JSValue value)
+{
+    if (value.isInt32())
+        return value.asInt32();
+
+    double x = value.toNumber(&amp;state);
+    return std::isnan(x) ? 0 : clampTo&lt;int32_t&gt;(x);
+}
+
+uint32_t toUInt32Clamp(ExecState&amp; state, JSValue value)
+{
+    if (value.isUInt32())
+        return value.asUInt32();
+
+    double x = value.toNumber(&amp;state);
+    return std::isnan(x) ? 0 : clampTo&lt;uint32_t&gt;(x);
+}
+
+// http://www.w3.org/TR/WebIDL/#es-unsigned-long
+uint32_t toUInt32EnforceRange(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (value.isUInt32())
+        return value.asUInt32();
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+    return enforceRange(state, x, 0, kMaxUInt32);
+}
+
+int64_t toInt64EnforceRange(ExecState&amp; state, JSC::JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+    return enforceRange(state, x, -kJSMaxInteger, kJSMaxInteger);
+}
+
+uint64_t toUInt64EnforceRange(ExecState&amp; state, JSC::JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    double x = value.toNumber(&amp;state);
+    RETURN_IF_EXCEPTION(scope, 0);
+    return enforceRange(state, x, 0, kJSMaxInteger);
+}
+
+int64_t toInt64Clamp(ExecState&amp; state, JSC::JSValue value)
+{
+    double x = value.toNumber(&amp;state);
+    return std::isnan(x) ? 0 : static_cast&lt;int64_t&gt;(std::min&lt;double&gt;(std::max&lt;double&gt;(x, -kJSMaxInteger), kJSMaxInteger));
+}
+
+uint64_t toUInt64Clamp(ExecState&amp; state, JSC::JSValue value)
+{
+    double x = value.toNumber(&amp;state);
+    return std::isnan(x) ? 0 : static_cast&lt;uint64_t&gt;(std::min&lt;double&gt;(std::max&lt;double&gt;(x, 0), kJSMaxInteger));
+}
+
+// http://www.w3.org/TR/WebIDL/#es-long-long
+int64_t toInt64(ExecState&amp; state, JSValue value)
+{
+    double x = value.toNumber(&amp;state);
+
+    // Map NaNs and +/-Infinity to 0; convert finite values modulo 2^64.
+    unsigned long long n;
+    doubleToInteger(x, n);
+    return n;
+}
+
+// http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
+uint64_t toUInt64(ExecState&amp; state, JSValue value)
+{
+    double x = value.toNumber(&amp;state);
+
+    // Map NaNs and +/-Infinity to 0; convert finite values modulo 2^64.
+    unsigned long long n;
+    doubleToInteger(x, n);
+    return n;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertNumbershfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertNumbers.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,423 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+#include &quot;JSDOMExceptionHandling.h&quot;
+
+namespace WebCore {
+
+enum class IntegerConversionConfiguration { Normal, EnforceRange, Clamp };
+
+template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, IntegerConversionConfiguration);
+
+template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration)
+{
+    return Converter&lt;T&gt;::convert(state, value, configuration);
+}
+
+// The following functions convert values to integers as per the WebIDL specification.
+// The conversion fails if the value cannot be converted to a number or, if EnforceRange is specified,
+// the value is outside the range of the destination integer type.
+
+WEBCORE_EXPORT int8_t toInt8EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint8_t toUInt8EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int16_t toInt16EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint16_t toUInt16EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int32_t toInt32EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint32_t toUInt32EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int64_t toInt64EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint64_t toUInt64EnforceRange(JSC::ExecState&amp;, JSC::JSValue);
+
+WEBCORE_EXPORT int8_t toInt8Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint8_t toUInt8Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int16_t toInt16Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint16_t toUInt16Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int32_t toInt32Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint32_t toUInt32Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int64_t toInt64Clamp(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint64_t toUInt64Clamp(JSC::ExecState&amp;, JSC::JSValue);
+
+WEBCORE_EXPORT int8_t toInt8(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint8_t toUInt8(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int16_t toInt16(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint16_t toUInt16(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT int64_t toInt64(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT uint64_t toUInt64(JSC::ExecState&amp;, JSC::JSValue);
+
+
+// MARK: -
+// MARK: Integer types
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toInt8EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toInt8Clamp(state, value);
+        }
+        return toInt8(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLByte&gt; {
+    using Type = typename IDLByte::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toUInt8EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toUInt8Clamp(state, value);
+        }
+        return toUInt8(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLOctet&gt; {
+    using Type = typename IDLOctet::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toInt16EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toInt16Clamp(state, value);
+        }
+        return toInt16(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLShort&gt; {
+    using Type = typename IDLShort::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toUInt16EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toUInt16Clamp(state, value);
+        }
+        return toUInt16(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUnsignedShort&gt; {
+    using Type = typename IDLUnsignedShort::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLLong&gt; : DefaultConverter&lt;IDLLong&gt; {
+    static inline int32_t convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return JSC::toInt32(number);
+    }
+
+    static int32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toInt32EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toInt32Clamp(state, value);
+        }
+        return value.toInt32(&amp;state);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLLong&gt; {
+    using Type = typename IDLLong::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toUInt32EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toUInt32Clamp(state, value);
+        }
+        return value.toUInt32(&amp;state);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUnsignedLong&gt; {
+    using Type = typename IDLUnsignedLong::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        if (value.isInt32())
+            return value.asInt32();
+
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toInt64EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toInt64Clamp(state, value);
+        }
+        return toInt64(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLLongLong&gt; {
+    using Type = typename IDLLongLong::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+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 = IntegerConversionConfiguration::Normal)
+    {
+        if (value.isUInt32())
+            return value.asUInt32();
+
+        switch (configuration) {
+        case IntegerConversionConfiguration::Normal:
+            break;
+        case IntegerConversionConfiguration::EnforceRange:
+            return toUInt64EnforceRange(state, value);
+        case IntegerConversionConfiguration::Clamp:
+            return toUInt64Clamp(state, value);
+        }
+        return toUInt64(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUnsignedLongLong&gt; {
+    using Type = typename IDLUnsignedLongLong::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+// MARK: -
+// MARK: Floating point types
+
+template&lt;&gt; struct Converter&lt;IDLFloat&gt; : DefaultConverter&lt;IDLFloat&gt; {
+
+    static inline float convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
+    {
+        if (UNLIKELY(!std::isfinite(number)))
+            throwNonFiniteTypeError(state, scope);
+        return static_cast&lt;float&gt;(number);
+    }
+
+    static float 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 static_cast&lt;float&gt;(number);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLFloat&gt; {
+    using Type = typename IDLFloat::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLUnrestrictedFloat&gt; : DefaultConverter&lt;IDLUnrestrictedFloat&gt; {
+    static inline float convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return static_cast&lt;float&gt;(number);
+    }
+
+    static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return static_cast&lt;float&gt;(value.toNumber(&amp;state));
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUnrestrictedFloat&gt; {
+    using Type = typename IDLUnrestrictedFloat::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLDouble&gt; : DefaultConverter&lt;IDLDouble&gt; {
+    static inline double convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
+    {
+        if (UNLIKELY(!std::isfinite(number)))
+            throwNonFiniteTypeError(state, scope);
+        return number;
+    }
+
+    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 JSConverter&lt;IDLDouble&gt; {
+    using Type = typename IDLDouble::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLUnrestrictedDouble&gt; : DefaultConverter&lt;IDLUnrestrictedDouble&gt; {
+    static inline double convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return number;
+    }
+
+    static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return value.toNumber(&amp;state);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUnrestrictedDouble&gt; {
+    using Type = typename IDLUnrestrictedDouble::ImplementationType;
+
+    static constexpr bool needsState = false;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(Type value)
+    {
+        return JSC::jsNumber(value);
+    }
+
+    // Add overload for MediaTime.
+    static JSC::JSValue convert(MediaTime value)
+    {
+        return JSC::jsNumber(value.toDouble());
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertObjecthfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertObject.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertObject.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertObject.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct Converter&lt;IDLObject&gt; : DefaultConverter&lt;IDLObject&gt; {
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static JSC::Strong&lt;JSC::JSObject&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        if (!value.isObject()) {
+            exceptionThrower(state, scope);
+            return { };
+        }
+        
+        return { vm, JSC::asObject(value) };
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertRecordhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertStrings.h&quot;
+#include &lt;runtime/ObjectConstructor.h&gt;
+
+namespace WebCore {
+
+namespace Detail {
+
+template&lt;typename IDLStringType&gt;
+struct IdentifierConverter;
+
+template&lt;&gt; struct IdentifierConverter&lt;IDLDOMString&gt; {
+    static String convert(JSC::ExecState&amp;, const JSC::Identifier&amp; identifier)
+    {
+        return identifier.string();
+    }
+};
+
+template&lt;&gt; struct IdentifierConverter&lt;IDLByteString&gt; {
+    static String convert(JSC::ExecState&amp; state, const JSC::Identifier&amp; identifier)
+    {
+        return identifierToByteString(state, identifier);
+    }
+};
+
+template&lt;&gt; struct IdentifierConverter&lt;IDLUSVString&gt; {
+    static String convert(JSC::ExecState&amp; state, const JSC::Identifier&amp; identifier)
+    {
+        return identifierToUSVString(state, identifier);
+    }
+};
+
+}
+
+template&lt;typename K, typename V&gt; struct Converter&lt;IDLRecord&lt;K, V&gt;&gt; : DefaultConverter&lt;IDLRecord&lt;K, V&gt;&gt; {
+    using ReturnType = typename IDLRecord&lt;K, V&gt;::ImplementationType;
+    using KeyType = typename K::ImplementationType;
+    using ValueType = typename V::ImplementationType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        auto&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        // 1. Let result be a new empty instance of record&lt;K, V&gt;.
+        // 2. If Type(O) is Undefined or Null, return result.
+        if (value.isUndefinedOrNull())
+            return { };
+        
+        // 3. If Type(O) is not Object, throw a TypeError.
+        if (!value.isObject()) {
+            throwTypeError(&amp;state, scope);
+            return { };
+        }
+        
+        JSC::JSObject* object = JSC::asObject(value);
+    
+        ReturnType result;
+    
+        // 4. Let keys be ? O.[[OwnPropertyKeys]]().
+        JSC::PropertyNameArray keys(&amp;vm, JSC::PropertyNameMode::Strings);
+        object-&gt;getOwnPropertyNames(object, &amp;state, keys, JSC::EnumerationMode());
+        RETURN_IF_EXCEPTION(scope, { });
+
+        // 5. Repeat, for each element key of keys in List order:
+        for (auto&amp; key : keys) {
+            // 1. Let desc be ? O.[[GetOwnProperty]](key).
+            JSC::PropertyDescriptor descriptor;
+            bool didGetDescriptor = object-&gt;getOwnPropertyDescriptor(&amp;state, key, descriptor);
+            RETURN_IF_EXCEPTION(scope, { });
+
+            if (!didGetDescriptor)
+                continue;
+
+            // 2. If desc is not undefined and desc.[[Enumerable]] is true:
+            
+            // FIXME: Do we need to check for enumerable / undefined, or is this handled by the default
+            // enumeration mode?
+
+            if (!descriptor.value().isUndefined() &amp;&amp; descriptor.enumerable()) {
+                // 1. Let typedKey be key converted to an IDL value of type K.
+                auto typedKey = Detail::IdentifierConverter&lt;K&gt;::convert(state, key);
+
+                // 2. Let value be ? Get(O, key).
+                auto subValue = object-&gt;get(&amp;state, key);
+                RETURN_IF_EXCEPTION(scope, { });
+
+                // 3. Let typedValue be value converted to an IDL value of type V.
+                auto typedValue = Converter&lt;V&gt;::convert(state, subValue);
+                RETURN_IF_EXCEPTION(scope, { });
+                
+                // 4. If typedKey is already a key in result, set its value to typedValue.
+                // Note: This can happen when O is a proxy object.
+                // FIXME: Handle this case.
+                
+                // 5. Otherwise, append to result a mapping (typedKey, typedValue).
+                result.append({ typedKey, typedValue });
+            }
+        }
+
+        // 6. Return result.
+        return result;
+    }
+};
+
+template&lt;typename K, typename V&gt; struct JSConverter&lt;IDLRecord&lt;K, V&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template&lt;typename MapType&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const MapType&amp; map)
+    {
+        auto&amp; vm = state.vm();
+    
+        // 1. Let result be ! ObjectCreate(%ObjectPrototype%).
+        auto result = constructEmptyObject(&amp;state);
+        
+        // 2. Repeat, for each mapping (key, value) in D:
+        for (const auto&amp; keyValuePair : map) {
+            // 1. Let esKey be key converted to an ECMAScript value.
+            // Note, this step is not required, as we need the key to be
+            // an Identifier, not a JSValue.
+
+            // 2. Let esValue be value converted to an ECMAScript value.
+            auto esValue = toJS&lt;V&gt;(state, globalObject, keyValuePair.value);
+
+            // 3. Let created be ! CreateDataProperty(result, esKey, esValue).
+            bool created = result-&gt;putDirect(vm, JSC::Identifier::fromString(&amp;vm, keyValuePair.key), esValue);
+
+            // 4. Assert: created is true.
+            ASSERT_UNUSED(created, created);
+        }
+
+        // 3. Return result.
+        return result;
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertSequenceshfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,317 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+#include &lt;runtime/IteratorOperations.h&gt;
+#include &lt;runtime/JSArray.h&gt;
+#include &lt;runtime/JSGlobalObjectInlines.h&gt;
+
+namespace WebCore {
+
+namespace Detail {
+
+template&lt;typename IDLType&gt;
+struct GenericSequenceConverter {
+    using ReturnType = Vector&lt;typename IDLType::ImplementationType&gt;;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSObject* jsObject)
+    {
+        ReturnType result;
+        forEachInIterable(&amp;state, jsObject, [&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;
+    }
+};
+
+// Specialization for numeric types
+// FIXME: This is only implemented for the IDLFloatingPointTypes and IDLLong. To add
+// support for more numeric types, add an overload of Converter&lt;IDLType&gt;::convert that
+// takes an ExecState, ThrowScope, double as its arguments.
+template&lt;typename IDLType&gt;
+struct NumericSequenceConverter {
+    using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
+    using ReturnType = typename GenericConverter::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 { };
+        }
+
+        JSC::JSObject* object = JSC::asObject(value);
+        if (!JSC::isJSArray(object))
+            return GenericConverter::convert(state, object);
+
+        JSC::JSArray* array = JSC::asArray(object);
+        if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
+            return GenericConverter::convert(state, object);
+
+        unsigned length = array-&gt;length();
+
+        ReturnType result;
+        if (!result.tryReserveCapacity(length)) {
+            // FIXME: Is the right exception to throw?
+            throwTypeError(&amp;state, scope);
+            return { };
+        }
+
+        JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
+
+        if (indexingType == JSC::ContiguousShape) {
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
+                if (!indexValue)
+                    result.uncheckedAppend(0);
+                else {
+                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                    RETURN_IF_EXCEPTION(scope, { });
+
+                    result.uncheckedAppend(convertedValue);
+                }
+            }
+            return result;
+        }
+        
+        if (indexingType == JSC::Int32Shape) {
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto indexValue = array-&gt;butterfly()-&gt;contiguousInt32()[i].get();
+                ASSERT(!indexValue || indexValue.isInt32());
+                if (!indexValue)
+                    result.uncheckedAppend(0);
+                else
+                    result.uncheckedAppend(indexValue.asInt32());
+            }
+            return result;
+        }
+
+        if (indexingType == JSC::DoubleShape) {
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto doubleValue = array-&gt;butterfly()-&gt;contiguousDouble()[i];
+                if (std::isnan(doubleValue))
+                    result.uncheckedAppend(0);
+                else {
+                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, scope, doubleValue);
+                    RETURN_IF_EXCEPTION(scope, { });
+
+                    result.uncheckedAppend(convertedValue);
+                }
+            }
+            return result;
+        }
+
+        for (unsigned i = 0; i &lt; length; i++) {
+            auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
+            RETURN_IF_EXCEPTION(scope, { });
+            
+            if (!indexValue)
+                result.uncheckedAppend(0);
+            else {
+                auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                RETURN_IF_EXCEPTION(scope, { });
+                
+                result.uncheckedAppend(convertedValue);
+            }
+        }
+        return result;
+    }
+};
+
+template&lt;typename IDLType&gt;
+struct SequenceConverter {
+    using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
+    using ReturnType = typename GenericConverter::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 { };
+        }
+
+        JSC::JSObject* object = JSC::asObject(value);
+        if (!JSC::isJSArray(object))
+            return GenericConverter::convert(state, object);
+
+        JSC::JSArray* array = JSC::asArray(object);
+        if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
+            return GenericConverter::convert(state, object);
+
+        unsigned length = array-&gt;length();
+
+        ReturnType result;
+        if (!result.tryReserveCapacity(length)) {
+            // FIXME: Is the right exception to throw?
+            throwTypeError(&amp;state, scope);
+            return { };
+        }
+
+        JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
+
+        if (indexingType == JSC::ContiguousShape) {
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
+                if (!indexValue)
+                    indexValue = JSC::jsUndefined();
+
+                auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                RETURN_IF_EXCEPTION(scope, { });
+
+                result.uncheckedAppend(convertedValue);
+            }
+            return result;
+        }
+
+        for (unsigned i = 0; i &lt; length; i++) {
+            auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
+            RETURN_IF_EXCEPTION(scope, { });
+
+            if (!indexValue)
+                indexValue = JSC::jsUndefined();
+
+            auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+            RETURN_IF_EXCEPTION(scope, { });
+            
+            result.uncheckedAppend(convertedValue);
+        }
+        return result;
+    }
+};
+
+template&lt;&gt;
+struct SequenceConverter&lt;IDLLong&gt; {
+    using ReturnType = typename GenericSequenceConverter&lt;IDLLong&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return NumericSequenceConverter&lt;IDLLong&gt;::convert(state, value);
+    }
+};
+
+template&lt;&gt;
+struct SequenceConverter&lt;IDLFloat&gt; {
+    using ReturnType = typename GenericSequenceConverter&lt;IDLFloat&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return NumericSequenceConverter&lt;IDLFloat&gt;::convert(state, value);
+    }
+};
+
+template&lt;&gt;
+struct SequenceConverter&lt;IDLUnrestrictedFloat&gt; {
+    using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return NumericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::convert(state, value);
+    }
+};
+
+template&lt;&gt;
+struct SequenceConverter&lt;IDLDouble&gt; {
+    using ReturnType = typename GenericSequenceConverter&lt;IDLDouble&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return NumericSequenceConverter&lt;IDLDouble&gt;::convert(state, value);
+    }
+};
+
+template&lt;&gt;
+struct SequenceConverter&lt;IDLUnrestrictedDouble&gt; {
+    using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return NumericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::convert(state, value);
+    }
+};
+
+}
+
+template&lt;typename T&gt; struct Converter&lt;IDLSequence&lt;T&gt;&gt; : DefaultConverter&lt;IDLSequence&lt;T&gt;&gt; {
+    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLSequence&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template&lt;typename U, size_t inlineCapacity&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; exec, JSDOMGlobalObject&amp; globalObject, const Vector&lt;U, inlineCapacity&gt;&amp; vector)
+    {
+        JSC::MarkedArgumentBuffer list;
+        for (auto&amp; element : vector)
+            list.append(toJS&lt;T&gt;(exec, globalObject, element));
+        return JSC::constructArray(&amp;exec, nullptr, &amp;globalObject, list);
+    }
+};
+
+template&lt;typename T&gt; struct Converter&lt;IDLFrozenArray&lt;T&gt;&gt; : DefaultConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
+    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template&lt;typename U, size_t inlineCapacity&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; exec, JSDOMGlobalObject&amp; globalObject, const Vector&lt;U, inlineCapacity&gt;&amp; vector)
+    {
+        JSC::MarkedArgumentBuffer list;
+        for (auto&amp; element : vector)
+            list.append(toJS&lt;T&gt;(exec, globalObject, element));
+        auto* array = JSC::constructArray(&amp;exec, nullptr, &amp;globalObject, list);
+        return JSC::objectConstructorFreeze(&amp;exec, array);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertSerializedScriptValuehfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertSerializedScriptValue.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertSerializedScriptValue.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertSerializedScriptValue.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertStrings.h&quot;
+
+namespace WebCore {
+
+template&lt;typename T&gt; struct Converter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; : DefaultConverter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; {
+    static RefPtr&lt;T&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return T::create(state, value);
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLSerializedScriptValue&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, RefPtr&lt;T&gt; value)
+    {
+        return value ? value-&gt;deserialize(state, &amp;globalObject) : JSC::jsNull();
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertStringscppfromrev211548trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+/*
+ *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ *  Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ *  Copyright (C) 2007 Samuel Weinig &lt;sam@webkit.org&gt;
+ *  Copyright (C) 2013 Michael Pruett &lt;michael@68k.org&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSDOMConvertStrings.h&quot;
+
+#include &quot;JSDOMExceptionHandling.h&quot;
+#include &lt;heap/HeapInlines.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;wtf/text/StringBuilder.h&gt;
+#include &lt;wtf/unicode/CharacterNames.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+static inline String stringToByteString(ExecState&amp; state, JSC::ThrowScope&amp; scope, String&amp;&amp; string)
+{
+    if (!string.containsOnlyLatin1()) {
+        throwTypeError(&amp;state, scope);
+        return { };
+    }
+
+    return string;
+}
+
+String identifierToByteString(ExecState&amp; state, const Identifier&amp; identifier)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    auto string = identifier.string();
+    return stringToByteString(state, scope, WTFMove(string));
+}
+
+String valueToByteString(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    auto string = value.toWTFString(&amp;state);
+    RETURN_IF_EXCEPTION(scope, { });
+
+    return stringToByteString(state, scope, WTFMove(string));
+}
+
+static inline bool hasUnpairedSurrogate(StringView string)
+{
+    // Fast path for 8-bit strings; they can't have any surrogates.
+    if (string.is8Bit())
+        return false;
+    for (auto codePoint : string.codePoints()) {
+        if (U_IS_SURROGATE(codePoint))
+            return true;
+    }
+    return false;
+}
+
+static inline String stringToUSVString(String&amp;&amp; string)
+{
+    // Fast path for the case where there are no unpaired surrogates.
+    if (!hasUnpairedSurrogate(string))
+        return string;
+
+    // Slow path: http://heycam.github.io/webidl/#dfn-obtain-unicode
+    // Replaces unpaired surrogates with the replacement character.
+    StringBuilder result;
+    result.reserveCapacity(string.length());
+    StringView view { string };
+    for (auto codePoint : view.codePoints()) {
+        if (U_IS_SURROGATE(codePoint))
+            result.append(replacementCharacter);
+        else
+            result.append(codePoint);
+    }
+    return result.toString();
+}
+
+String identifierToUSVString(ExecState&amp;, const Identifier&amp; identifier)
+{
+    auto string = identifier.string();
+    return stringToUSVString(WTFMove(string));
+}
+
+String valueToUSVString(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    auto string = value.toWTFString(&amp;state);
+    RETURN_IF_EXCEPTION(scope, { });
+
+    return stringToUSVString(WTFMove(string));
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertStringshfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,108 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+#include &quot;JSDOMExceptionHandling.h&quot;
+
+namespace WebCore {
+
+enum class StringConversionConfiguration { Normal, TreatNullAsEmptyString };
+
+template&lt;typename T&gt; typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp;, JSC::JSValue, StringConversionConfiguration);
+
+template&lt;typename T&gt; inline typename Converter&lt;T&gt;::ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration)
+{
+    return Converter&lt;T&gt;::convert(state, value, configuration);
+}
+
+WEBCORE_EXPORT String identifierToByteString(JSC::ExecState&amp;, const JSC::Identifier&amp;);
+WEBCORE_EXPORT String valueToByteString(JSC::ExecState&amp;, JSC::JSValue);
+WEBCORE_EXPORT String identifierToUSVString(JSC::ExecState&amp;, const JSC::Identifier&amp;);
+WEBCORE_EXPORT String valueToUSVString(JSC::ExecState&amp;, JSC::JSValue);
+
+// 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, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
+    {
+        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
+            return emptyString();
+        return value.toWTFString(&amp;state);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLDOMString&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
+    {
+        return JSC::jsStringWithCache(&amp;state, value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLByteString&gt; : DefaultConverter&lt;IDLByteString&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
+    {
+        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
+            return emptyString();
+        return valueToByteString(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLByteString&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
+    {
+        return JSC::jsStringWithCache(&amp;state, value);
+    }
+};
+
+template&lt;&gt; struct Converter&lt;IDLUSVString&gt; : DefaultConverter&lt;IDLUSVString&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value, StringConversionConfiguration configuration = StringConversionConfiguration::Normal)
+    {
+        if (configuration == StringConversionConfiguration::TreatNullAsEmptyString &amp;&amp; value.isNull())
+            return emptyString();
+        return valueToUSVString(state, value);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLUSVString&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
+    {
+        return JSC::jsStringWithCache(&amp;state, value);
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertUnionhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,285 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMBinding.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;typename ReturnType, typename T, bool enabled&gt;
+struct ConditionalConverter;
+
+template&lt;typename ReturnType, typename T&gt;
+struct ConditionalConverter&lt;ReturnType, T, true&gt; {
+    static std::optional&lt;ReturnType&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return ReturnType(Converter&lt;T&gt;::convert(state, value));
+    }
+};
+
+template&lt;typename ReturnType, typename T&gt;
+struct ConditionalConverter&lt;ReturnType, T, false&gt; {
+    static std::optional&lt;ReturnType&gt; convert(JSC::ExecState&amp;, JSC::JSValue)
+    {
+        return std::nullopt;
+    }
+};
+
+namespace Detail {
+
+template&lt;typename List, bool condition&gt;
+struct ConditionalFront;
+
+template&lt;typename List&gt;
+struct ConditionalFront&lt;List, true&gt; {
+    using type = brigand::front&lt;List&gt;;
+};
+
+template&lt;typename List&gt;
+struct ConditionalFront&lt;List, false&gt; {
+    using type = void;
+};
+
+}
+
+template&lt;typename List, bool condition&gt;
+using ConditionalFront = typename Detail::ConditionalFront&lt;List, condition&gt;::type;
+
+template&lt;typename... T&gt; struct Converter&lt;IDLUnion&lt;T...&gt;&gt; : DefaultConverter&lt;IDLUnion&lt;T...&gt;&gt; {
+    using Type = IDLUnion&lt;T...&gt;;
+    using TypeList = typename Type::TypeList;
+    using ReturnType = typename Type::ImplementationType;
+
+    using NumericTypeList = brigand::filter&lt;TypeList, IsIDLNumber&lt;brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfNumericTypes = brigand::size&lt;NumericTypeList&gt;::value;
+    static_assert(numberOfNumericTypes == 0 || numberOfNumericTypes == 1, &quot;There can be 0 or 1 numeric types in an IDLUnion.&quot;);
+    using NumericType = ConditionalFront&lt;NumericTypeList, numberOfNumericTypes != 0&gt;;
+
+    // FIXME: This should also check for IDLEnumeration&lt;T&gt;.
+    using StringTypeList = brigand::filter&lt;TypeList, std::is_base_of&lt;IDLString, brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfStringTypes = brigand::size&lt;StringTypeList&gt;::value;
+    static_assert(numberOfStringTypes == 0 || numberOfStringTypes == 1, &quot;There can be 0 or 1 string types in an IDLUnion.&quot;);
+    using StringType = ConditionalFront&lt;StringTypeList, numberOfStringTypes != 0&gt;;
+
+    using SequenceTypeList = brigand::filter&lt;TypeList, IsIDLSequence&lt;brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfSequenceTypes = brigand::size&lt;SequenceTypeList&gt;::value;
+    static_assert(numberOfSequenceTypes == 0 || numberOfSequenceTypes == 1, &quot;There can be 0 or 1 sequence types in an IDLUnion.&quot;);
+    using SequenceType = ConditionalFront&lt;SequenceTypeList, numberOfSequenceTypes != 0&gt;;
+
+    using FrozenArrayTypeList = brigand::filter&lt;TypeList, IsIDLFrozenArray&lt;brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfFrozenArrayTypes = brigand::size&lt;FrozenArrayTypeList&gt;::value;
+    static_assert(numberOfFrozenArrayTypes == 0 || numberOfFrozenArrayTypes == 1, &quot;There can be 0 or 1 FrozenArray types in an IDLUnion.&quot;);
+    using FrozenArrayType = ConditionalFront&lt;FrozenArrayTypeList, numberOfFrozenArrayTypes != 0&gt;;
+
+    using DictionaryTypeList = brigand::filter&lt;TypeList, IsIDLDictionary&lt;brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfDictionaryTypes = brigand::size&lt;DictionaryTypeList&gt;::value;
+    static_assert(numberOfDictionaryTypes == 0 || numberOfDictionaryTypes == 1, &quot;There can be 0 or 1 dictionary types in an IDLUnion.&quot;);
+    static constexpr bool hasDictionaryType = numberOfDictionaryTypes != 0;
+    using DictionaryType = ConditionalFront&lt;DictionaryTypeList, hasDictionaryType&gt;;
+
+    using RecordTypeList = brigand::filter&lt;TypeList, IsIDLRecord&lt;brigand::_1&gt;&gt;;
+    static constexpr size_t numberOfRecordTypes = brigand::size&lt;RecordTypeList&gt;::value;
+    static_assert(numberOfRecordTypes == 0 || numberOfRecordTypes == 1, &quot;There can be 0 or 1 record types in an IDLUnion.&quot;);
+    static constexpr bool hasRecordType = numberOfRecordTypes != 0;
+    using RecordType = ConditionalFront&lt;RecordTypeList, hasRecordType&gt;;
+
+    static constexpr bool hasObjectType = (numberOfSequenceTypes + numberOfFrozenArrayTypes + numberOfDictionaryTypes + numberOfRecordTypes) &gt; 0;
+
+    using InterfaceTypeList = brigand::filter&lt;TypeList, IsIDLInterface&lt;brigand::_1&gt;&gt;;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        // 1. If the union type includes a nullable type and V is null or undefined, then return the IDL value null.
+        constexpr bool hasNullType = brigand::any&lt;TypeList, std::is_same&lt;IDLNull, brigand::_1&gt;&gt;::value;
+        if (hasNullType) {
+            if (value.isUndefinedOrNull())
+                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLNull, hasNullType&gt;::convert(state, value).value());
+        }
+        
+        // 2. Let types be the flattened member types of the union type.
+        // NOTE: Union is expected to be pre-flattented.
+        
+        // 3. If V is null or undefined then:
+        if (hasDictionaryType || hasRecordType) {
+            if (value.isUndefinedOrNull()) {
+                //     1. If types includes a dictionary type, then return the result of converting V to that dictionary type.
+                if (hasDictionaryType)
+                    return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, DictionaryType, hasDictionaryType&gt;::convert(state, value).value());
+                
+                //     2. If types includes a record type, then return the result of converting V to that record type.
+                if (hasRecordType)
+                    return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, RecordType, hasRecordType&gt;::convert(state, value).value());
+            }
+        }
+
+        // 4. If V is a platform object, then:
+        //     1. If types includes an interface type that V implements, then return the IDL value that is a reference to the object V.
+        //     2. If types includes object, then return the IDL value that is a reference to the object V.
+        //         (FIXME: Add support for object and step 4.2)
+        if (brigand::any&lt;TypeList, IsIDLInterface&lt;brigand::_1&gt;&gt;::value) {
+            std::optional&lt;ReturnType&gt; returnValue;
+            brigand::for_each&lt;InterfaceTypeList&gt;([&amp;](auto&amp;&amp; type) {
+                if (returnValue)
+                    return;
+                
+                using Type = typename WTF::RemoveCVAndReference&lt;decltype(type)&gt;::type::type;
+                using ImplementationType = typename Type::ImplementationType;
+                using RawType = typename Type::RawType;
+                using WrapperType = typename JSDOMWrapperConverterTraits&lt;RawType&gt;::WrapperClass;
+
+                auto castedValue = WrapperType::toWrapped(vm, value);
+                if (!castedValue)
+                    return;
+                
+                returnValue = ReturnType(ImplementationType(castedValue));
+            });
+
+            if (returnValue)
+                return WTFMove(returnValue.value());
+        }
+        
+        // FIXME: Add support for steps 5 - 10.
+
+        // 11. If V is any kind of object, then:
+        if (hasObjectType) {
+            if (value.isCell()) {
+                JSC::JSCell* cell = value.asCell();
+                if (cell-&gt;isObject()) {
+                    // FIXME: We should be able to optimize the following code by making use
+                    // of the fact that we have proved that the value is an object. 
+                
+                    //     1. If types includes a sequence type, then:
+                    //         1. Let method be the result of GetMethod(V, @@iterator).
+                    //         2. ReturnIfAbrupt(method).
+                    //         3. If method is not undefined, return the result of creating a
+                    //            sequence of that type from V and method.        
+                    constexpr bool hasSequenceType = numberOfSequenceTypes != 0;
+                    if (hasSequenceType) {
+                        bool hasIterator = hasIteratorMethod(state, value);
+                        RETURN_IF_EXCEPTION(scope, ReturnType());
+                        if (hasIterator)
+                            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, SequenceType, hasSequenceType&gt;::convert(state, value).value());
+                    }
+
+                    //     2. If types includes a frozen array type, then:
+                    //         1. Let method be the result of GetMethod(V, @@iterator).
+                    //         2. ReturnIfAbrupt(method).
+                    //         3. If method is not undefined, return the result of creating a
+                    //            frozen array of that type from V and method.
+                    constexpr bool hasFrozenArrayType = numberOfFrozenArrayTypes != 0;
+                    if (hasFrozenArrayType) {
+                        bool hasIterator = hasIteratorMethod(state, value);
+                        RETURN_IF_EXCEPTION(scope, ReturnType());
+                        if (hasIterator)
+                            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, FrozenArrayType, hasFrozenArrayType&gt;::convert(state, value).value());
+                    }
+
+                    //     3. If types includes a dictionary type, then return the result of
+                    //        converting V to that dictionary type.
+                    if (hasDictionaryType)
+                        return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, DictionaryType, hasDictionaryType&gt;::convert(state, value).value());
+
+                    //     4. If types includes a record type, then return the result of converting V to that record type.
+                    if (hasRecordType)
+                        return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, RecordType, hasRecordType&gt;::convert(state, value).value());
+
+                    //     5. If types includes a callback interface type, then return the result of converting V to that interface type.
+                    //         (FIXME: Add support for callback interface type and step 12.5)
+                    //     6. If types includes object, then return the IDL value that is a reference to the object V.
+                    //         (FIXME: Add support for object and step 12.6)
+                }
+            }
+        }
+
+        // 12. If V is a Boolean value, then:
+        //     1. If types includes a boolean, then return the result of converting V to boolean.
+        constexpr bool hasBooleanType = brigand::any&lt;TypeList, std::is_same&lt;IDLBoolean, brigand::_1&gt;&gt;::value;
+        if (hasBooleanType) {
+            if (value.isBoolean())
+                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLBoolean, hasBooleanType&gt;::convert(state, value).value());
+        }
+        
+        // 13. If V is a Number value, then:
+        //     1. If types includes a numeric type, then return the result of converting V to that numeric type.
+        constexpr bool hasNumericType = brigand::size&lt;NumericTypeList&gt;::value != 0;
+        if (hasNumericType) {
+            if (value.isNumber())
+                return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, NumericType, hasNumericType&gt;::convert(state, value).value());
+        }
+        
+        // 14. If types includes a string type, then return the result of converting V to that type.
+        constexpr bool hasStringType = brigand::size&lt;StringTypeList&gt;::value != 0;
+        if (hasStringType)
+            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, StringType, hasStringType&gt;::convert(state, value).value());
+
+        // 15. If types includes a numeric type, then return the result of converting V to that numeric type.
+        if (hasNumericType)
+            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, NumericType, hasNumericType&gt;::convert(state, value).value());
+
+        // 16. If types includes a boolean, then return the result of converting V to boolean.
+        if (hasBooleanType)
+            return std::move&lt;WTF::CheckMoveParameter&gt;(ConditionalConverter&lt;ReturnType, IDLBoolean, hasBooleanType&gt;::convert(state, value).value());
+
+        // 17. Throw a TypeError.
+        throwTypeError(&amp;state, scope);
+        return ReturnType();
+    }
+};
+
+template&lt;typename... T&gt; struct JSConverter&lt;IDLUnion&lt;T...&gt;&gt; {
+    using Type = IDLUnion&lt;T...&gt;;
+    using TypeList = typename Type::TypeList;
+    using ImplementationType = typename Type::ImplementationType;
+
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    using Sequence = brigand::make_sequence&lt;brigand::ptrdiff_t&lt;0&gt;, WTF::variant_size&lt;ImplementationType&gt;::value&gt;;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const ImplementationType&amp; variant)
+    {
+        auto index = variant.index();
+
+        std::optional&lt;JSC::JSValue&gt; returnValue;
+        brigand::for_each&lt;Sequence&gt;([&amp;](auto&amp;&amp; type) {
+            using I = typename WTF::RemoveCVAndReference&lt;decltype(type)&gt;::type::type;
+            if (I::value == index) {
+                ASSERT(!returnValue);
+                returnValue = toJS&lt;brigand::at&lt;TypeList, I&gt;&gt;(state, globalObject, WTF::get&lt;I::value&gt;(variant));
+            }
+        });
+
+        ASSERT(returnValue);
+        return returnValue.value();
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertVariadichfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+namespace Detail {
+
+template&lt;typename IDLType&gt;
+struct VariadicConverterBase;
+
+template&lt;typename IDLType&gt; 
+struct VariadicConverterBase {
+    using Item = typename IDLType::ImplementationType;
+
+    static std::optional&lt;Item&gt; convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        auto&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+
+        auto result = Converter&lt;IDLType&gt;::convert(state, value);
+        RETURN_IF_EXCEPTION(scope, std::nullopt);
+
+        return WTFMove(result);
+    }
+};
+
+template&lt;typename T&gt;
+struct VariadicConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
+    using Item = std::reference_wrapper&lt;T&gt;;
+
+    static std::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 std::nullopt;
+        return std::optional&lt;Item&gt;(*result);
+    }
+};
+
+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;
+        std::optional&lt;Container&gt; arguments;
+    };
+};
+
+}
+
+template&lt;typename IDLType&gt; typename Detail::VariadicConverter&lt;IDLType&gt;::Result convertVariadicArguments(JSC::ExecState&amp; state, size_t startIndex)
+{
+    size_t length = state.argumentCount();
+    if (startIndex &gt; length)
+        return { 0, std::nullopt };
+
+    typename Detail::VariadicConverter&lt;IDLType&gt;::Container result;
+    result.reserveInitialCapacity(length - startIndex);
+
+    for (size_t i = startIndex; i &lt; length; ++i) {
+        auto value = Detail::VariadicConverter&lt;IDLType&gt;::convert(state, state.uncheckedArgument(i));
+        if (!value)
+            return { i, std::nullopt };
+        result.uncheckedAppend(WTFMove(*value));
+    }
+
+    return { length, WTFMove(result) };
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertWebGLhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGL)
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; struct JSConverter&lt;IDLWebGLAny&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const WebGLAny&amp; value)
+    {
+        return convertToJSValue(state, globalObject, value);
+    }
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertXPathNSResolverhfromrev211548trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConvertXPathNSResolver.h (from rev 211548, trunk/Source/WebCore/bindings/js/JSDOMConvert.h) (0 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertXPathNSResolver.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertXPathNSResolver.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;IDLTypes.h&quot;
+#include &quot;JSDOMConvertBase.h&quot;
+
+namespace WebCore {
+
+template&lt;typename T&gt; struct Converter&lt;IDLXPathNSResolver&lt;T&gt;&gt; : DefaultConverter&lt;IDLXPathNSResolver&lt;T&gt;&gt; {
+    using ReturnType = RefPtr&lt;T&gt;;
+    using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
+
+    template&lt;typename ExceptionThrower = DefaultExceptionThrower&gt;
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionThrower&amp;&amp; exceptionThrower = ExceptionThrower())
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        ReturnType object = WrapperType::toWrapped(vm, state, value);
+        if (UNLIKELY(!object))
+            exceptionThrower(state, scope);
+        return object;
+    }
+};
+
+template&lt;typename T&gt; struct JSConverter&lt;IDLXPathNSResolver&lt;T&gt;&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    template &lt;typename U&gt;
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const U&amp; value)
+    {
+        return toJS(&amp;state, &amp;globalObject, Detail::getPtrOrRef(value));
+    }
+
+    template&lt;typename U&gt;
+    static JSC::JSValue convertNewlyCreated(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, U&amp;&amp; value)
+    {
+        return toJSNewlyCreated(&amp;state, &amp;globalObject, std::forward&lt;U&gt;(value));
+    }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSImageDataCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -26,8 +26,10 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSImageData.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;ImageData.h&quot;
-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvertBufferSource.h&quot;
+#include &quot;JSDOMWrapperCache.h&quot;
+#include &lt;heap/HeapInlines.h&gt;
+#include &lt;runtime/IdentifierInlines.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamDefaultControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> #if ENABLE(READABLE_STREAM_API)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebCoreJSClientData.h&quot;
</span><ins>+#include &lt;heap/HeapInlines.h&gt;
+#include &lt;runtime/IdentifierInlines.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamDefaultControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.h (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.h        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamDefaultController.h        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(READABLE_STREAM_API)
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvertBufferSource.h&quot;
</ins><span class="cx"> #include &quot;JSReadableStreamDefaultController.h&quot;
</span><span class="cx"> #include &lt;runtime/JSCJSValue.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCJSValueInlines.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreTypedArrayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebCoreTypedArrayController.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvertBufferSource.h&quot;
</ins><span class="cx"> #include &quot;JSDOMGlobalObject.h&quot;
</span><span class="cx"> #include &lt;runtime/ArrayBuffer.h&gt;
</span><span class="cx"> #include &lt;runtime/JSArrayBuffer.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -4681,7 +4681,7 @@
</span><span class="cx">         my $value = $name;
</span><span class="cx"> 
</span><span class="cx">         if ($argument-&gt;isVariadic) {
</span><del>-            AddToImplIncludes(&quot;JSDOMConvert.h&quot;, $conditional);
</del><ins>+            AddToImplIncludes(&quot;JSDOMConvertVariadic.h&quot;, $conditional);
</ins><span class="cx">             AddToImplIncludesForIDLType($type, $conditional);
</span><span class="cx">         
</span><span class="cx">             my $IDLType = GetIDLType($interface, $type);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLAnycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLAny.cpp (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLAny.cpp        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/html/canvas/WebGLAny.cpp        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMBinding.h&quot;
</del><ins>+#include &quot;JSDOMConvert.h&quot;
</ins><span class="cx"> #include &quot;JSWebGLBuffer.h&quot;
</span><span class="cx"> #include &quot;JSWebGLFramebuffer.h&quot;
</span><span class="cx"> #include &quot;JSWebGLProgram.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacSerializedPlatformRepresentationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm (211820 => 211821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm        2017-02-07 18:53:01 UTC (rev 211820)
+++ trunk/Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm        2017-02-07 18:55:24 UTC (rev 211821)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #if ENABLE(VIDEO_TRACK) &amp;&amp; ENABLE(DATACUE_VALUE)
</span><span class="cx"> #include &quot;SerializedPlatformRepresentationMac.h&quot;
</span><span class="cx"> 
</span><del>-#import &quot;JSDOMBinding.h&quot;
</del><ins>+#import &quot;JSDOMConvertBufferSource.h&quot;
</ins><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #import &lt;AVFoundation/AVMetadataItem.h&gt;
</span><span class="cx"> #import &lt;Foundation/NSString.h&gt;
</span><span class="lines">@@ -146,10 +146,10 @@
</span><span class="cx"> {
</span><span class="cx">     auto dataArray = ArrayBuffer::tryCreate([data bytes], [data length]);
</span><span class="cx"> 
</span><del>-    JSC::ExecState* exec = toJS([context JSGlobalContextRef]);
-    JSC::JSValue array = toJS(exec, JSC::jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), dataArray.get());
</del><ins>+    auto* state = toJS([context JSGlobalContextRef]);
+    JSC::JSValue array = toJS(state, JSC::jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), dataArray.get());
</ins><span class="cx"> 
</span><del>-    return [JSValue valueWithJSValueRef:toRef(exec, array) inContext:context];
</del><ins>+    return [JSValue valueWithJSValueRef:toRef(state, array) inContext:context];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static JSValue *jsValueWithArrayInContext(NSArray *array, JSContext *context)
</span></span></pre>
</div>
</div>

</body>
</html>