<!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>[207715] trunk/Source</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/207715">207715</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-22 13:46:34 -0700 (Sat, 22 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebGLRenderingContextBase.bufferData() should use a union instead of overloading
https://bugs.webkit.org/show_bug.cgi?id=163795

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::data):
Add a data() method which aliases baseAddress() to align the API with
ArrayBuffer and reduce special handling at call sites.

* runtime/JSArrayBuffer.h:
(JSC::toArrayBuffer):
(JSC::JSArrayBuffer::toWrapped):
Add toWrapped() method similarly with WebCore wrapper types to
reduce special handling of JSArrayBuffer type.

* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::toWrapped):
* runtime/JSArrayBufferView.h:
Add toWrapped() method similarly with WebCore wrapper types to
reduce special handling of JSArrayBufferView type.

Source/WebCore:

WebGLRenderingContextBase.bufferData() / bufferSubData() should use a union
instead of overloading:
- https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14

No new tests, no web-exposed behavior change.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter&lt;IDLInterface&lt;T&gt;&gt;::convert):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSInterfaceName.h:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCEReactions.h:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestIterable.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerialization.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::bufferData):
(WebCore::WebGL2RenderingContext::bufferSubData):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeArrayBufferViewh">trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferh">trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferViewcpp">trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferViewh">trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSInterfaceNameh">trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsStringifierh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestExceptionh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachableh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestIterableh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenerh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodeh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministich">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequenceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializationh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSattributeh">trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSreadonlyh">trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-10-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        WebGLRenderingContextBase.bufferData() should use a union instead of overloading
+        https://bugs.webkit.org/show_bug.cgi?id=163795
+
+        Reviewed by Darin Adler.
+
+        * runtime/ArrayBufferView.h:
+        (JSC::ArrayBufferView::data):
+        Add a data() method which aliases baseAddress() to align the API with
+        ArrayBuffer and reduce special handling at call sites.
+
+        * runtime/JSArrayBuffer.h:
+        (JSC::toArrayBuffer):
+        (JSC::JSArrayBuffer::toWrapped):
+        Add toWrapped() method similarly with WebCore wrapper types to
+        reduce special handling of JSArrayBuffer type.
+
+        * runtime/JSArrayBufferView.cpp:
+        (JSC::JSArrayBufferView::toWrapped):
+        * runtime/JSArrayBufferView.h:
+        Add toWrapped() method similarly with WebCore wrapper types to
+        reduce special handling of JSArrayBufferView type.
+
</ins><span class="cx"> 2016-10-21  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Slow and big Heap methods should not be inline
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeArrayBufferViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -62,6 +62,8 @@
</span><span class="cx">         return m_baseAddress;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void* data() const { return baseAddress(); }
+
</ins><span class="cx">     unsigned byteOffset() const
</span><span class="cx">     {
</span><span class="cx">         if (isNeutered())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -46,6 +46,8 @@
</span><span class="cx">     ArrayBuffer* impl() const { return m_impl; }
</span><span class="cx">     
</span><span class="cx">     static Structure* createStructure(VM&amp;, JSGlobalObject*, JSValue prototype);
</span><ins>+
+    static ArrayBuffer* toWrapped(JSValue);
</ins><span class="cx">     
</span><span class="cx">     DECLARE_EXPORT_INFO;
</span><span class="cx">     
</span><span class="lines">@@ -67,8 +69,13 @@
</span><span class="cx"> {
</span><span class="cx">     JSArrayBuffer* wrapper = jsDynamicCast&lt;JSArrayBuffer*&gt;(value);
</span><span class="cx">     if (!wrapper)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     return wrapper-&gt;impl();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline ArrayBuffer* JSArrayBuffer::toWrapped(JSValue value)
+{
+    return toArrayBuffer(value);
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -186,6 +186,14 @@
</span><span class="cx">         fastFree(thisObject-&gt;m_vector.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RefPtr&lt;ArrayBufferView&gt; JSArrayBufferView::toWrapped(JSValue value)
+{
+    auto* wrapper = jsDynamicCast&lt;JSArrayBufferView*&gt;(value);
+    if (!wrapper)
+        return nullptr;
+    return wrapper-&gt;impl();
+}
+
</ins><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -174,6 +174,8 @@
</span><span class="cx">     static ptrdiff_t offsetOfLength() { return OBJECT_OFFSETOF(JSArrayBufferView, m_length); }
</span><span class="cx">     static ptrdiff_t offsetOfMode() { return OBJECT_OFFSETOF(JSArrayBufferView, m_mode); }
</span><span class="cx"> 
</span><ins>+    JS_EXPORT_PRIVATE static RefPtr&lt;ArrayBufferView&gt; toWrapped(JSValue);
+
</ins><span class="cx"> private:
</span><span class="cx">     static void finalize(JSCell*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/ChangeLog        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-10-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        WebGLRenderingContextBase.bufferData() should use a union instead of overloading
+        https://bugs.webkit.org/show_bug.cgi?id=163795
+
+        Reviewed by Darin Adler.
+
+        WebGLRenderingContextBase.bufferData() / bufferSubData() should use a union
+        instead of overloading:
+        - https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14
+
+        No new tests, no web-exposed behavior change.
+
+        * bindings/js/JSDOMConvert.h:
+        (WebCore::Converter&lt;IDLInterface&lt;T&gt;&gt;::convert):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        * bindings/scripts/test/JS/JSInterfaceName.h:
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+        * bindings/scripts/test/JS/JSTestCEReactions.h:
+        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
+        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+        * bindings/scripts/test/JS/JSTestEventConstructor.h:
+        * bindings/scripts/test/JS/JSTestEventTarget.h:
+        * bindings/scripts/test/JS/JSTestException.h:
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+        * bindings/scripts/test/JS/JSTestGlobalObject.h:
+        * bindings/scripts/test/JS/JSTestInterface.h:
+        * bindings/scripts/test/JS/JSTestIterable.h:
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+        * bindings/scripts/test/JS/JSTestNode.h:
+        * bindings/scripts/test/JS/JSTestNondeterministic.h:
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
+        * bindings/scripts/test/JS/JSTestSerialization.h:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+        * bindings/scripts/test/JS/JSTestTypedefs.h:
+        * bindings/scripts/test/JS/JSattribute.h:
+        * bindings/scripts/test/JS/JSreadonly.h:
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::bufferData):
+        (WebCore::WebGL2RenderingContext::bufferSubData):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::bufferData):
+        (WebCore::WebGLRenderingContextBase::bufferSubData):
+        * html/canvas/WebGLRenderingContextBase.h:
+        * html/canvas/WebGLRenderingContextBase.idl:
+
</ins><span class="cx"> 2016-10-22  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] REGRESSION (r204508): Crash in init_WebCreateFragment when pasting (seen in multiple apps using legacy WebKit)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -104,18 +104,30 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+// 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;;
+};
+
</ins><span class="cx"> // MARK: -
</span><span class="cx"> // MARK: Interface type
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T&gt; struct Converter&lt;IDLInterface&lt;T&gt;&gt; : DefaultConverter&lt;IDLInterface&lt;T&gt;&gt; {
</span><del>-    using ReturnType = T*;
</del><ins>+    using ReturnType = typename JSDOMWrapperConverterTraits&lt;T&gt;::ToWrappedReturnType;
</ins><span class="cx">     using WrapperType = typename JSDOMWrapperConverterTraits&lt;T&gt;::WrapperClass;
</span><span class="cx"> 
</span><del>-    static T* convert(JSC::ExecState&amp; state, JSC::JSValue value)
</del><ins>+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
</ins><span class="cx">     {
</span><span class="cx">         JSC::VM&amp; vm = state.vm();
</span><span class="cx">         auto scope = DECLARE_THROW_SCOPE(vm);
</span><del>-        T* object = WrapperType::toWrapped(value);
</del><ins>+        ReturnType object = WrapperType::toWrapped(value);
</ins><span class="cx">         if (!object)
</span><span class="cx">             throwTypeError(&amp;state, scope);
</span><span class="cx">         return object;
</span><span class="lines">@@ -122,7 +134,6 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> // Typed arrays support.
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename Adaptor&gt; struct IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt; : IDLType&lt;Ref&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt; {
</span><span class="lines">@@ -540,7 +551,7 @@
</span><span class="cx">                 using ImplementationType = typename WTF::RemoveCVAndReference&lt;decltype(type)&gt;::type::type::RawType;
</span><span class="cx">                 using WrapperType = typename JSDOMWrapperConverterTraits&lt;ImplementationType&gt;::WrapperClass;
</span><span class="cx"> 
</span><del>-                auto* castedValue = WrapperType::toWrapped(value);
</del><ins>+                auto castedValue = WrapperType::toWrapped(value);
</ins><span class="cx">                 if (!castedValue)
</span><span class="cx">                     return;
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -1732,6 +1732,7 @@
</span><span class="cx">     if (NeedsImplementationClass($interface)) {
</span><span class="cx">         push(@headerContent, &quot;template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;${implType}&gt; {\n&quot;);
</span><span class="cx">         push(@headerContent, &quot;    using WrapperClass = ${className};\n&quot;);
</span><ins>+        push(@headerContent, &quot;    using ToWrappedReturnType = ${implType}*;\n&quot;);
</ins><span class="cx">         push(@headerContent, &quot;};\n&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSInterfaceNameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;InterfaceName&gt; {
</span><span class="cx">     using WrapperClass = JSInterfaceName;
</span><ins>+    using ToWrappedReturnType = InterfaceName*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestActiveDOMObject&gt; {
</span><span class="cx">     using WrapperClass = JSTestActiveDOMObject;
</span><ins>+    using ToWrappedReturnType = TestActiveDOMObject*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestCEReactions&gt; {
</span><span class="cx">     using WrapperClass = JSTestCEReactions;
</span><ins>+    using ToWrappedReturnType = TestCEReactions*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsStringifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestCEReactionsStringifier&gt; {
</span><span class="cx">     using WrapperClass = JSTestCEReactionsStringifier;
</span><ins>+    using ToWrappedReturnType = TestCEReactionsStringifier*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestClassWithJSBuiltinConstructor&gt; {
</span><span class="cx">     using WrapperClass = JSTestClassWithJSBuiltinConstructor;
</span><ins>+    using ToWrappedReturnType = TestClassWithJSBuiltinConstructor*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestCustomConstructorWithNoInterfaceObject&gt; {
</span><span class="cx">     using WrapperClass = JSTestCustomConstructorWithNoInterfaceObject;
</span><ins>+    using ToWrappedReturnType = TestCustomConstructorWithNoInterfaceObject*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestCustomNamedGetter&gt; {
</span><span class="cx">     using WrapperClass = JSTestCustomNamedGetter;
</span><ins>+    using ToWrappedReturnType = TestCustomNamedGetter*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestEventConstructor&gt; {
</span><span class="cx">     using WrapperClass = JSTestEventConstructor;
</span><ins>+    using ToWrappedReturnType = TestEventConstructor*;
</ins><span class="cx"> };
</span><span class="cx"> template&lt;&gt; TestEventConstructor::Init convertDictionary&lt;TestEventConstructor::Init&gt;(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestEventTarget&gt; {
</span><span class="cx">     using WrapperClass = JSTestEventTarget;
</span><ins>+    using ToWrappedReturnType = TestEventTarget*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestException&gt; {
</span><span class="cx">     using WrapperClass = JSTestException;
</span><ins>+    using ToWrappedReturnType = TestException*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestGenerateIsReachable&gt; {
</span><span class="cx">     using WrapperClass = JSTestGenerateIsReachable;
</span><ins>+    using ToWrappedReturnType = TestGenerateIsReachable*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -114,6 +114,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestGlobalObject&gt; {
</span><span class="cx">     using WrapperClass = JSTestGlobalObject;
</span><ins>+    using ToWrappedReturnType = TestGlobalObject*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -111,6 +111,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestInterface&gt; {
</span><span class="cx">     using WrapperClass = JSTestInterface;
</span><ins>+    using ToWrappedReturnType = TestInterface*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestIterableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestIterable&gt; {
</span><span class="cx">     using WrapperClass = JSTestIterable;
</span><ins>+    using ToWrappedReturnType = TestIterable*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestMediaQueryListListener&gt; {
</span><span class="cx">     using WrapperClass = JSTestMediaQueryListListener;
</span><ins>+    using ToWrappedReturnType = TestMediaQueryListListener*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestNamedConstructor&gt; {
</span><span class="cx">     using WrapperClass = JSTestNamedConstructor;
</span><ins>+    using ToWrappedReturnType = TestNamedConstructor*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestNode&gt; {
</span><span class="cx">     using WrapperClass = JSTestNode;
</span><ins>+    using ToWrappedReturnType = TestNode*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestNondeterministic&gt; {
</span><span class="cx">     using WrapperClass = JSTestNondeterministic;
</span><ins>+    using ToWrappedReturnType = TestNondeterministic*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestObj&gt; {
</span><span class="cx">     using WrapperClass = JSTestObj;
</span><ins>+    using ToWrappedReturnType = TestObj*;
</ins><span class="cx"> };
</span><span class="cx"> JSC::JSString* jsStringWithCache(JSC::ExecState*, TestObj::EnumType);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestOverloadedConstructors&gt; {
</span><span class="cx">     using WrapperClass = JSTestOverloadedConstructors;
</span><ins>+    using ToWrappedReturnType = TestOverloadedConstructors*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequenceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestOverloadedConstructorsWithSequence&gt; {
</span><span class="cx">     using WrapperClass = JSTestOverloadedConstructorsWithSequence;
</span><ins>+    using ToWrappedReturnType = TestOverloadedConstructorsWithSequence*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestOverrideBuiltins&gt; {
</span><span class="cx">     using WrapperClass = JSTestOverrideBuiltins;
</span><ins>+    using ToWrappedReturnType = TestOverrideBuiltins*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestSerialization&gt; {
</span><span class="cx">     using WrapperClass = JSTestSerialization;
</span><ins>+    using ToWrappedReturnType = TestSerialization*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestSerializedScriptValueInterface&gt; {
</span><span class="cx">     using WrapperClass = JSTestSerializedScriptValueInterface;
</span><ins>+    using ToWrappedReturnType = TestSerializedScriptValueInterface*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestTypedefs&gt; {
</span><span class="cx">     using WrapperClass = JSTestTypedefs;
</span><ins>+    using ToWrappedReturnType = TestTypedefs*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;attribute&gt; {
</span><span class="cx">     using WrapperClass = JSattribute;
</span><ins>+    using ToWrappedReturnType = attribute*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSreadonlyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;readonly&gt; {
</span><span class="cx">     using WrapperClass = JSreadonly;
</span><ins>+    using ToWrappedReturnType = readonly*;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::OUT_OF_MEMORY, &quot;bufferData&quot;, &quot;Could not create intermediate ArrayBufferView&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    WebGLRenderingContextBase::bufferData(target, slice.get(), usage);
</del><ins>+    WebGLRenderingContextBase::bufferData(target, BufferDataSource(slice.get()), usage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebGL2RenderingContext::bufferSubData(GC3Denum target, long long offset, ArrayBufferView&amp; data, GC3Duint srcOffset, GC3Duint length)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::OUT_OF_MEMORY, &quot;bufferData&quot;, &quot;Could not create intermediate ArrayBufferView&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    WebGLRenderingContextBase::bufferSubData(target, offset, slice);
</del><ins>+    WebGLRenderingContextBase::bufferSubData(target, offset, BufferDataSource(slice.get()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebGL2RenderingContext::copyBufferSubData(GC3Denum, GC3Denum, GC3Dint64, GC3Dint64, GC3Dint64)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -1075,7 +1075,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage)
</del><ins>+void WebGLRenderingContextBase::bufferData(GC3Denum target, Optional&lt;BufferDataSource&gt;&amp;&amp; data, GC3Denum usage)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending())
</span><span class="cx">         return;
</span><span class="lines">@@ -1086,48 +1086,25 @@
</span><span class="cx">     WebGLBuffer* buffer = validateBufferDataParameters(&quot;bufferData&quot;, target, usage);
</span><span class="cx">     if (!buffer)
</span><span class="cx">         return;
</span><del>-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!buffer-&gt;associateBufferData(data)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
-            return;
</del><ins>+
+    WTF::visit([&amp;](auto&amp; data) {
+        if (!this-&gt;isErrorGeneratedOnOutOfBoundsAccesses()) {
+            if (!buffer-&gt;associateBufferData(data.get())) {
+                this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
+                return;
+            }
</ins><span class="cx">         }
</span><del>-    }
</del><span class="cx"> 
</span><del>-    m_context-&gt;moveErrorsToSyntheticErrorList();
-    m_context-&gt;bufferData(target, data-&gt;byteLength(), data-&gt;data(), usage);
-    if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
-        // The bufferData function failed. Tell the buffer it doesn't have the data it thinks it does.
-        buffer-&gt;disassociateBufferData();
-    }
-}
-
-void WebGLRenderingContextBase::bufferData(GC3Denum target, RefPtr&lt;ArrayBufferView&gt;&amp;&amp; data, GC3Denum usage)
-{
-    if (isContextLostOrPending())
-        return;
-    if (!data) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;null data&quot;);
-        return;
-    }
-    WebGLBuffer* buffer = validateBufferDataParameters(&quot;bufferData&quot;, target, usage);
-    if (!buffer)
-        return;
-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!buffer-&gt;associateBufferData(data.get())) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
-            return;
</del><ins>+        m_context-&gt;moveErrorsToSyntheticErrorList();
+        m_context-&gt;bufferData(target, data-&gt;byteLength(), data-&gt;data(), usage);
+        if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
+            // The bufferData function failed. Tell the buffer it doesn't have the data it thinks it does.
+            buffer-&gt;disassociateBufferData();
</ins><span class="cx">         }
</span><del>-    }
-
-    m_context-&gt;moveErrorsToSyntheticErrorList();
-    m_context-&gt;bufferData(target, data-&gt;byteLength(), data-&gt;baseAddress(), usage);
-    if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
-        // The bufferData function failed. Tell the buffer it doesn't have the data it thinks it does.
-        buffer-&gt;disassociateBufferData();
-    }
</del><ins>+    }, data.value());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data)
</del><ins>+void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, Optional&lt;BufferDataSource&gt;&amp;&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending())
</span><span class="cx">         return;
</span><span class="lines">@@ -1140,47 +1117,22 @@
</span><span class="cx">     }
</span><span class="cx">     if (!data)
</span><span class="cx">         return;
</span><del>-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!buffer-&gt;associateBufferSubData(static_cast&lt;GC3Dintptr&gt;(offset), data)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset out of range&quot;);
-            return;
</del><ins>+
+    WTF::visit([&amp;](auto&amp; data) {
+        if (!this-&gt;isErrorGeneratedOnOutOfBoundsAccesses()) {
+            if (!buffer-&gt;associateBufferSubData(static_cast&lt;GC3Dintptr&gt;(offset), data.get())) {
+                this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset out of range&quot;);
+                return;
+            }
</ins><span class="cx">         }
</span><del>-    }
</del><span class="cx"> 
</span><del>-    m_context-&gt;moveErrorsToSyntheticErrorList();
-    m_context-&gt;bufferSubData(target, static_cast&lt;GC3Dintptr&gt;(offset), data-&gt;byteLength(), data-&gt;data());
-    if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
-        // The bufferSubData function failed. Tell the buffer it doesn't have the data it thinks it does.
-        buffer-&gt;disassociateBufferData();
-    }
-}
-
-void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, RefPtr&lt;ArrayBufferView&gt;&amp;&amp; data)
-{
-    if (isContextLostOrPending())
-        return;
-    WebGLBuffer* buffer = validateBufferDataParameters(&quot;bufferSubData&quot;, target, GraphicsContext3D::STATIC_DRAW);
-    if (!buffer)
-        return;
-    if (offset &lt; 0) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset &lt; 0&quot;);
-        return;
-    }
-    if (!data)
-        return;
-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!buffer-&gt;associateBufferSubData(static_cast&lt;GC3Dintptr&gt;(offset), data.get())) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset out of range&quot;);
-            return;
</del><ins>+        m_context-&gt;moveErrorsToSyntheticErrorList();
+        m_context-&gt;bufferSubData(target, static_cast&lt;GC3Dintptr&gt;(offset), data-&gt;byteLength(), data-&gt;data());
+        if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
+            // The bufferSubData function failed. Tell the buffer it doesn't have the data it thinks it does.
+            buffer-&gt;disassociateBufferData();
</ins><span class="cx">         }
</span><del>-    }
-
-    m_context-&gt;moveErrorsToSyntheticErrorList();
-    m_context-&gt;bufferSubData(target, static_cast&lt;GC3Dintptr&gt;(offset), data-&gt;byteLength(), data-&gt;baseAddress());
-    if (m_context-&gt;moveErrorsToSyntheticErrorList()) {
-        // The bufferSubData function failed. Tell the buffer it doesn't have the data it thinks it does.
-        buffer-&gt;disassociateBufferData();
-    }
</del><ins>+    }, data.value());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GC3Denum WebGLRenderingContextBase::checkFramebufferStatus(GC3Denum target)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;runtime/Float32Array.h&gt;
</span><span class="cx"> #include &lt;runtime/Int32Array.h&gt;
</span><ins>+#include &lt;wtf/Variant.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -138,11 +139,10 @@
</span><span class="cx">     void blendFunc(GC3Denum sfactor, GC3Denum dfactor);
</span><span class="cx">     void blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha);
</span><span class="cx"> 
</span><ins>+    using BufferDataSource = WTF::Variant&lt;RefPtr&lt;ArrayBuffer&gt;, RefPtr&lt;ArrayBufferView&gt;&gt;;
</ins><span class="cx">     void bufferData(GC3Denum target, long long size, GC3Denum usage);
</span><del>-    void bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage);
-    void bufferData(GC3Denum target, RefPtr&lt;ArrayBufferView&gt;&amp;&amp; data, GC3Denum usage);
-    void bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data);
-    void bufferSubData(GC3Denum target, long long offset, RefPtr&lt;ArrayBufferView&gt;&amp;&amp; data);
</del><ins>+    void bufferData(GC3Denum target, Optional&lt;BufferDataSource&gt;&amp;&amp;, GC3Denum usage);
+    void bufferSubData(GC3Denum target, long long offset, Optional&lt;BufferDataSource&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     GC3Denum checkFramebufferStatus(GC3Denum target);
</span><span class="cx">     virtual void clear(GC3Dbitfield mask) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (207714 => 207715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2016-10-22 19:34:46 UTC (rev 207714)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2016-10-22 20:46:34 UTC (rev 207715)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> typedef unsigned long  GLuint;
</span><span class="cx"> typedef unrestricted float GLfloat;
</span><span class="cx"> typedef unrestricted float GLclampf;
</span><ins>+typedef (ArrayBuffer or ArrayBufferView) BufferDataSource;
</ins><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=WEBGL,
</span><span class="lines">@@ -484,11 +485,9 @@
</span><span class="cx">     void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
</span><span class="cx">     void blendFunc(GLenum sfactor, GLenum dfactor);
</span><span class="cx">     void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
</span><del>-    void bufferData(GLenum target, ArrayBuffer? data, GLenum usage);
-    void bufferData(GLenum target, ArrayBufferView? data, GLenum usage);
</del><ins>+    void bufferData(GLenum target, BufferDataSource? data, GLenum usage);
</ins><span class="cx">     void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
</span><del>-    void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data);
-    void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView? data);
</del><ins>+    void bufferSubData(GLenum target, GLintptr offset, BufferDataSource? data);
</ins><span class="cx"> 
</span><span class="cx">     GLenum checkFramebufferStatus(GLenum target);
</span><span class="cx">     void clear(GLbitfield mask);
</span></span></pre>
</div>
</div>

</body>
</html>