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

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

<h3>Log Message</h3>
<pre>Migrate streams API to JS Builtins
https://bugs.webkit.org/show_bug.cgi?id=147092

Reviewed by Darin Adler.

Source/WebCore:

Moved ReadableStream implementation from C++ to JS Builtins.
Created specific private constructors for ReadableStreamReader and ReadableStreamController.
Added these constructors to  JSDOMWindowBase.
Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.

Covered by existing tests.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/streams/ReadableStream.cpp: Removed.
* Modules/streams/ReadableStream.h: Removed.
* Modules/streams/ReadableStream.idl:
* Modules/streams/ReadableStream.js:
(strategy.size):
(initializeReadableStream):
(cancel):
(getReader):
(pipeTo):
(tee):
(locked):
* Modules/streams/ReadableStreamController.h:
* Modules/streams/ReadableStreamController.idl:
* Modules/streams/ReadableStreamController.js: Added.
(enqueue):
(error):
(close):
(desiredSize):
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader):
(privateInitializeReadableStreamController):
(isReadableStream):
(isReadableStreamReader):
(isReadableStreamController):
(errorReadableStream):
(requestReadableStreamPull):
(getReadableStreamDesiredSize):
(releaseReadableStreamReader):
(cancelReadableStream):
(finishClosingReadableStream):
(closeReadableStream):
(closeReadableStreamReader):
(enqueueInReadableStream):
(readFromReadableStreamReader):
(invokeOrNoop):
(promiseInvokeOrNoop):
* Modules/streams/ReadableStreamReader.cpp: Removed.
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl:
* Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
(cancel):
(read):
(releaseLock):
(closed):
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMConstructor.h: Added.
(WebCore::JSBuiltinConstructor::create):
(WebCore::JSBuiltinConstructor::createStructure):
(WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
(WebCore::JSBuiltinConstructor::initializeProperties):
(WebCore::JSBuiltinConstructor&lt;JSClass&gt;::finishCreation):
(WebCore::JSBuiltinConstructor&lt;JSClass&gt;::construct):
(WebCore::JSBuiltinConstructor&lt;JSClass&gt;::getConstructData):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
* bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
* bindings/js/JSReadableStreamCustom.cpp: Removed.
* bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
(WebCore::constructJSReadableStreamController):
(WebCore::constructJSReadableStreamReader):
(WebCore::JSBuiltinConstructor&lt;JSReadableStreamReader&gt;::createJSObject):
(WebCore::JSBuiltinConstructor&lt;JSReadableStreamController&gt;::createJSObject):
(WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
(WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
(WebCore::createReadableStreamReaderPrivateConstructor):
(WebCore::createReadableStreamControllerPrivateConstructor):
* bindings/js/JSReadableStreamPrivateConstructors.h: Added.
* bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
* bindings/js/ReadableJSStream.cpp: Removed.
* bindings/js/ReadableJSStream.h: Removed.
* bindings/js/WebCoreBuiltinNames.h: Added.
(WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSClientData.h:
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::builtinNames):
(WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
(WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):

LayoutTests:

Rebasing some tests, one subtest passing, two others still failing but with different reasons.

* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/readable-stream-reader-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationbrandchecksexpectedtxt">trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderexpectedtxt">trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamidl">trunk/Source/WebCore/Modules/streams/ReadableStream.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamjs">trunk/Source/WebCore/Modules/streams/ReadableStream.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamControllerh">trunk/Source/WebCore/Modules/streams/ReadableStreamController.h</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamControlleridl">trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs">trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReaderh">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReaderidl">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSBuiltinscpp">trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSClientDatah">trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamControllerjs">trunk/Source/WebCore/Modules/streams/ReadableStreamController.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReaderjs">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorh">trunk/Source/WebCore/bindings/js/JSDOMConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp">trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorsh">trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamcpp">trunk/Source/WebCore/Modules/streams/ReadableStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamh">trunk/Source/WebCore/Modules/streams/ReadableStream.h</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamReadercpp">trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamControllerCustomcpp">trunk/Source/WebCore/bindings/js/JSReadableStreamControllerCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamCustomcpp">trunk/Source/WebCore/bindings/js/JSReadableStreamCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamReaderCustomcpp">trunk/Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableJSStreamcpp">trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableJSStreamh">trunk/Source/WebCore/bindings/js/ReadableJSStream.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/LayoutTests/ChangeLog        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-10-05  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        Migrate streams API to JS Builtins
+        https://bugs.webkit.org/show_bug.cgi?id=147092
+
+        Reviewed by Darin Adler.
+
+        Rebasing some tests, one subtest passing, two others still failing but with different reasons.
+
+        * streams/reference-implementation/brand-checks-expected.txt:
+        * streams/reference-implementation/readable-stream-reader-expected.txt:
+
</ins><span class="cx"> 2015-10-05  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         data: URLs should not be preloaded
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationbrandchecksexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -4,10 +4,10 @@
</span><span class="cx"> FAIL ReadableStream.prototype.cancel enforces a brand check Can't find variable: WritableStream
</span><span class="cx"> FAIL ReadableStream.prototype.getReader enforces a brand check Can't find variable: WritableStream
</span><span class="cx"> PASS ReadableStream.prototype.pipeThrough works generically on its this and its arguments 
</span><del>-FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments Can only call ReadableStream.pipeTo on instances of ReadableStream
</del><ins>+FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments pipeTo is not implemented
</ins><span class="cx"> FAIL ReadableStream.prototype.tee enforces a brand check Can't find variable: WritableStream
</span><span class="cx"> PASS ReadableStreamReader enforces a brand check on its argument 
</span><del>-FAIL ReadableStreamReader.prototype.closed enforces a brand check undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, getterName).get')
</del><ins>+PASS ReadableStreamReader.prototype.closed enforces a brand check 
</ins><span class="cx"> PASS ReadableStreamReader.prototype.cancel enforces a brand check 
</span><span class="cx"> PASS ReadableStreamReader.prototype.read enforces a brand check 
</span><span class="cx"> PASS ReadableStreamReader.prototype.read enforces a brand check 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamreaderexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-reader-expected.txt        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Can get the ReadableStreamReader constructor indirectly 
</span><span class="cx"> PASS ReadableStreamReader constructor should get a ReadableStream object as argument 
</span><del>-FAIL ReadableStreamReader instances should have the correct list of properties assert_array_equals: lengths differ, expected 5 got 4
</del><ins>+FAIL ReadableStreamReader instances should have the correct list of properties assert_equals: method should be non-enumerable expected false but got true
</ins><span class="cx"> PASS ReadableStreamReader closed should always return the same promise object 
</span><span class="cx"> PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via direct construction) 
</span><span class="cx"> PASS Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via direct construction) 
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -979,9 +979,6 @@
</span><span class="cx">     Modules/speech/SpeechSynthesisUtterance.cpp
</span><span class="cx">     Modules/speech/SpeechSynthesisVoice.cpp
</span><span class="cx"> 
</span><del>-    Modules/streams/ReadableStream.cpp
-    Modules/streams/ReadableStreamReader.cpp
-
</del><span class="cx">     Modules/vibration/NavigatorVibration.cpp
</span><span class="cx">     Modules/vibration/Vibration.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -1208,13 +1205,11 @@
</span><span class="cx">     bindings/js/JSPerformanceEntryCustom.cpp
</span><span class="cx">     bindings/js/JSPluginElementFunctions.cpp
</span><span class="cx">     bindings/js/JSPopStateEventCustom.cpp
</span><ins>+    bindings/js/JSReadableStreamPrivateConstructors.cpp
</ins><span class="cx">     bindings/js/JSRTCIceCandidateCustom.cpp
</span><span class="cx">     bindings/js/JSRTCPeerConnectionCustom.cpp
</span><span class="cx">     bindings/js/JSRTCSessionDescriptionCustom.cpp
</span><span class="cx">     bindings/js/JSRTCStatsResponseCustom.cpp
</span><del>-    bindings/js/JSReadableStreamControllerCustom.cpp
-    bindings/js/JSReadableStreamCustom.cpp
-    bindings/js/JSReadableStreamReaderCustom.cpp
</del><span class="cx">     bindings/js/JSSQLResultSetRowListCustom.cpp
</span><span class="cx">     bindings/js/JSSQLTransactionCustom.cpp
</span><span class="cx">     bindings/js/JSSVGLengthCustom.cpp
</span><span class="lines">@@ -1241,7 +1236,6 @@
</span><span class="cx">     bindings/js/JSXMLHttpRequestCustom.cpp
</span><span class="cx">     bindings/js/JSXPathResultCustom.cpp
</span><span class="cx">     bindings/js/JSXSLTProcessorCustom.cpp
</span><del>-    bindings/js/ReadableJSStream.cpp
</del><span class="cx">     bindings/js/ScheduledAction.cpp
</span><span class="cx">     bindings/js/ScriptCachedFrameData.cpp
</span><span class="cx">     bindings/js/ScriptController.cpp
</span><span class="lines">@@ -3355,7 +3349,9 @@
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
</span><ins>+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
</ins><span class="cx">     ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
</span><ins>+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/ChangeLog        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,3 +1,101 @@
</span><ins>+2015-10-05  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        Migrate streams API to JS Builtins
+        https://bugs.webkit.org/show_bug.cgi?id=147092
+
+        Reviewed by Darin Adler.
+
+        Moved ReadableStream implementation from C++ to JS Builtins.
+        Created specific private constructors for ReadableStreamReader and ReadableStreamController.
+        Added these constructors to  JSDOMWindowBase.
+        Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
+
+        Covered by existing tests.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Modules/streams/ReadableStream.cpp: Removed.
+        * Modules/streams/ReadableStream.h: Removed.
+        * Modules/streams/ReadableStream.idl:
+        * Modules/streams/ReadableStream.js:
+        (strategy.size):
+        (initializeReadableStream):
+        (cancel):
+        (getReader):
+        (pipeTo):
+        (tee):
+        (locked):
+        * Modules/streams/ReadableStreamController.h:
+        * Modules/streams/ReadableStreamController.idl:
+        * Modules/streams/ReadableStreamController.js: Added.
+        (enqueue):
+        (error):
+        (close):
+        (desiredSize):
+        * Modules/streams/ReadableStreamInternals.js:
+        (privateInitializeReadableStreamReader):
+        (privateInitializeReadableStreamController):
+        (isReadableStream):
+        (isReadableStreamReader):
+        (isReadableStreamController):
+        (errorReadableStream):
+        (requestReadableStreamPull):
+        (getReadableStreamDesiredSize):
+        (releaseReadableStreamReader):
+        (cancelReadableStream):
+        (finishClosingReadableStream):
+        (closeReadableStream):
+        (closeReadableStreamReader):
+        (enqueueInReadableStream):
+        (readFromReadableStreamReader):
+        (invokeOrNoop):
+        (promiseInvokeOrNoop):
+        * Modules/streams/ReadableStreamReader.cpp: Removed.
+        * Modules/streams/ReadableStreamReader.h:
+        * Modules/streams/ReadableStreamReader.idl:
+        * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
+        (cancel):
+        (read):
+        (releaseLock):
+        (closed):
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSDOMConstructor.h: Added.
+        (WebCore::JSBuiltinConstructor::create):
+        (WebCore::JSBuiltinConstructor::createStructure):
+        (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
+        (WebCore::JSBuiltinConstructor::initializeProperties):
+        (WebCore::JSBuiltinConstructor&lt;JSClass&gt;::finishCreation):
+        (WebCore::JSBuiltinConstructor&lt;JSClass&gt;::construct):
+        (WebCore::JSBuiltinConstructor&lt;JSClass&gt;::getConstructData):
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::finishCreation):
+        * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
+        * bindings/js/JSReadableStreamCustom.cpp: Removed.
+        * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
+        (WebCore::constructJSReadableStreamController):
+        (WebCore::constructJSReadableStreamReader):
+        (WebCore::JSBuiltinConstructor&lt;JSReadableStreamReader&gt;::createJSObject):
+        (WebCore::JSBuiltinConstructor&lt;JSReadableStreamController&gt;::createJSObject):
+        (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
+        (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
+        (WebCore::createReadableStreamReaderPrivateConstructor):
+        (WebCore::createReadableStreamControllerPrivateConstructor):
+        * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
+        * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
+        * bindings/js/ReadableJSStream.cpp: Removed.
+        * bindings/js/ReadableJSStream.h: Removed.
+        * bindings/js/WebCoreBuiltinNames.h: Added.
+        (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
+        * bindings/js/WebCoreJSBuiltins.cpp:
+        * bindings/js/WebCoreJSClientData.h:
+        (WebCore::WebCoreJSClientData::WebCoreJSClientData):
+        (WebCore::WebCoreJSClientData::builtinNames):
+        (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
+        (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
+
</ins><span class="cx"> 2015-10-05  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         data: URLs should not be preloaded
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/DerivedSources.make        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1255,7 +1255,9 @@
</span><span class="cx">     $(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
</span><span class="cx">     $(WebCore)/Modules/streams/CountQueuingStrategy.js \
</span><span class="cx">     $(WebCore)/Modules/streams/ReadableStream.js \
</span><ins>+    $(WebCore)/Modules/streams/ReadableStreamController.js \
</ins><span class="cx">     $(WebCore)/Modules/streams/ReadableStreamInternals.js \
</span><ins>+    $(WebCore)/Modules/streams/ReadableStreamReader.js \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><span class="cx"> all : $(WEBCORE_JS_BUILTINS:%.js=%Builtins.cpp)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/ReadableStream.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,288 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;ReadableStream.h&quot;
-
-#if ENABLE(STREAMS_API)
-
-#include &quot;ExceptionCode.h&quot;
-#include &quot;ReadableJSStream.h&quot;
-#include &quot;ReadableStreamReader.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-#include &lt;wtf/RefCountedLeakCounter.h&gt;
-
-namespace WebCore {
-
-DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, readableStreamCounter, (&quot;ReadableStream&quot;));
-
-RefPtr&lt;ReadableStream&gt; ReadableStream::create(JSC::ExecState&amp; state, JSC::JSValue value, const Dictionary&amp; strategy)
-{
-    return RefPtr&lt;ReadableStream&gt;(ReadableJSStream::create(state, value, strategy));
-}
-
-ReadableStream::ReadableStream(ScriptExecutionContext&amp; scriptExecutionContext)
-    : ActiveDOMObject(&amp;scriptExecutionContext)
-{
-#ifndef NDEBUG
-    readableStreamCounter.increment();
-#endif
-    suspendIfNeeded();
-}
-
-ReadableStream::~ReadableStream()
-{
-#ifndef NDEBUG
-    readableStreamCounter.decrement();
-#endif
-}
-
-void ReadableStream::clearCallbacks()
-{
-    m_closedPromise = Nullopt;
-    m_readRequests.clear();
-}
-
-void ReadableStream::changeStateToClosed()
-{
-    ASSERT(!m_closeRequested);
-    ASSERT(m_state != State::Errored);
-
-    m_closeRequested = true;
-
-    if (m_state != State::Readable || hasValue())
-        return;
-    close();
-}
-
-void ReadableStream::close()
-{
-    m_state = State::Closed;
-    releaseReader();
-}
-
-void ReadableStream::releaseReader()
-{
-    for (auto&amp; request : m_readRequests)
-        request.resolveEnd();
-    if (m_reader)
-        m_releasedReaders.append(WTF::move(m_reader));
-
-    if (m_closedPromise)
-        m_closedPromise.value().resolve(nullptr);
-    clearCallbacks();
-}
-
-void ReadableStream::changeStateToErrored()
-{
-    if (m_state != State::Readable)
-        return;
-
-    clearValues();
-
-    m_state = State::Errored;
-
-    if (!m_reader)
-        return;
-
-    JSC::JSValue error = this-&gt;error();
-    for (auto&amp; request : m_readRequests)
-        request.reject(error);
-    m_releasedReaders.append(WTF::move(m_reader));
-
-    if (m_closedPromise)
-        m_closedPromise.value().reject(error);
-    clearCallbacks();
-}
-
-void ReadableStream::start()
-{
-    m_isStarted = true;
-    pull();
-}
-
-void ReadableStream::pull()
-{
-    if (!m_isStarted || m_state == State::Closed || m_state == State::Errored || m_closeRequested)
-        return;
-
-    if (m_readRequests.isEmpty() &amp;&amp; hasEnoughValues())
-        return;
-
-    if (m_isPulling) {
-        m_shouldPullAgain = true;
-        return;
-    }
-
-    m_isPulling = true;
-    if (doPull()) {
-        RefPtr&lt;ReadableStream&gt; protectedStream(this);
-        scriptExecutionContext()-&gt;postTask([protectedStream](ScriptExecutionContext&amp;) {
-            protectedStream-&gt;finishPulling();
-        });
-    }
-}
-
-void ReadableStream::finishPulling()
-{
-    m_isPulling = false;
-    if (m_shouldPullAgain) {
-        m_shouldPullAgain = false;
-        pull();
-    }
-}
-
-ReadableStreamReader* ReadableStream::getReader(ExceptionCode&amp; ec)
-{
-    if (locked()) {
-        ec = TypeError;
-        return nullptr;
-    }
-    ASSERT(!m_reader);
-
-    std::unique_ptr&lt;ReadableStreamReader&gt; newReader = std::make_unique&lt;ReadableStreamReader&gt;(*this);
-    ReadableStreamReader&amp; reader = *newReader.get();
-
-    if (m_state == State::Readable) {
-        m_reader = WTF::move(newReader);
-        return &amp;reader;
-    }
-
-    m_releasedReaders.append(WTF::move(newReader));
-    return &amp;reader;
-}
-
-void ReadableStream::cancel(JSC::JSValue reason, CancelPromise&amp;&amp; promise, ExceptionCode&amp; ec)
-{
-    if (locked()) {
-        ec = TypeError;
-        return;
-    }
-    cancelNoCheck(reason, WTF::move(promise));
-}
-
-void ReadableStream::cancelNoCheck(JSC::JSValue reason, CancelPromise&amp;&amp; promise)
-{
-    if (m_state == State::Closed) {
-        promise.resolve(nullptr);
-        return;
-    }
-    if (m_state == State::Errored) {
-        promise.reject(error());
-        return;
-    }
-    ASSERT(m_state == State::Readable);
-
-    clearValues();
-
-    m_cancelPromise = WTF::move(promise);
-
-    close();
-
-    if (doCancel(reason))
-        error() ? notifyCancelFailed() : notifyCancelSucceeded();
-}
-
-void ReadableStream::notifyCancelSucceeded()
-{
-    ASSERT(m_state == State::Closed);
-    ASSERT(m_cancelPromise);
-
-    m_cancelPromise.value().resolve(nullptr);
-    m_cancelPromise = Nullopt;
-}
-
-void ReadableStream::notifyCancelFailed()
-{
-    ASSERT(m_state == State::Closed);
-    ASSERT(m_cancelPromise);
-
-    m_cancelPromise.value().reject(error());
-    m_cancelPromise = Nullopt;
-}
-
-void ReadableStream::closed(ClosedPromise&amp;&amp; promise)
-{
-    if (m_state == State::Closed) {
-        promise.resolve(nullptr);
-        return;
-    }
-    if (m_state == State::Errored) {
-        promise.reject(error());
-        return;
-    }
-    m_closedPromise = WTF::move(promise);
-}
-
-void ReadableStream::read(ReadPromise&amp;&amp; readPromise)
-{
-    if (m_state == State::Closed) {
-        readPromise.resolveEnd();
-        return;
-    }
-    if (m_state == State::Errored) {
-        readPromise.reject(error());
-        return;
-    }
-    if (hasValue()) {
-        readPromise.resolve(read());
-        if (!m_closeRequested)
-            pull();
-        else if (!hasValue())
-            close();
-        return;
-    }
-    m_readRequests.append(WTF::move(readPromise));
-    pull();
-}
-
-bool ReadableStream::resolveReadCallback(JSC::JSValue value)
-{
-    if (m_readRequests.isEmpty())
-        return false;
-
-    m_readRequests.takeFirst().resolve(value);
-    return true;
-}
-
-const char* ReadableStream::activeDOMObjectName() const
-{
-    return &quot;ReadableStream&quot;;
-}
-
-bool ReadableStream::canSuspendForPageCache() const
-{
-    // FIXME: We should try and do better here.
-    return false;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/ReadableStream.h (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.h        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,169 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#ifndef ReadableStream_h
-#define ReadableStream_h
-
-#if ENABLE(STREAMS_API)
-
-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;DOMRequestState.h&quot;
-#include &quot;JSDOMPromise.h&quot;
-#include &quot;ScriptState.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;functional&gt;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/Optional.h&gt;
-#include &lt;wtf/Ref.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace JSC {
-class JSValue;
-}
-
-namespace WebCore {
-
-class Dictionary;
-class ReadableStreamReader;
-class ScriptExecutionContext;
-
-typedef int ExceptionCode;
-
-// ReadableStream implements the core of the streams API ReadableStream functionality.
-// It handles in particular the backpressure according the queue size.
-// ReadableStream is using a ReadableStreamSource to get data in its queue.
-// See https://streams.spec.whatwg.org/#rs
-class ReadableStream : public ActiveDOMObject, public ScriptWrappable, public RefCounted&lt;ReadableStream&gt; {
-public:
-    enum class State {
-        Readable,
-        Closed,
-        Errored
-    };
-
-    static RefPtr&lt;ReadableStream&gt; create(JSC::ExecState&amp;, JSC::JSValue, const Dictionary&amp;);
-    virtual ~ReadableStream();
-
-    ReadableStreamReader* getReader(ExceptionCode&amp;);
-    const ReadableStreamReader* reader() const { return m_reader.get(); }
-
-    bool locked() const { return !!m_reader; }
-
-    void releaseReader();
-    bool hasReadPendingRequests() { return !m_readRequests.isEmpty(); }
-
-    bool isErrored() const { return m_state == State::Errored; }
-    bool isReadable() const { return m_state == State::Readable; }
-    bool isCloseRequested() const { return m_closeRequested; }
-
-    virtual JSC::JSValue error() = 0;
-
-    void start();
-    void changeStateToClosed();
-    void changeStateToErrored();
-    void finishPulling();
-    void notifyCancelSucceeded();
-    void notifyCancelFailed();
-
-    typedef DOMPromise&lt;std::nullptr_t, JSC::JSValue&gt; CancelPromise;
-    void cancel(JSC::JSValue, CancelPromise&amp;&amp;, ExceptionCode&amp;);
-    void cancelNoCheck(JSC::JSValue, CancelPromise&amp;&amp;);
-
-    typedef DOMPromise&lt;std::nullptr_t, JSC::JSValue&gt; ClosedPromise;
-    void closed(ClosedPromise&amp;&amp;);
-
-    typedef DOMPromiseIteratorWithCallback&lt;JSC::JSValue, JSC::JSValue&gt; ReadPromise;
-    void read(ReadPromise&amp;&amp;);
-
-protected:
-    explicit ReadableStream(ScriptExecutionContext&amp;);
-
-    bool resolveReadCallback(JSC::JSValue);
-    void pull();
-
-private:
-    // ActiveDOMObject API.
-    const char* activeDOMObjectName() const override;
-    bool canSuspendForPageCache() const override;
-
-    void clearCallbacks();
-    void close();
-
-    virtual void clearValues() = 0;
-    virtual bool hasEnoughValues() const = 0;
-    virtual bool hasValue() const = 0;
-    virtual JSC::JSValue read() = 0;
-    virtual bool doPull() = 0;
-    virtual bool doCancel(JSC::JSValue) = 0;
-
-    std::unique_ptr&lt;ReadableStreamReader&gt; m_reader;
-    Vector&lt;std::unique_ptr&lt;ReadableStreamReader&gt;&gt; m_releasedReaders;
-
-    Optional&lt;CancelPromise&gt; m_cancelPromise;
-    Optional&lt;ClosedPromise&gt; m_closedPromise;
-
-    Deque&lt;ReadPromise&gt; m_readRequests;
-
-    bool m_isStarted { false };
-    bool m_isPulling { false };
-    bool m_shouldPullAgain { false };
-    bool m_closeRequested { false };
-    State m_state { State::Readable };
-};
-
-// This class manages the queue and knows whether there is sufficient data in it.
-//   Subclasses should implement error storage, pulling and cancelling.
-template&lt;typename ChunkType&gt;
-class ReadableEnqueuingStream final : public ReadableStream {
-protected:
-    explicit ReadableEnqueuingStream(ScriptExecutionContext&amp; context) : ReadableStream(context) { }
-
-    void enqueueChunk(ChunkType&amp;&amp; chunk) { m_queue.append(std::forward(chunk)); }
-
-private:
-    virtual void clearValues() override { m_queue.clear(); }
-    virtual bool hasEnoughValues() const override { return m_queue.size(); }
-    virtual bool hasValue() const override { return m_queue.size(); }
-    virtual JSC::JSValue read() override;
-
-    Deque&lt;ChunkType&gt; m_queue;
-};
-
-template&lt;typename ChunkType&gt;
-inline JSC::JSValue ReadableEnqueuingStream&lt;ChunkType&gt;::read()
-{
-    DOMRequestState state(scriptExecutionContext());
-    return toJS(state.exec(), toJSDOMGlobalObject(scriptExecutionContext(), state.exec()), m_queue.read());
-}
-
-}
-
-#endif
-
-#endif // ReadableStream_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.idl (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.idl        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.idl        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -28,16 +28,14 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    ConstructorCallWith=ScriptState,
-    Constructor([Default=Undefined] optional any source, [Default=Undefined] optional Dictionary strategy),
</del><span class="cx">     Conditional=STREAMS_API,
</span><del>-    SkipVTableValidation
</del><ins>+    JSBuiltinConstructor
</ins><span class="cx"> ] interface ReadableStream {
</span><del>-    [RaisesException] Promise cancel([Default=Undefined] optional any reason);
-    [RaisesException] ReadableStreamReader getReader();
-    [Custom] Promise pipeTo(any streams, any options);
</del><ins>+    [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
+    [JSBuiltin] Object getReader();
+    [JSBuiltin] Promise pipeTo(any streams, any options);
</ins><span class="cx">     [JSBuiltin] Object pipeThrough(any dest, any options);
</span><span class="cx">     [JSBuiltin] Object tee();
</span><span class="cx"> 
</span><del>-    readonly attribute boolean locked;
</del><ins>+    [JSBuiltin] readonly attribute boolean locked;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.js        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.js        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -23,6 +23,80 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function initializeReadableStream(underlyingSource, strategy)
+{
+    &quot;use strict&quot;;
+
+     if (typeof underlyingSource === &quot;undefined&quot;)
+         underlyingSource = { };
+     if (typeof strategy === &quot;undefined&quot;)
+         strategy = { highWaterMark: 1, size: function() { return 1; } };
+
+    if (!@isObject(underlyingSource))
+        throw new @TypeError(&quot;ReadableStream constructor takes an object as first argument&quot;);
+
+    if (strategy !== undefined &amp;&amp; !@isObject(strategy))
+        throw new @TypeError(&quot;ReadableStream constructor takes an object as second argument, if any&quot;);
+
+    this.@underlyingSource = underlyingSource;
+
+    this.@queue = [];
+    this.@queueSize = 0;
+    this.@state = @readableStreamReadable;
+    this.@started = false;
+    this.@closeRequested = false;
+    this.@pullAgain = false;
+    this.@pulling = false;
+    this.@reader = undefined;
+    this.@storedError = undefined;
+    this.@controller = new @ReadableStreamController(this);
+    this.@strategySize = strategy.size;
+    this.@highWaterMark = Number(strategy.highWaterMark);
+
+    if (Number.isNaN(this.@highWaterMark))
+        throw new TypeError(&quot;highWaterMark parameter is not correct&quot;);
+    if (this.@highWaterMark &lt; 0)
+        throw new RangeError(&quot;highWaterMark is negative&quot;);
+
+    var result = @invokeOrNoop(underlyingSource, &quot;start&quot;, [this.@controller]);
+    var _this = this;
+    Promise.resolve(result).then(function() {
+        _this.@started = true;
+        @requestReadableStreamPull(_this);
+    }, function(error) {
+        if (_this.@state === @readableStreamReadable)
+            @errorReadableStream(_this, error);
+    });
+
+    return this;
+}
+
+function cancel(reason)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStream(this))
+        return Promise.reject(new @TypeError(&quot;Function should be called on a ReadableStream&quot;));
+
+    if (@isReadableStreamLocked(this))
+        return Promise.reject(new @TypeError(&quot;ReadableStream is locked&quot;));
+
+    return @cancelReadableStream(this, reason);
+}
+
+function getReader()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStream(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStream&quot;);
+
+    if (@isReadableStreamLocked(this))
+        throw new @TypeError(&quot;ReadableStream is locked&quot;);
+
+    return new @ReadableStreamReader(this);
+}
+
</ins><span class="cx"> function pipeThrough(streams, options)
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="lines">@@ -31,10 +105,29 @@
</span><span class="cx">     return streams.readable;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function pipeTo(dest)
+{
+    &quot;use strict&quot;;
+
+    throw new @TypeError(&quot;pipeTo is not implemented&quot;);
+}
+
</ins><span class="cx"> function tee()
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    // TODO: check this is a ReadableStream
-    return @teeReadableStream(this, false)
</del><ins>+    if (!@isReadableStream(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStream&quot;);
+
+    throw new @TypeError(&quot;tee is not implemented&quot;);
</ins><span class="cx"> }
</span><ins>+
+function locked()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStream(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStream&quot;);
+
+    return @isReadableStreamLocked(this);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamController.h (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.h        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -32,34 +32,18 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx"> 
</span><del>-#include &quot;ReadableJSStream.h&quot;
</del><ins>+#include &lt;wtf/RefCounted.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-typedef int ExceptionCode;
-
-// This class is only used for JS source readable streams to allow enqueuing, closing or erroring a readable stream.
-// Its definition is at https://streams.spec.whatwg.org/#rs-controller-class.
-// Note that its constructor is taking a ReadableJSStream as it should only be used for JS sources.
-class ReadableStreamController {
</del><ins>+// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
+// Implementation of ReadableStreamController functionality is done in ReadableStreamController.js
+// FIXME: Find a way to remove that class.
+class ReadableStreamController final : public RefCounted&lt;ReadableStreamController&gt; {
</ins><span class="cx"> public:
</span><del>-    explicit ReadableStreamController(ReadableJSStream&amp; stream)
-        : m_stream(stream) { }
-
-    ReadableJSStream&amp; stream() { return m_stream; }
-
-    void error(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCode&amp; ec) { m_stream.error(state, value, ec); }
-
-    void enqueue(JSC::ExecState&amp; state, JSC::JSValue value) { m_stream.enqueue(state, value); }
-
-    void ref() { m_stream.ref(); }
-    void deref() { m_stream.deref(); }
-
-    void close(ExceptionCode&amp; ec) { m_stream.close(ec); }
-    double desiredSize() const { return m_stream.desiredSize(); }
-
</del><ins>+    static Ref&lt;ReadableStreamController&gt; create() { return adoptRef(* new ReadableStreamController); }
</ins><span class="cx"> private:
</span><del>-    ReadableJSStream&amp; m_stream;
</del><ins>+    ReadableStreamController() { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamControlleridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -33,9 +33,9 @@
</span><span class="cx">     ImplementationLacksVTable,
</span><span class="cx">     NoInterfaceObject
</span><span class="cx"> ] interface ReadableStreamController {
</span><del>-    [CallWith=ScriptState] void enqueue([Default=Undefined] optional any chunk);
-    [RaisesException] void close();
-    [CallWith=ScriptState, RaisesException] void error([Default=Undefined] optional any error);
</del><ins>+    [JSBuiltin] void enqueue([Default=Undefined] optional any chunk);
+    [JSBuiltin] void close();
+    [JSBuiltin] void error([Default=Undefined] optional any error);
</ins><span class="cx"> 
</span><del>-    readonly attribute double desiredSize;
</del><ins>+    [JSBuiltin] readonly attribute double desiredSize;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamControllerjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/streams/ReadableStreamController.js (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.js        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon Inc.
+ *
+ * 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. ``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
+ * 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.
+ */
+
+function enqueue(chunk)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamController(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStreamController&quot;);
+
+    var stream = this.@controlledReadableStream;
+    if (stream.@state === @readableStreamErrored)
+        throw stream.@storedError;
+
+    if (stream.@closeRequested)
+        throw new @TypeError(&quot;ReadableStream is requested to close&quot;);
+
+    return @enqueueInReadableStream(stream, chunk)
+}
+
+function error(error)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamController(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStreamController&quot;);
+
+    var stream = this.@controlledReadableStream;
+    if (stream.@state !== @readableStreamReadable)
+        throw new @TypeError(&quot;ReaableStream is not readable&quot;);
+
+    @errorReadableStream(stream, error);
+}
+
+function close()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamController(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStreamController&quot;);
+
+    var stream = this.@controlledReadableStream;
+    if (stream.@closeRequested)
+        throw new @TypeError(&quot;ReadableStream is already requested to close&quot;);
+
+    if (stream.@state === @readableStreamErrored)
+        throw new @TypeError(&quot;ReadableStream is already errored&quot;);
+
+    @closeReadableStream(stream);
+}
+
+function desiredSize()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamController(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStreamController&quot;);
+
+    return @getReadableStreamDesiredSize(this.@controlledReadableStream);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -23,9 +23,293 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function privateInitializeReadableStreamReader(stream)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStream(stream))
+       throw new @TypeError(&quot;ReadableStreamReader needs a ReadableStream&quot;);
+    if (@isReadableStreamLocked(stream))
+       throw new @TypeError(&quot;ReadableStream is locked&quot;);
+
+    this.@state = stream.@state;
+    this.@readRequests = [];
+    if (stream.@state === @readableStreamReadable) {
+        this.@ownerReadableStream = stream;
+        this.@storedError = undefined;
+        stream.@reader = this;
+        this.@closedPromise = new Promise(function(resolve, reject) {
+            stream.@reader.@closedPromiseResolve = resolve;
+            stream.@reader.@closedPromiseReject = reject;
+        });
+        return this;
+    }
+    if (stream.@state === @readableStreamClosed) {
+        this.@ownerReadableStream = null;
+        this.@storedError = undefined;
+        this.@closedPromise = Promise.resolve();
+        return this;
+    }
+    // TODO: ASSERT(stream.@state === @readableStreamErrored);
+    this.@ownerReadableStream = null;
+    this.@storedError = stream.@storedError;
+    this.@closedPromise = Promise.reject(stream.@storedError);
+
+    return this;
+}
+
+function privateInitializeReadableStreamController(stream)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStream(stream))
+        throw new @TypeError(&quot;ReadableStreamController needs a ReadableStream&quot;);
+    if (typeof stream.@controller !== &quot;undefined&quot;)
+        throw new @TypeError(&quot;ReadableStream already has a controller&quot;);
+    this.@controlledReadableStream = stream;
+
+    return this;
+}
+
</ins><span class="cx"> function teeReadableStream(stream, shouldClone)
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     throw new @TypeError(&quot;tee is not implemented&quot;);
</span><span class="cx"> }
</span><ins>+
+function isReadableStream(stream)
+{
+    &quot;use strict&quot;;
+
+    return @isObject(stream) &amp;&amp; !!stream.@underlyingSource;
+}
+
+function isReadableStreamReader(reader)
+{
+    &quot;use strict&quot;;
+
+    return @isObject(reader) &amp;&amp; typeof reader.@ownerReadableStream !== &quot;undefined&quot;;
+}
+
+function isReadableStreamController(controller)
+{
+    &quot;use strict&quot;;
+
+    return @isObject(controller) &amp;&amp; !!controller.@controlledReadableStream;
+}
+
+function errorReadableStream(stream, error)
+{
+    &quot;use strict&quot;;
+
+    // TODO: ASSERT(stream.@state === @readableStreamReadable);
+    stream.@queue = [];
+    stream.@storedError = error;
+    stream.@state = @readableStreamErrored;
+
+    if (!stream.@reader)
+        return;
+    var reader = stream.@reader;
+
+    var requests = reader.@readRequests;
+    for (var index = 0, length = requests.length; index &lt; length; ++index)
+        requests[index].reject(error);
+    reader.@readRequests = [];
+
+    @releaseReadableStreamReader(reader);
+    reader.@storedError = error;
+    reader.@state = @readableStreamErrored;
+
+    reader.@closedPromiseReject(error);
+}
+
+function requestReadableStreamPull(stream)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state !== @readableStreamReadable)
+        return;
+    if (stream.@closeRequested)
+        return;
+    if (!stream.@started)
+        return;
+    if ((!@isReadableStreamLocked(stream) || !stream.@reader.@readRequests.length) &amp;&amp; @getReadableStreamDesiredSize(stream) &lt;= 0)
+        return;

+    if (stream.@pulling) {
+        stream.@pullAgain = true;
+        return;
+    }
+
+    stream.@pulling = true;
+
+    var promise = @promiseInvokeOrNoop(stream.@underlyingSource, &quot;pull&quot;, [stream.@controller]);
+    promise.then(function() {
+        stream.@pulling = false;
+        if (stream.@pullAgain) {
+            stream.@pullAgain = false;
+            @requestReadableStreamPull(stream);
+        }
+    }, function(error) {
+        @errorReadableStream(stream, error);
+    });
+}
+
+function isReadableStreamLocked(stream)
+{
+   &quot;use strict&quot;;
+
+    return !!stream.@reader;
+}
+
+function getReadableStreamDesiredSize(stream)
+{
+   &quot;use strict&quot;;
+
+   return stream.@highWaterMark - stream.@queueSize;
+}
+
+function releaseReadableStreamReader(reader)
+{
+    &quot;use strict&quot;;
+
+    reader.@ownerReadableStream.@reader = undefined;
+    reader.@ownerReadableStream = null;
+}
+
+function cancelReadableStream(stream, reason)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === @readableStreamClosed)
+        return Promise.resolve();
+    if (stream.@state === @readableStreamErrored)
+        return Promise.reject(stream.@storedError);
+    stream.@queue = [];
+    @finishClosingReadableStream(stream);
+    return @promiseInvokeOrNoop(stream.@underlyingSource, &quot;cancel&quot;, [reason]).then(function() { });
+}
+
+function finishClosingReadableStream(stream)
+{
+    &quot;use strict&quot;;
+
+    // TODO: ASSERT(stream.@state ===  @readableStreamReadable);
+    stream.@state = @readableStreamClosed;
+    var reader = stream.@reader;
+    if (reader)
+        @closeReadableStreamReader(reader);
+}
+
+function closeReadableStream(stream)
+{
+    &quot;use strict&quot;;
+
+    // TODO. ASSERT(!stream.@closeRequested);
+    // TODO: ASSERT(stream.@state !== @readableStreamErrored);
+    if (stream.@state === @readableStreamClosed)
+        return; 
+    stream.@closeRequested = true;
+    if (!stream.@queue.length)
+        @finishClosingReadableStream(stream);
+}
+
+function closeReadableStreamReader(reader)
+{
+    &quot;use strict&quot;;
+
+    var requests = reader.@readRequests;
+    for (var index = 0, length = requests.length; index &lt; length; ++index)
+        requests[index].resolve({value:undefined, done: true});
+    reader.@readRequests = [];
+    @releaseReadableStreamReader(reader);
+    reader.@state = @readableStreamClosed;
+    reader.@closedPromiseResolve();
+}
+
+function enqueueInReadableStream(stream, chunk)
+{
+    &quot;use strict&quot;;
+
+    // TODO: ASSERT(!stream.@closeRequested);
+    // TODO: ASSERT(stream.@state !== @readableStreamErrored);
+    if (stream.@state === @readableStreamClosed)
+        return undefined;
+    if (@isReadableStreamLocked(stream) &amp;&amp; stream.@reader.@readRequests.length) {
+        stream.@reader.@readRequests.shift().resolve({value: chunk, done: false});
+        @requestReadableStreamPull(stream);
+        return;
+    }
+    try {
+        var size = 1;
+        if (stream.@strategySize) {
+            size = Number(stream.@strategySize(chunk));
+            if (Number.isNaN(size) || size === +Infinity || size &lt; 0)
+                throw new RangeError(&quot;Chunk size is not valid&quot;);
+        }
+        stream.@queue.push({ value: chunk, size: size });
+        stream.@queueSize += size;
+    }
+    catch(error) {
+        @errorReadableStream(stream, error);
+        throw error;
+    }
+    @requestReadableStreamPull(stream);
+}
+
+function readFromReadableStreamReader(reader)
+{
+    &quot;use strict&quot;;
+
+    if (reader.@state === @readableStreamClosed)
+        return Promise.resolve({value: undefined, done: true});
+    if (reader.@state === @readableStreamErrored)
+        return Promise.reject(reader.@storedError);
+    // TODO: ASSERT(!!reader.@ownerReadableStream);
+    // TODO: ASSERT(reader.@ownerReadableStream.@state === @readableStreamReadable);
+    var stream = reader.@ownerReadableStream;
+    if (stream.@queue.length) {
+        var chunk = stream.@queue.shift();
+        stream.@queueSize -= chunk.size;
+        if (!stream.@closeRequested)
+            @requestReadableStreamPull(stream);
+        else if (!stream.@queue.length)
+            @finishClosingReadableStream(stream);
+        return Promise.resolve({value: chunk.value, done: false});
+    }
+    var readRequest = {};
+    var readPromise = new Promise(function(resolve, reject) {
+        readRequest.resolve = resolve;
+        readRequest.reject = reject;
+    });
+    reader.@readRequests.push(readRequest);
+    @requestReadableStreamPull(stream);
+    return readPromise;
+}
+
+function invokeOrNoop(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    var method = object[key];
+    if (typeof method === &quot;undefined&quot;)
+        return;
+    return method.@apply(object, args);
+}
+
+function promiseInvokeOrNoop(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    try {
+        var method = object[key];
+        if (typeof method === &quot;undefined&quot;)
+            return Promise.resolve();
+        var result = method.@apply(object, args);
+        return Promise.resolve(result);
+    }
+    catch(error) {
+        return Promise.reject(error);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReadercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,80 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;ReadableStreamReader.h&quot;
-
-#include &quot;ExceptionCode.h&quot;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-
-#if ENABLE(STREAMS_API)
-
-namespace WebCore {
-
-void ReadableStreamReader::cancel(JSC::JSValue reason, ReadableStream::CancelPromise&amp;&amp; promise)
-{
-    if (m_stream.isReadable() &amp;&amp; m_stream.reader() != this) {
-        promise.resolve(nullptr);
-        return;
-    }
-    m_stream.cancelNoCheck(reason, WTF::move(promise));
-}
-
-void ReadableStreamReader::closed(ReadableStream::ClosedPromise&amp;&amp; promise)
-{
-    if (m_stream.isReadable() &amp;&amp; m_stream.reader() != this) {
-        promise.resolve(nullptr);
-        return;
-    }
-    m_stream.closed(WTF::move(promise));
-}
-
-void ReadableStreamReader::read(ReadableStream::ReadPromise&amp;&amp; promise)
-{
-    if (m_stream.isReadable() &amp;&amp; m_stream.reader() != this) {
-        promise.resolveEnd();
-        return;
-    }
-    m_stream.read(WTF::move(promise));
-}
-
-void ReadableStreamReader::releaseLock(ExceptionCode&amp; ec)
-{
-    if (m_stream.reader() != this)
-        return;
-    if (m_stream.hasReadPendingRequests()) {
-        ec = TypeError;
-        return;
-    }
-    m_stream.releaseReader();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -32,37 +32,18 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx"> 
</span><del>-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;ReadableStream.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;functional&gt;
-#include &lt;wtf/Ref.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-typedef int ExceptionCode;
-
-// ReadableStreamReader implements access to ReadableStream from JavaScript.
-// It basically allows access to the ReadableStream iff the ReadableStreamReader instance is the active reader
-// of the ReadableStream.
-// Most of this handling is happening in the custom JS binding of ReadableStreamReader.
-// See https://streams.spec.whatwg.org/#reader-class for more information.
-class ReadableStreamReader {
</del><ins>+// This is a dummy class needed as we cannot yet use JSBuiltinConstructor with NoInterfaceObject.
+// Implementation of ReadableStreamReader functionality is done in ReadableStreamReader.js
+// FIXME: Find a way to remove that class.
+class ReadableStreamReader final : public RefCounted&lt;ReadableStreamReader&gt; {
</ins><span class="cx"> public:
</span><del>-    ReadableStreamReader(ReadableStream&amp; stream)
-        : m_stream(stream) { }
-
-    void cancel(JSC::JSValue, ReadableStream::CancelPromise&amp;&amp;);
-    void closed(ReadableStream::ClosedPromise&amp;&amp;);
-    void read(ReadableStream::ReadPromise&amp;&amp;);
-    void releaseLock(ExceptionCode&amp;);
-
-    void ref() { m_stream.ref(); }
-    void deref() { m_stream.deref(); }
-
</del><ins>+    static Ref&lt;ReadableStreamReader&gt; create() { return adoptRef(* new ReadableStreamReader); }
</ins><span class="cx"> private:
</span><del>-    ReadableStream&amp; m_stream;
</del><ins>+    ReadableStreamReader() { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReaderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -29,13 +29,13 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=STREAMS_API,
</span><del>-    CustomConstructor(any properties),
-    NoInterfaceObject,
-    SkipVTableValidation
</del><ins>+    CustomConstructor,
+    ImplementationLacksVTable,
+    NoInterfaceObject
</ins><span class="cx"> ] interface ReadableStreamReader {
</span><del>-    Promise read();
-    Promise cancel([Default=Undefined] optional any reason);
-    [RaisesException] void releaseLock();
</del><ins>+    [JSBuiltin] Promise read();
+    [JSBuiltin] Promise cancel([Default=Undefined] optional any reason);
+    [JSBuiltin] void releaseLock();
</ins><span class="cx"> 
</span><del>-    [CustomGetter, CachedAttribute] readonly attribute Promise closed;
</del><ins>+    [JSBuiltin] readonly attribute Promise closed;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamReaderjsfromrev190607trunkSourceWebCoreModulesstreamsReadableStreamjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js (from rev 190607, trunk/Source/WebCore/Modules/streams/ReadableStream.js) (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.js        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon Inc.
+ *
+ * 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. ``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
+ * 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.
+ */
+
+function cancel(reason)
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamReader(this))
+        return Promise.reject(new @TypeError(&quot;Function should be called on a ReadableStreamReader&quot;));
+
+    if (this.@state === @readableStreamClosed)
+        return Promise.resolve();
+
+    if (this.@state === @readableStreamErrored)
+        return Promise.reject(this.@storedError);
+
+    // TODO ASSERT(@isReadableStream(this.@ownerReadableStream));
+    // TODO ASSERT(this.@ownerReadableStream.@state === @readableStreamReadable);
+    return @cancelReadableStream(this.@ownerReadableStream, reason);
+}
+
+function read()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamReader(this))
+        return Promise.reject(new @TypeError(&quot;Function should be called on a ReadableStreamReader&quot;));
+
+    return @readFromReadableStreamReader(this);
+}
+
+function releaseLock()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamReader(this))
+        throw new @TypeError(&quot;Function should be called on a ReadableStreamReader&quot;);
+
+    if (!this.@ownerReadableStream)
+         return;
+
+    if (this.@readRequests.length)
+        throw new @TypeError();
+
+    @closeReadableStreamReader(this);
+}
+
+function closed()
+{
+    &quot;use strict&quot;;
+
+    if (!@isReadableStreamReader(this))
+        return Promise.reject(new @TypeError(&quot;Callee of closed is not a ReadableStreamReader&quot;));
+
+    return this.@closedPromise;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -3946,20 +3946,6 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ReadableStreamInternalsBuiltins.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamController.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -6831,8 +6817,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\notifications\Notification.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\notifications\NotificationCenter.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\notifications\WorkerGlobalScopeNotifications.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\Modules\streams\ReadableStream.cpp&quot; /&gt;
-    &lt;ClCompile Include=&quot;..\Modules\streams\ReadableStreamReader.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\webdatabase\ChangeVersionWrapper.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\webdatabase\Database.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\webdatabase\DatabaseAuthorizer.cpp&quot; /&gt;
</span><span class="lines">@@ -18539,7 +18523,7 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamCustom.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamPrivateConstructors.cpp&quot;&gt;
</ins><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -18553,48 +18537,6 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamControllerCustom.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamReaderCustom.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\bindings\js\ReadableJSStream.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\js\JSSQLResultSetRowListCustom.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -20561,9 +20503,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\notifications\NotificationClient.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\notifications\WorkerGlobalScopeNotifications.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\plugins\PluginReplacement.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\Modules\streams\ReadableStream.h&quot; /&gt;
-    &lt;ClInclude Include=&quot;..\Modules\streams\ReadableStreamController.h&quot; /&gt;
-    &lt;ClInclude Include=&quot;..\Modules\streams\ReadableStreamReader.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\webdatabase\AbstractDatabaseServer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\webdatabase\ChangeVersionData.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\webdatabase\ChangeVersionWrapper.h&quot; /&gt;
</span><span class="lines">@@ -22462,6 +22401,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSCustomXPathNSResolver.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSDictionary.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSDOMBinding.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\bindings\js\JSDOMConstructor.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSDOMGlobalObject.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSDOMGlobalObjectTask.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\js\JSDOMPromise.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,5 +1,4 @@
</span><del>-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
</del><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
</ins><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;Filter Include=&quot;DerivedSources&quot;&gt;
</span><span class="cx">       &lt;UniqueIdentifier&gt;{955487e8-94ad-45c1-9cc8-cb88911e9d7c}&lt;/UniqueIdentifier&gt;
</span><span class="lines">@@ -468,12 +467,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\notifications\WorkerGlobalScopeNotifications.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\notifications&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\Modules\streams\ReadableStream.cpp&quot;&gt;
-      &lt;Filter&gt;Modules\streams&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\Modules\streams\ReadableStreamReader.cpp&quot;&gt;
-      &lt;Filter&gt;Modules\streams&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\webdatabase\ChangeVersionWrapper.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\webdatabase&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -4404,18 +4397,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\js\JSPluginElementFunctions.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;bindings\js&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamCustom.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamPrivateConstructors.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;bindings\js&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamControllerCustom.cpp&quot;&gt;
-      &lt;Filter&gt;bindings\js&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\bindings\js\JSReadableStreamReaderCustom.cpp&quot;&gt;
-      &lt;Filter&gt;bindings\js&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\bindings\js\ReadableJSStream.cpp&quot;&gt;
-      &lt;Filter&gt;bindings\js&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\js\JSSQLResultSetRowListCustom.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;bindings\js&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -635,10 +635,10 @@
</span><span class="cx">                 14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D824060AF93AEB0004F057 /* ChromeClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DC0D3509FED073007B0235 /* JSNode.cpp */; };
</span><span class="cx">                 14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; settings = {ATTRIBUTES = (); }; };
</span><del>-                14DCF3B21B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */; };
-                14DCF3B31B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */; };
</del><span class="cx">                 14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */; };
</span><ins>+                14DCF3B21B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */; };
</ins><span class="cx">                 14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */; };
</span><ins>+                14DCF3B31B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */; };
</ins><span class="cx">                 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; };
</span><span class="cx">                 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
</span><span class="cx">                 14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1485,13 +1485,15 @@
</span><span class="cx">                 40ECAE7E16B8B67200C36103 /* JSDOMError.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ECAE7D16B8B67200C36103 /* JSDOMError.h */; };
</span><span class="cx">                 40ECAE8116B8B68A00C36103 /* JSDOMError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */; };
</span><span class="cx">                 410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */; };
</span><del>-                41189EF91AD8273700B90A0D /* JSReadableStreamControllerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */; };
</del><span class="cx">                 411A90421BBAB47A000CF156 /* WebCoreJSBuiltins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 411A90411BBAB46D000CF156 /* WebCoreJSBuiltins.cpp */; };
</span><span class="cx">                 4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93F19B1A08245E5A001E9ABC /* WebCore.framework */; };
</span><span class="cx">                 41230913138C42FF00BCCFCA /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8216299029F4FB501000131 /* JavaScriptCore.framework */; };
</span><span class="cx">                 4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */; };
</span><ins>+                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */; };
+                4129DF861BB5B80C00322A16 /* JSReadableStreamPrivateConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 4138D3351244054800323D33 /* EventContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4138D3331244054800323D33 /* EventContext.h */; };
</span><span class="cx">                 4138D3361244054800323D33 /* EventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4138D3341244054800323D33 /* EventContext.cpp */; };
</span><ins>+                413C2C341BC29A8F0075204C /* JSDOMConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */; settings = {ASSET_TAGS = (); }; };
</ins><span class="cx">                 415071571685067300C3C7B3 /* SelectorFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 415071551685067300C3C7B3 /* SelectorFilter.cpp */; };
</span><span class="cx">                 415071581685067300C3C7B3 /* SelectorFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 415071561685067300C3C7B3 /* SelectorFilter.h */; };
</span><span class="cx">                 4150F9F112B6E0E70008C860 /* SliderThumbElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */; };
</span><span class="lines">@@ -1521,16 +1523,8 @@
</span><span class="cx">                 418A06D1133C04D500CD379C /* EventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418A06CF133C04D500CD379C /* EventDispatcher.cpp */; };
</span><span class="cx">                 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */; };
</span><span class="cx">                 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; };
</span><del>-                4198BDF01A81142200B22FB5 /* ReadableJSStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */; };
-                4198BDF11A81143100B22FB5 /* ReadableJSStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */; };
</del><span class="cx">                 419BC2DE1685329900D64D6D /* VisitedLinkState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */; };
</span><span class="cx">                 419BC2DF1685329900D64D6D /* VisitedLinkState.h in Headers */ = {isa = PBXBuildFile; fileRef = 419BC2DD1685329900D64D6D /* VisitedLinkState.h */; };
</span><del>-                419FAFAE1ABABD08005B828B /* ReadableStreamReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */; };
-                419FAFAF1ABABD0C005B828B /* ReadableStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */; };
-                419FAFB11ABABDED005B828B /* JSReadableStreamReaderCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */; };
-                41A023EF1A39DB7A00F722CF /* ReadableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A023EB1A39DB7900F722CF /* ReadableStream.cpp */; };
-                41A023F01A39DB7A00F722CF /* ReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 41A023EC1A39DB7900F722CF /* ReadableStream.h */; };
-                41A023F61A39DBCB00F722CF /* JSReadableStreamCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */; };
</del><span class="cx">                 41A3D58E101C152D00316D07 /* DedicatedWorkerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */; };
</span><span class="cx">                 41A3D58F101C152D00316D07 /* DedicatedWorkerThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */; };
</span><span class="cx">                 41BF700C0FE86F49005E8DEC /* MessagePortChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 41BF700A0FE86F49005E8DEC /* MessagePortChannel.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7840,8 +7834,8 @@
</span><span class="cx">                 14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                148B4FFF1B6904C500C954E5 /* ByteLengthQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ByteLengthQueuingStrategy.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CountQueuingStrategy.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                148B4FFF1B6904C500C954E5 /* ByteLengthQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ByteLengthQueuingStrategy.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14993BE30B2F2B1C0050497F /* FocusController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FocusController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7864,10 +7858,10 @@
</span><span class="cx">                 14DC0D0B09FECFA4007B0235 /* Node.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Node.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14DC0D3509FED073007B0235 /* JSNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14DC0D3609FED073007B0235 /* JSNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSByteLengthQueuingStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSByteLengthQueuingStrategy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCountQueuingStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                14DCF3B01B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSByteLengthQueuingStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCountQueuingStrategy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                14DCF3B11B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSByteLengthQueuingStrategy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 14E836D209F8512000B85AE4 /* Event.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Event.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8768,13 +8762,16 @@
</span><span class="cx">                 40ECAE7D16B8B67200C36103 /* JSDOMError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMError.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMError.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                41189EF61AD8232800B90A0D /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 41189EF71AD8232800B90A0D /* ReadableStreamController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamControllerCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 411A90411BBAB46D000CF156 /* WebCoreJSBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreJSBuiltins.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                4129DF811BB5B79B00322A16 /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                4129DF821BB5B7A600322A16 /* ReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReader.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamPrivateConstructors.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamPrivateConstructors.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 4138D3331244054800323D33 /* EventContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4138D3341244054800323D33 /* EventContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 415071551685067300C3C7B3 /* SelectorFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorFilter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 415071561685067300C3C7B3 /* SelectorFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorFilter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderThumbElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8805,18 +8802,10 @@
</span><span class="cx">                 418A06CF133C04D500CD379C /* EventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbstractWorker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418F88030FF957AE0080F045 /* JSAbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbstractWorker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableJSStream.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableJSStream.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 419BC2DD1685329900D64D6D /* VisitedLinkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamReader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReader.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamReader.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamReaderCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                41A023EB1A39DB7900F722CF /* ReadableStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStream.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                41A023EC1A39DB7900F722CF /* ReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStream.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DedicatedWorkerThread.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DedicatedWorkerThread.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41BF700A0FE86F49005E8DEC /* MessagePortChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagePortChannel.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16277,14 +16266,11 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 148B4FFF1B6904C500C954E5 /* ByteLengthQueuingStrategy.idl */,
</span><ins>+                                4129DF821BB5B7A600322A16 /* ReadableStreamReader.h */,
+                                4129DF811BB5B79B00322A16 /* ReadableStreamController.h */,
</ins><span class="cx">                                 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
</span><del>-                                41A023EB1A39DB7900F722CF /* ReadableStream.cpp */,
-                                41A023EC1A39DB7900F722CF /* ReadableStream.h */,
</del><span class="cx">                                 41A023ED1A39DB7900F722CF /* ReadableStream.idl */,
</span><del>-                                41189EF61AD8232800B90A0D /* ReadableStreamController.h */,
</del><span class="cx">                                 41189EF71AD8232800B90A0D /* ReadableStreamController.idl */,
</span><del>-                                419FAFAB1ABABCD5005B828B /* ReadableStreamReader.cpp */,
-                                419FAFAC1ABABCD5005B828B /* ReadableStreamReader.h */,
</del><span class="cx">                                 419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */,
</span><span class="cx">                         );
</span><span class="cx">                         path = streams;
</span><span class="lines">@@ -21628,6 +21614,7 @@
</span><span class="cx">                                 ADDA94BF19686F8000453029 /* JSDocumentCustom.h */,
</span><span class="cx">                                 93B70D4709EB0C7C009D8468 /* JSDOMBinding.cpp */,
</span><span class="cx">                                 93B70D4809EB0C7C009D8468 /* JSDOMBinding.h */,
</span><ins>+                                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
</ins><span class="cx">                                 E1C36CBC0EB08062007410BC /* JSDOMGlobalObject.cpp */,
</span><span class="cx">                                 E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */,
</span><span class="cx">                                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */,
</span><span class="lines">@@ -21656,13 +21643,12 @@
</span><span class="cx">                                 7C91A38E1B498ABE003F9EFA /* JSNodeOrString.h */,
</span><span class="cx">                                 93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
</span><span class="cx">                                 93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
</span><del>-                                41189EF81AD8233C00B90A0D /* JSReadableStreamControllerCustom.cpp */,
</del><ins>+                                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */,
+                                4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */,
</ins><span class="cx">                                 E1C36D320EB0A094007410BC /* JSWorkerGlobalScopeBase.cpp */,
</span><span class="cx">                                 E1C36D330EB0A094007410BC /* JSWorkerGlobalScopeBase.h */,
</span><span class="cx">                                 E38838941BAD145F00D62EE3 /* JSModuleLoader.cpp */,
</span><span class="cx">                                 E38838951BAD145F00D62EE3 /* JSModuleLoader.h */,
</span><del>-                                4198BDEE1A81123600B22FB5 /* ReadableJSStream.cpp */,
-                                4198BDEF1A81123600B22FB5 /* ReadableJSStream.h */,
</del><span class="cx">                                 BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */,
</span><span class="cx">                                 BCA378BB0D15F64200B793D6 /* ScheduledAction.h */,
</span><span class="cx">                                 41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */,
</span><span class="lines">@@ -21831,8 +21817,6 @@
</span><span class="cx">                                 FDBD1DFB167FE27D0051A11E /* JSOscillatorNodeCustom.cpp */,
</span><span class="cx">                                 FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */,
</span><span class="cx">                                 A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
</span><del>-                                41A023F31A39DBCB00F722CF /* JSReadableStreamCustom.cpp */,
-                                419FAFB01ABABD7B005B828B /* JSReadableStreamReaderCustom.cpp */,
</del><span class="cx">                                 4AE0BF881836083100F3852D /* JSRTCIceCandidateCustom.cpp */,
</span><span class="cx">                                 07CA120D182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp */,
</span><span class="cx">                                 07D07B131834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp */,
</span><span class="lines">@@ -26011,6 +25995,7 @@
</span><span class="cx">                                 B2FA3D4F0AB75A6F000E5AC4 /* JSSVGAnimatedString.h in Headers */,
</span><span class="cx">                                 B2FA3D510AB75A6F000E5AC4 /* JSSVGAnimatedTransformList.h in Headers */,
</span><span class="cx">                                 B2FA3D530AB75A6F000E5AC4 /* JSSVGAnimateElement.h in Headers */,
</span><ins>+                                413C2C341BC29A8F0075204C /* JSDOMConstructor.h in Headers */,
</ins><span class="cx">                                 4496E39E1398136C003EE32A /* JSSVGAnimateMotionElement.h in Headers */,
</span><span class="cx">                                 B2FA3D550AB75A6F000E5AC4 /* JSSVGAnimateTransformElement.h in Headers */,
</span><span class="cx">                                 B2FA3D570AB75A6F000E5AC4 /* JSSVGAnimationElement.h in Headers */,
</span><span class="lines">@@ -26416,6 +26401,7 @@
</span><span class="cx">                                 CE1252491A16C3BC00864480 /* MobileGestaltSPI.h in Headers */,
</span><span class="cx">                                 CDF2B0111820540600F2B424 /* MockBox.h in Headers */,
</span><span class="cx">                                 CDF2B0131820540600F2B424 /* MockMediaPlayerMediaSource.h in Headers */,
</span><ins>+                                4129DF861BB5B80C00322A16 /* JSReadableStreamPrivateConstructors.h in Headers */,
</ins><span class="cx">                                 CDF2B0151820540600F2B424 /* MockMediaSourcePrivate.h in Headers */,
</span><span class="cx">                                 4A0FFA9E1AAF5E7E0062803B /* MockRealtimeMediaSourceCenter.h in Headers */,
</span><span class="cx">                                 CDF2B0171820540700F2B424 /* MockSourceBufferPrivate.h in Headers */,
</span><span class="lines">@@ -26683,9 +26669,6 @@
</span><span class="cx">                                 F55B3DCE1251F12D003EF269 /* RangeInputType.h in Headers */,
</span><span class="cx">                                 6E84E9E117668BF100815B68 /* RasterShape.h in Headers */,
</span><span class="cx">                                 A84D827C11D333ED00972990 /* RawDataDocumentParser.h in Headers */,
</span><del>-                                4198BDF11A81143100B22FB5 /* ReadableJSStream.h in Headers */,
-                                41A023F01A39DB7A00F722CF /* ReadableStream.h in Headers */,
-                                419FAFAF1ABABD0C005B828B /* ReadableStreamReader.h in Headers */,
</del><span class="cx">                                 FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */,
</span><span class="cx">                                 4A4F65711AA997F100E38CDD /* RealtimeMediaSource.h in Headers */,
</span><span class="cx">                                 4A4F65721AA997F100E38CDD /* RealtimeMediaSourceCapabilities.h in Headers */,
</span><span class="lines">@@ -29592,10 +29575,7 @@
</span><span class="cx">                                 65DF320109D1CC60000BE325 /* JSRange.cpp in Sources */,
</span><span class="cx">                                 7C4C96DC1AD4483500365A50 /* JSReadableStream.cpp in Sources */,
</span><span class="cx">                                 6C4C96DE1AD4483500365A50 /* JSReadableStreamController.cpp in Sources */,
</span><del>-                                41189EF91AD8273700B90A0D /* JSReadableStreamControllerCustom.cpp in Sources */,
-                                41A023F61A39DBCB00F722CF /* JSReadableStreamCustom.cpp in Sources */,
</del><span class="cx">                                 7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */,
</span><del>-                                419FAFB11ABABDED005B828B /* JSReadableStreamReaderCustom.cpp in Sources */,
</del><span class="cx">                                 BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
</span><span class="cx">                                 4998AECD13F9D6C90090B1AA /* JSRequestAnimationFrameCallback.cpp in Sources */,
</span><span class="cx">                                 BC74DA481013F468007987AD /* JSRGBColor.cpp in Sources */,
</span><span class="lines">@@ -30106,6 +30086,7 @@
</span><span class="cx">                                 267726001A5B3AD9003C24DD /* NFAToDFA.cpp in Sources */,
</span><span class="cx">                                 BCEF43E00E674110001C1287 /* NinePieceImage.cpp in Sources */,
</span><span class="cx">                                 A8C4A80009D563270003AC8D /* Node.cpp in Sources */,
</span><ins>+                                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */,
</ins><span class="cx">                                 854FE7320A2297BE0058D7AD /* NodeFilterCondition.cpp in Sources */,
</span><span class="cx">                                 854FE7340A2297BE0058D7AD /* NodeIterator.cpp in Sources */,
</span><span class="cx">                                 7CEAC1091B483D7F00334482 /* NodeOrString.cpp in Sources */,
</span><span class="lines">@@ -30248,9 +30229,6 @@
</span><span class="cx">                                 93F19AB908245E59001E9ABC /* Range.cpp in Sources */,
</span><span class="cx">                                 F55B3DCD1251F12D003EF269 /* RangeInputType.cpp in Sources */,
</span><span class="cx">                                 6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
</span><del>-                                4198BDF01A81142200B22FB5 /* ReadableJSStream.cpp in Sources */,
-                                41A023EF1A39DB7A00F722CF /* ReadableStream.cpp in Sources */,
-                                419FAFAE1ABABD08005B828B /* ReadableStreamReader.cpp in Sources */,
</del><span class="cx">                                 FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */,
</span><span class="cx">                                 4A4F65701AA997F100E38CDD /* RealtimeMediaSource.cpp in Sources */,
</span><span class="cx">                                 4A0FFAA11AAF5EA20062803B /* RealtimeMediaSourceCenter.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -117,12 +117,7 @@
</span><span class="cx"> #include &quot;JSNodeOrString.cpp&quot;
</span><span class="cx"> #include &quot;JSPluginElementFunctions.cpp&quot;
</span><span class="cx"> #include &quot;JSPopStateEventCustom.cpp&quot;
</span><del>-#if ENABLE(STREAMS_API)
-#include &quot;JSReadableStreamControllerCustom.cpp&quot;
-#include &quot;JSReadableStreamCustom.cpp&quot;
-#include &quot;JSReadableStreamReaderCustom.cpp&quot;
-#include &quot;ReadableJSStream.cpp&quot;
-#endif
</del><ins>+#include &quot;JSReadableStreamPrivateConstructors.cpp&quot;
</ins><span class="cx"> #include &quot;JSSQLResultSetRowListCustom.cpp&quot;
</span><span class="cx"> #include &quot;JSSQLTransactionCustom.cpp&quot;
</span><span class="cx"> #include &quot;JSSVGLengthCustom.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMConstructor.h (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructor.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructor.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ *  Copyright (C) 2015 Canon Inc. All rights reserved.
+ *
+ *  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
+ */
+
+#ifndef JSDOMConstructor_h
+#define JSDOMConstructor_h
+
+#include &quot;JSDOMBinding.h&quot;
+
+namespace WebCore {
+
+template &lt;typename JSClass&gt; class JSBuiltinConstructor : public DOMConstructorJSBuiltinObject {
+public:
+    typedef DOMConstructorJSBuiltinObject Base;
+
+    static JSBuiltinConstructor* create(JSC::VM&amp; vm, JSC::Structure* structure, JSDOMGlobalObject&amp; globalObject)
+    {
+        JSBuiltinConstructor* constructor = new (NotNull, JSC::allocateCell&lt;JSBuiltinConstructor&gt;(vm.heap)) JSBuiltinConstructor(structure, globalObject);
+        constructor-&gt;finishCreation(vm, globalObject);
+        return constructor;
+    }
+
+    static JSC::Structure* createStructure(JSC::VM&amp; vm, JSC::JSGlobalObject&amp; globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, &amp;globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+    DECLARE_INFO;
+
+private:
+    JSBuiltinConstructor(JSC::Structure* structure, JSDOMGlobalObject&amp; globalObject): Base(structure, &amp;globalObject) { }
+
+    void finishCreation(JSC::VM&amp;, JSDOMGlobalObject&amp;);
+    void initializeProperties(JSC::VM&amp;, JSDOMGlobalObject&amp;) { }
+    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&amp;);
+    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
+
+    // Must be defined for each specialization class.
+    JSC::JSFunction* createInitializeFunction(JSC::VM&amp;, JSC::JSGlobalObject&amp;);
+    JSC::JSObject* createJSObject();
+};
+
+template&lt;typename JSClass&gt; void JSBuiltinConstructor&lt;JSClass&gt;::finishCreation(JSC::VM&amp; vm, JSDOMGlobalObject&amp; globalObject)
+{
+    Base::finishCreation(vm);
+    ASSERT(inherits(info()));
+    setInitializeFunction(vm, *createInitializeFunction(vm, globalObject));
+    initializeProperties(vm, globalObject);
+}
+
+template&lt;typename JSClass&gt; JSC::EncodedJSValue JSC_HOST_CALL JSBuiltinConstructor&lt;JSClass&gt;::construct(JSC::ExecState* state)
+{
+    auto* castedThis = JSC::jsCast&lt;JSBuiltinConstructor*&gt;(state-&gt;callee());
+    JSObject* object = castedThis-&gt;createJSObject();
+    callFunctionWithCurrentArguments(*state, *object, *castedThis-&gt;initializeFunction());
+    return JSC::JSValue::encode(object);
+}
+
+template&lt;typename JSClass&gt; JSC::ConstructType JSBuiltinConstructor&lt;JSClass&gt;::getConstructData(JSC::JSCell*, JSC::ConstructData&amp; constructData)
+{
+    constructData.native.function = construct;
+    return JSC::ConstructTypeHost;
+}
+
+} // namespace WebCore
+
+#endif // JSDOMConstructor_h
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><ins>+#include &quot;JSReadableStreamPrivateConstructors.h&quot;
</ins><span class="cx"> #include &quot;ReadableStreamInternalsBuiltins.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -88,6 +89,11 @@
</span><span class="cx">         GlobalPropertyInfo(vm.propertyNames-&gt;document, jsNull(), DontDelete | ReadOnly),
</span><span class="cx">         GlobalPropertyInfo(vm.propertyNames-&gt;window, m_shell, DontDelete | ReadOnly),
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><ins>+        GlobalPropertyInfo(static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;builtinNames().readableStreamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
+        GlobalPropertyInfo(static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;builtinNames().readableStreamErroredPrivateName(), jsNumber(2), DontDelete | ReadOnly),
+        GlobalPropertyInfo(static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;builtinNames().readableStreamReadablePrivateName(), jsNumber(3), DontDelete | ReadOnly),
+        GlobalPropertyInfo(static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
+        GlobalPropertyInfo(static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
</ins><span class="cx"> #define DECLARE_GLOBAL_STATIC(name)\
</span><span class="cx">         GlobalPropertyInfo(\
</span><span class="cx">             static_cast&lt;WebCoreJSClientData*&gt;(vm.clientData)-&gt;readableStreamInternalsBuiltins().name##PrivateName(),\
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamControllerCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSReadableStreamControllerCustom.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamControllerCustom.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamControllerCustom.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;JSReadableStreamController.h&quot;
-
-#if ENABLE(STREAMS_API)
-
-#include &quot;JSDOMBinding.h&quot;
-#include &quot;ReadableJSStream.h&quot;
-#include &lt;runtime/Error.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-EncodedJSValue JSC_HOST_CALL constructJSReadableStreamController(ExecState* exec)
-{
-    return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;ReadableStreamController constructor should not be called directly&quot;)));
-}
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSReadableStreamCustom.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamCustom.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamCustom.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(STREAMS_API)
-#include &quot;JSReadableStream.h&quot;
-
-#include &quot;ExceptionCode.h&quot;
-#include &quot;JSDOMBinding.h&quot;
-#include &quot;JSDOMPromise.h&quot;
-#include &quot;JSReadableStreamReader.h&quot;
-#include &quot;ReadableJSStream.h&quot;
-#include &quot;ReadableStream.h&quot;
-#include &quot;ReadableStreamReader.h&quot;
-#include &lt;runtime/Error.h&gt;
-#include &lt;runtime/Exception.h&gt;
-#include &lt;wtf/NeverDestroyed.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSReadableStream::pipeTo(ExecState&amp; state)
-{
-    JSValue error = createError(&amp;state, ASCIILiteral(&quot;pipeTo is not implemented&quot;));
-    return state.vm().throwException(&amp;state, error);
-}
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+/*
+ *  Copyright (C) 2015 Canon Inc. All rights reserved.
+ *
+ *  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;JSReadableStreamPrivateConstructors.h&quot;
+
+#if ENABLE(STREAMS_API)
+
+#include &quot;JSDOMBinding.h&quot;
+#include &quot;JSDOMConstructor.h&quot;
+#include &quot;JSReadableStream.h&quot;
+#include &quot;JSReadableStreamController.h&quot;
+#include &quot;JSReadableStreamReader.h&quot;
+#include &quot;ReadableStreamInternalsBuiltins.h&quot;
+#include &lt;runtime/CallData.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+// Public JS ReadableStreamReder and ReadableStreamController constructor callbacks.
+EncodedJSValue JSC_HOST_CALL constructJSReadableStreamController(ExecState* state)
+{
+    return throwVMError(state, createTypeError(state, ASCIILiteral(&quot;ReadableStreamController constructor should not be called directly&quot;)));
+}
+
+EncodedJSValue JSC_HOST_CALL constructJSReadableStreamReader(ExecState* state)
+{
+    JSReadableStream* stream = jsDynamicCast&lt;JSReadableStream*&gt;(state-&gt;argument(0));
+    if (!stream)
+        return throwVMError(state, createTypeError(state, ASCIILiteral(&quot;ReadableStreamReader constructor parameter is not a ReadableStream&quot;)));
+
+    JSValue jsFunction = stream-&gt;get(state, Identifier::fromString(state, &quot;getReader&quot;));
+
+    CallData callData;
+    CallType callType = getCallData(jsFunction, callData);
+    MarkedArgumentBuffer noArguments;
+    return JSValue::encode(call(state, jsFunction, callType, callData, stream, noArguments));
+}
+
+// Private JS ReadableStreamReder and ReadableStreamController constructors.
+typedef JSBuiltinConstructor&lt;JSReadableStreamReader&gt; JSBuiltinReadableStreamReaderPrivateConstructor;
+typedef JSBuiltinConstructor&lt;JSReadableStreamController&gt; JSBuiltinReadableStreamControllerPrivateConstructor;
+
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamReaderPrivateConstructor);
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamControllerPrivateConstructor);
+
+template&lt;&gt; const ClassInfo JSBuiltinReadableStreamReaderPrivateConstructor::s_info = { &quot;ReadableStreamReaderPrivateConstructor&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSBuiltinReadableStreamReaderPrivateConstructor) };
+template&lt;&gt; const ClassInfo JSBuiltinReadableStreamControllerPrivateConstructor::s_info = { &quot;ReadableStreamControllerPrivateConstructor&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSBuiltinReadableStreamControllerPrivateConstructor) };
+
+template&lt;&gt; JSObject* JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject()
+{
+    return JSReadableStreamReader::create(getDOMStructure&lt;JSReadableStreamReader&gt;(globalObject()-&gt;vm(), globalObject()), globalObject(), ReadableStreamReader::create());
+}
+
+template&lt;&gt; JSObject* JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject()
+{
+    return JSReadableStreamController::create(getDOMStructure&lt;JSReadableStreamController&gt;(globalObject()-&gt;vm(), globalObject()), globalObject(), ReadableStreamController::create());
+}
+
+template&lt;&gt; JSFunction* JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction(JSC::VM&amp; vm, JSC::JSGlobalObject&amp; globalObject)
+{
+    return JSFunction::createBuiltinFunction(vm, readableStreamInternalsPrivateInitializeReadableStreamReaderCodeGenerator(vm), &amp;globalObject);
+}
+
+template&lt;&gt; JSFunction* JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction(JSC::VM&amp; vm, JSC::JSGlobalObject&amp; globalObject)
+{
+    return JSFunction::createBuiltinFunction(vm, readableStreamInternalsPrivateInitializeReadableStreamControllerCodeGenerator(vm), &amp;globalObject);
+}
+
+JSValue createReadableStreamReaderPrivateConstructor(VM&amp; vm, JSDOMGlobalObject&amp; globalObject)
+{
+    return JSBuiltinReadableStreamReaderPrivateConstructor::create(vm, JSBuiltinReadableStreamReaderPrivateConstructor::createStructure(vm, globalObject, globalObject.objectPrototype()), globalObject);
+}
+
+JSValue createReadableStreamControllerPrivateConstructor(VM&amp; vm, JSDOMGlobalObject&amp; globalObject)
+{
+    return JSBuiltinReadableStreamControllerPrivateConstructor::create(vm, JSBuiltinReadableStreamControllerPrivateConstructor::createStructure(vm, globalObject, globalObject.objectPrototype()), globalObject);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ *  Copyright (C) 2015 Canon Inc. All rights reserved.
+ *
+ *  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
+ */
+
+#ifndef JSReadableStreamPrivateConstructors_h
+#define JSReadableStreamPrivateConstructors_h
+
+#if ENABLE(STREAMS_API)
+
+#include &lt;runtime/JSCJSValue.h&gt;
+
+namespace WebCore {
+
+class JSDOMGlobalObject;
+
+JSC::JSValue createReadableStreamControllerPrivateConstructor(JSC::VM&amp;, JSDOMGlobalObject&amp;);
+JSC::JSValue createReadableStreamReaderPrivateConstructor(JSC::VM&amp;, JSDOMGlobalObject&amp;);
+
+} // namespace WebCore
+
+#endif
+
+#endif // ReadableStreamConstructors_h
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamReaderCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,77 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(STREAMS_API)
-#include &quot;JSReadableStreamReader.h&quot;
-
-#include &quot;ExceptionCode.h&quot;
-#include &quot;JSDOMPromise.h&quot;
-#include &quot;JSReadableStream.h&quot;
-#include &quot;ReadableJSStream.h&quot;
-#include &lt;runtime/Error.h&gt;
-#include &lt;runtime/IteratorOperations.h&gt;
-#include &lt;wtf/NeverDestroyed.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSReadableStreamReader::closed(ExecState&amp; state) const
-{
-    if (!m_closed) {
-        JSPromiseDeferred* closedPromise = JSPromiseDeferred::create(&amp;state, globalObject());
-        m_closed.set(state.vm(), this, closedPromise-&gt;promise());
-        impl().closed(DeferredWrapper(&amp;state, globalObject(), closedPromise));
-    }
-    return m_closed.get();
-}
-
-EncodedJSValue JSC_HOST_CALL constructJSReadableStreamReader(ExecState* exec)
-{
-    if (!exec-&gt;argumentCount())
-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;ReadableStreamReader constructor takes a ReadableStream as parameter&quot;)));
-
-    JSReadableStream* stream = jsDynamicCast&lt;JSReadableStream*&gt;(exec-&gt;argument(0));
-    if (!stream)
-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;ReadableStreamReader constructor parameter is not a ReadableStream&quot;)));
-
-    if (stream-&gt;impl().locked())
-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;ReadableStreamReader constructor parameter is a locked ReadableStream&quot;)));
-
-    ExceptionCode ec = 0;
-    EncodedJSValue value = JSValue::encode(toJS(exec, stream-&gt;globalObject(), stream-&gt;impl().getReader(ec)));
-    ASSERT(!ec);
-    return value;
-}
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableJSStreamcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,374 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;ReadableJSStream.h&quot;
-
-#if ENABLE(STREAMS_API)
-
-#include &quot;DOMWrapperWorld.h&quot;
-#include &quot;Dictionary.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;JSDOMPromise.h&quot;
-#include &quot;JSReadableStream.h&quot;
-#include &quot;JSReadableStreamController.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;ScriptState.h&quot;
-#include &lt;runtime/Error.h&gt;
-#include &lt;runtime/Exception.h&gt;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-#include &lt;runtime/JSNativeStdFunction.h&gt;
-#include &lt;runtime/JSPromise.h&gt;
-#include &lt;runtime/JSString.h&gt;
-#include &lt;runtime/StructureInlines.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-static inline JSValue callFunction(ExecState&amp; exec, JSValue jsFunction, JSValue thisValue, const ArgList&amp; arguments)
-{
-    CallData callData;
-    CallType callType = getCallData(jsFunction, callData);
-    return call(&amp;exec, jsFunction, callType, callData, thisValue, arguments);
-}
-
-JSPromise* ReadableJSStream::invoke(ExecState&amp; state, const char* propertyName, JSValue parameter)
-{
-    JSValue function = getPropertyFromObject(state, *m_source.get(), propertyName);
-    if (state.hadException())
-        return nullptr;
-
-    if (!function.isFunction()) {
-        if (!function.isUndefined())
-            throwVMError(&amp;state, createTypeError(&amp;state, ASCIILiteral(&quot;ReadableStream trying to call a property that is not callable&quot;)));
-        return nullptr;
-    }
-
-    MarkedArgumentBuffer arguments;
-    arguments.append(parameter);
-
-    JSPromise* promise = jsDynamicCast&lt;JSPromise*&gt;(callFunction(state, function, m_source.get(), arguments));
-
-    ASSERT(!(promise &amp;&amp; state.hadException()));
-    return promise;
-}
-
-static void thenPromise(ExecState&amp; state, JSPromise* deferredPromise, JSValue fullfilFunction, JSValue rejectFunction)
-{
-    JSValue thenValue = deferredPromise-&gt;get(&amp;state, state.vm().propertyNames-&gt;then);
-    if (state.hadException())
-        return;
-
-    MarkedArgumentBuffer arguments;
-    arguments.append(fullfilFunction);
-    arguments.append(rejectFunction);
-
-    callFunction(state, thenValue, deferredPromise, arguments);
-}
-
-JSDOMGlobalObject* ReadableJSStream::globalObject()
-{
-    return jsDynamicCast&lt;JSDOMGlobalObject*&gt;(m_source-&gt;globalObject());
-}
-
-static inline JSFunction* createGenericErrorRejectedFunction(ExecState&amp; state, ReadableJSStream&amp; readableStream)
-{
-    RefPtr&lt;ReadableJSStream&gt; stream = &amp;readableStream;
-    return JSNativeStdFunction::create(state.vm(), state.callee()-&gt;globalObject(), 1, String(), [stream](ExecState* state) {
-        stream-&gt;storeError(*state, state-&gt;argument(0));
-        return JSValue::encode(jsUndefined());
-    });
-}
-
-static inline JSFunction* createStartResultFulfilledFunction(ExecState&amp; state, ReadableStream&amp; readableStream)
-{
-    RefPtr&lt;ReadableStream&gt; stream = &amp;readableStream;
-    return JSNativeStdFunction::create(state.vm(), state.callee()-&gt;globalObject(), 1, String(), [stream](ExecState*) {
-        stream-&gt;start();
-        return JSValue::encode(jsUndefined());
-    });
-}
-
-static inline void startReadableStreamAsync(ReadableStream&amp; stream)
-{
-    RefPtr&lt;ReadableStream&gt; protectedStream = &amp;stream;
-    stream.scriptExecutionContext()-&gt;postTask([protectedStream](ScriptExecutionContext&amp;) {
-        protectedStream-&gt;start();
-    });
-}
-
-JSC::JSValue ReadableEnqueuingStream&lt;ReadableJSStreamValue&gt;::read()
-{
-    ReadableJSStreamValue chunk = m_queue.takeFirst();
-    m_totalQueueSize -= chunk.size;
-    return chunk.value.get();
-}
-
-void ReadableEnqueuingStream&lt;ReadableJSStreamValue&gt;::enqueueChunk(ReadableJSStreamValue&amp;&amp; chunk)
-{
-    m_totalQueueSize += chunk.size;
-    m_queue.append(WTF::move(chunk));
-}
-
-void ReadableJSStream::doStart(ExecState&amp; exec)
-{
-    JSLockHolder lock(&amp;exec);
-
-    JSPromise* promise = invoke(exec, &quot;start&quot;, jsController(exec, globalObject()));
-
-    if (exec.hadException())
-        return;
-
-    if (!promise) {
-        startReadableStreamAsync(*this);
-        return;
-    }
-
-    thenPromise(exec, promise, createStartResultFulfilledFunction(exec, *this), createGenericErrorRejectedFunction(exec, *this));
-}
-
-static inline JSFunction* createPullResultFulfilledFunction(ExecState&amp; exec, ReadableStream&amp; stream)
-{
-    RefPtr&lt;ReadableStream&gt; protectedStream = &amp;stream;
-    return JSNativeStdFunction::create(exec.vm(), exec.callee()-&gt;globalObject(), 0, String(), [protectedStream](ExecState*) {
-        protectedStream-&gt;finishPulling();
-        return JSValue::encode(jsUndefined());
-    });
-}
-
-bool ReadableJSStream::doPull()
-{
-    ExecState&amp; state = *globalObject()-&gt;globalExec();
-    JSLockHolder lock(&amp;state);
-
-    JSPromise* promise = invoke(state, &quot;pull&quot;, jsController(state, globalObject()));
-
-    if (promise)
-        thenPromise(state, promise, createPullResultFulfilledFunction(state, *this), createGenericErrorRejectedFunction(state, *this));
-
-    if (state.hadException()) {
-        storeException(state);
-        ASSERT(!state.hadException());
-        return true;
-    }
-
-    return !promise;
-}
-
-static JSFunction* createCancelResultFulfilledFunction(ExecState&amp; exec, ReadableStream&amp; stream)
-{
-    RefPtr&lt;ReadableStream&gt; protectedStream = &amp;stream;
-    return JSNativeStdFunction::create(exec.vm(), exec.callee()-&gt;globalObject(), 1, String(), [protectedStream](ExecState*) {
-        protectedStream-&gt;notifyCancelSucceeded();
-        return JSValue::encode(jsUndefined());
-    });
-}
-
-static JSFunction* createCancelResultRejectedFunction(ExecState&amp; exec, ReadableJSStream&amp; stream)
-{
-    RefPtr&lt;ReadableJSStream&gt; protectedStream = &amp;stream;
-    return JSNativeStdFunction::create(exec.vm(), exec.callee()-&gt;globalObject(), 1, String(), [protectedStream](ExecState* exec) {
-        protectedStream-&gt;storeError(*exec, exec-&gt;argument(0));
-        protectedStream-&gt;notifyCancelFailed();
-        return JSValue::encode(jsUndefined());
-    });
-}
-
-bool ReadableJSStream::doCancel(JSValue reason)
-{
-    ExecState&amp; exec = *globalObject()-&gt;globalExec();
-    JSLockHolder lock(&amp;exec);
-
-    JSPromise* promise = invoke(exec, &quot;cancel&quot;, reason);
-
-    if (promise)
-        thenPromise(exec, promise, createCancelResultFulfilledFunction(exec, *this), createCancelResultRejectedFunction(exec, *this));
-
-    if (exec.hadException()) {
-        storeException(exec);
-        ASSERT(!exec.hadException());
-        return true;
-    }
-    return !promise;
-}
-
-RefPtr&lt;ReadableJSStream&gt; ReadableJSStream::create(JSC::ExecState&amp; state, JSC::JSValue source, const Dictionary&amp; strategy)
-{
-    JSObject* jsSource;
-    if (source.isObject())
-        jsSource = source.getObject();
-    else if (!source.isUndefined()) {
-        throwVMTypeError(&amp;state, &quot;Argument 1 of ReadableStream constructor must be an object&quot;);
-        return nullptr;
-    } else
-        jsSource = JSFinalObject::create(state.vm(), JSFinalObject::createStructure(state.vm(), state.callee()-&gt;globalObject(), jsNull(), 1));
-
-    double highWaterMark = 1;
-    JSFunction* sizeFunction = nullptr;
-    if (!strategy.isUndefinedOrNull()) {
-        if (strategy.get(&quot;highWaterMark&quot;, highWaterMark)) {
-            if (std::isnan(highWaterMark)) {
-                throwVMTypeError(&amp;state, &quot;'highWaterMark' of Argument 2 of ReadableStream constructor cannot be NaN&quot;);
-                return nullptr;
-            }
-            if (highWaterMark &lt; 0) {
-                throwVMRangeError(&amp;state, &quot;'highWaterMark' of Argument 2 of ReadableStream constructor cannot be negative&quot;);
-                return nullptr;
-            }
-
-        } else if (state.hadException())
-            return nullptr;
-
-        if (strategy.get(&quot;size&quot;, sizeFunction)) {
-            if (!sizeFunction) {
-                throwVMTypeError(&amp;state, &quot;'size' of Argument 2 of ReadableStream constructor must be a function&quot;);
-                return nullptr;
-            }
-        } else if (state.hadException())
-            return nullptr;
-    }
-
-    RefPtr&lt;ReadableJSStream&gt; readableStream = adoptRef(*new ReadableJSStream(state, jsSource, highWaterMark, sizeFunction));
-    readableStream-&gt;doStart(state);
-
-    if (state.hadException())
-        return nullptr;
-
-    return readableStream;
-}
-
-ReadableJSStream::ReadableJSStream(ExecState&amp; state, JSObject* source, double highWaterMark, JSFunction* sizeFunction)
-    : ReadableEnqueuingStream&lt;ReadableJSStreamValue&gt;(*scriptExecutionContextFromExecState(&amp;state), highWaterMark)
-{
-    m_source.set(state.vm(), source);
-    if (sizeFunction)
-        m_sizeFunction.set(state.vm(), sizeFunction);
-}
-
-JSValue ReadableJSStream::jsController(ExecState&amp; exec, JSDOMGlobalObject* globalObject)
-{
-    if (!m_controller)
-        m_controller = std::make_unique&lt;ReadableStreamController&gt;(*this);
-    return toJS(&amp;exec, globalObject, m_controller.get());
-}
-
-void ReadableJSStream::close(ExceptionCode&amp; ec)
-{
-    if (isCloseRequested() || isErrored()) {
-        ec = TypeError;
-        return;
-    }
-    changeStateToClosed();
-}
-
-void ReadableJSStream::error(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCode&amp; ec)
-{
-    if (!isReadable()) {
-        ec = TypeError;
-        return;
-    }
-    storeError(state, value);
-}
-
-void ReadableJSStream::storeException(JSC::ExecState&amp; state)
-{
-    JSValue exception = state.exception()-&gt;value();
-    state.clearException();
-    storeError(state, exception);
-}
-
-void ReadableJSStream::storeError(JSC::ExecState&amp; exec, JSValue error)
-{
-    if (m_error)
-        return;
-    m_error.set(exec.vm(), error);
-
-    changeStateToErrored();
-}
-
-void ReadableJSStream::enqueue(JSC::ExecState&amp; state, JSC::JSValue chunk)
-{
-    if (isErrored()) {
-        throwVMError(&amp;state, error());
-        return;
-    }
-    if (isCloseRequested()) {
-        throwVMError(&amp;state, createDOMException(&amp;state, TypeError));
-        return;
-    }
-    if (!isReadable())
-        return;
-
-    if (resolveReadCallback(chunk)) {
-        pull();
-        return;
-    }
-
-    double size = retrieveChunkSize(state, chunk);
-    if (state.hadException())
-        return;
-
-    enqueueChunk({ JSC::Strong&lt;JSC::Unknown&gt;(state.vm(), chunk), size });
-
-    pull();
-}
-
-double ReadableJSStream::retrieveChunkSize(ExecState&amp; state, JSValue chunk)
-{
-    if (!m_sizeFunction)
-        return 1;
-
-    MarkedArgumentBuffer arguments;
-    arguments.append(chunk);
-
-    JSValue sizeValue = callFunction(state, m_sizeFunction.get(), jsUndefined(), arguments);
-    if (state.hadException()) {
-        storeError(state, state.exception()-&gt;value());
-        return 0;
-    }
-
-    double size = sizeValue.toNumber(&amp;state);
-    if (state.hadException()) {
-        storeError(state, state.exception()-&gt;value());
-        return 0;
-    }
-
-    if (!std::isfinite(size) || size &lt; 0) {
-        storeError(state, createDOMException(&amp;state, RangeError));
-        throwVMError(&amp;state, error());
-        return 0;
-    }
-
-    return size;
-}
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableJSStreamh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/ReadableJSStream.h (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableJSStream.h        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/ReadableJSStream.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -1,122 +0,0 @@
</span><del>-/*
- * Copyright (C) 2O15 Canon Inc. 2015
- * Copyright (C) 2015 Igalia S.L. 2015
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be 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.
- * 3.  Neither the name of Canon Inc. nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 CANON INC. AND 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.
- */
-
-#ifndef ReadableJSStream_h
-#define ReadableJSStream_h
-
-#if ENABLE(STREAMS_API)
-
-#include &quot;ReadableStream.h&quot;
-#include &lt;heap/Strong.h&gt;
-#include &lt;heap/StrongInlines.h&gt;
-#include &lt;runtime/JSCJSValue.h&gt;
-#include &lt;runtime/PrivateName.h&gt;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/Ref.h&gt;
-
-namespace JSC {
-class JSFunction;
-class JSPromise;
-}
-    
-namespace WebCore {
-
-class JSDOMGlobalObject;
-class ReadableStreamController;
-
-typedef int ExceptionCode;
-
-struct ReadableJSStreamValue {
-    JSC::Strong&lt;JSC::Unknown&gt; value;
-    double size;
-};
-
-template&lt;&gt; class ReadableEnqueuingStream&lt;ReadableJSStreamValue&gt; : public ReadableStream {
-public:
-    double desiredSize() const { return m_highWaterMark - m_totalQueueSize; }
-
-protected:
-    ReadableEnqueuingStream(ScriptExecutionContext&amp; context, double highWaterMark)
-        : ReadableStream(context)
-        , m_highWaterMark(highWaterMark) { }
-
-    void enqueueChunk(ReadableJSStreamValue&amp;&amp;);
-
-private:
-    virtual void clearValues() override { m_queue.clear(); }
-    virtual bool hasEnoughValues() const override { return desiredSize() &lt;= 0; }
-    virtual bool hasValue() const override { return m_queue.size(); }
-    virtual JSC::JSValue read() override;
-
-    Deque&lt;ReadableJSStreamValue&gt; m_queue;
-    double m_totalQueueSize { 0 };
-    double m_highWaterMark;
-};
-
-class ReadableJSStream final : public ReadableEnqueuingStream&lt;ReadableJSStreamValue&gt; {
-public:
-    static RefPtr&lt;ReadableJSStream&gt; create(JSC::ExecState&amp;, JSC::JSValue, const Dictionary&amp;);
-
-    JSC::JSValue jsController(JSC::ExecState&amp;, JSDOMGlobalObject*);
-    void close(ExceptionCode&amp;);
-
-    void storeError(JSC::ExecState&amp;, JSC::JSValue);
-    JSC::JSValue error() override { return m_error.get(); }
-
-    void enqueue(JSC::ExecState&amp;, JSC::JSValue);
-    void error(JSC::ExecState&amp;, JSC::JSValue, ExceptionCode&amp;);
-
-private:
-    ReadableJSStream(JSC::ExecState&amp;, JSC::JSObject*, double, JSC::JSFunction*);
-
-    void doStart(JSC::ExecState&amp;);
-
-    JSC::JSPromise* invoke(JSC::ExecState&amp;, const char*, JSC::JSValue parameter);
-    void storeException(JSC::ExecState&amp;);
-
-    virtual bool doPull() override;
-    virtual bool doCancel(JSC::JSValue) override;
-
-    JSDOMGlobalObject* globalObject();
-
-    double retrieveChunkSize(JSC::ExecState&amp;, JSC::JSValue);
-
-    std::unique_ptr&lt;ReadableStreamController&gt; m_controller;
-    // FIXME: we should consider not using JSC::Strong, see https://bugs.webkit.org/show_bug.cgi?id=146278
-    JSC::Strong&lt;JSC::Unknown&gt; m_error;
-
-    JSC::Strong&lt;JSC::JSObject&gt; m_source;
-    JSC::Strong&lt;JSC::JSFunction&gt; m_sizeFunction;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(STREAMS_API)
-
-#endif // ReadableJSStream_h
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (0 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ *  Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
+ *  Copyright (C) 2007 Samuel Weinig &lt;sam@webkit.org&gt;
+ *  Copyright (C) 2009 Google, Inc. All rights reserved.
+ *
+ *  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
+ */
+
+#ifndef WebCoreBuiltinNames_h
+#define WebCoreBuiltinNames_h
+
+#include &lt;builtins/BuiltinUtils.h&gt;
+
+namespace WebCore {
+
+#define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro)\
+    macro(state) \
+    macro(underlyingSource) \
+    macro(queue) \
+    macro(queueSize) \
+    macro(started) \
+    macro(closeRequested) \
+    macro(pullAgain) \
+    macro(pulling) \
+    macro(reader) \
+    macro(storedError) \
+    macro(controller) \
+    macro(strategySize) \
+    macro(highWaterMark) \
+    macro(readRequests) \
+    macro(ownerReadableStream) \
+    macro(closedPromise) \
+    macro(closedPromiseResolve) \
+    macro(closedPromiseReject) \
+    macro(controlledReadableStream) \
+    macro(readableStreamClosed) \
+    macro(readableStreamReadable) \
+    macro(readableStreamErrored) \
+    macro(ReadableStreamReader) \
+    macro(ReadableStreamController) \
+
+class WebCoreBuiltinNames {
+public:
+    explicit WebCoreBuiltinNames(JSC::VM* vm)
+        : m_vm(*vm)
+        WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_BUILTIN_NAMES)
+    {
+#define EXPORT_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+        WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(EXPORT_NAME)
+#undef EXPORT_NAME
+    }
+
+    WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+private:
+    JSC::VM&amp; m_vm;
+    WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_NAMES)
+};
+
+} // namespace WebCore
+
+#endif // WebCoreBuiltinNames_h
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -29,5 +29,7 @@
</span><span class="cx"> #include &quot;ByteLengthQueuingStrategyBuiltins.cpp&quot;
</span><span class="cx"> #include &quot;CountQueuingStrategyBuiltins.cpp&quot;
</span><span class="cx"> #include &quot;ReadableStreamBuiltins.cpp&quot;
</span><ins>+#include &quot;ReadableStreamControllerBuiltins.cpp&quot;
</ins><span class="cx"> #include &quot;ReadableStreamInternalsBuiltins.cpp&quot;
</span><ins>+#include &quot;ReadableStreamReaderBuiltins.cpp&quot;
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSClientDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h (190607 => 190608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h        2015-10-06 06:15:11 UTC (rev 190607)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h        2015-10-06 06:20:58 UTC (rev 190608)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> #define WebCoreJSClientData_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMWrapperWorld.h&quot;
</span><ins>+#include &quot;WebCoreBuiltinNames.h&quot;
</ins><span class="cx"> #include &quot;WebCoreTypedArrayController.h&quot;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="lines">@@ -31,7 +32,9 @@
</span><span class="cx"> #include &quot;ByteLengthQueuingStrategyBuiltinsWrapper.h&quot;
</span><span class="cx"> #include &quot;CountQueuingStrategyBuiltinsWrapper.h&quot;
</span><span class="cx"> #include &quot;ReadableStreamBuiltinsWrapper.h&quot;
</span><ins>+#include &quot;ReadableStreamControllerBuiltinsWrapper.h&quot;
</ins><span class="cx"> #include &quot;ReadableStreamInternalsBuiltinsWrapper.h&quot;
</span><ins>+#include &quot;ReadableStreamReaderBuiltinsWrapper.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -42,14 +45,15 @@
</span><span class="cx">     friend void initNormalWorldClientData(JSC::VM*);
</span><span class="cx"> 
</span><span class="cx"> public:
</span><ins>+    explicit WebCoreJSClientData(JSC::VM&amp; vm)
+        : m_builtinNames(&amp;vm)
</ins><span class="cx"> #if ENABLE(STREAMS_API)
</span><del>-    explicit WebCoreJSClientData(JSC::VM&amp; vm)
-        : m_readableStreamBuiltins(&amp;vm)
</del><ins>+        , m_readableStreamBuiltins(&amp;vm)
+        , m_readableStreamControllerBuiltins(&amp;vm)
</ins><span class="cx">         , m_readableStreamInternalsBuiltins(&amp;vm)
</span><ins>+        , m_readableStreamReaderBuiltins(&amp;vm)
</ins><span class="cx">         , m_byteLengthQueuingStrategyBuiltins(&amp;vm)
</span><span class="cx">         , m_countQueuingStrategyBuiltins(&amp;vm)
</span><del>-#else
-    WebCoreJSClientData(JSC::VM&amp;)
</del><span class="cx"> #endif
</span><span class="cx">     {
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="lines">@@ -89,9 +93,13 @@
</span><span class="cx">         m_worldSet.remove(&amp;world);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    WebCoreBuiltinNames&amp; builtinNames() { return m_builtinNames; }
+
</ins><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">     ReadableStreamBuiltinsWrapper&amp; readableStreamBuiltins() { return m_readableStreamBuiltins; }
</span><ins>+    ReadableStreamControllerBuiltinsWrapper&amp; readableStreamControllerBuiltins() { return m_readableStreamControllerBuiltins; }
</ins><span class="cx">     ReadableStreamInternalsBuiltinsWrapper&amp; readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins; }
</span><ins>+    ReadableStreamReaderBuiltinsWrapper&amp; readableStreamReaderBuiltins() { return m_readableStreamReaderBuiltins; }
</ins><span class="cx">     ByteLengthQueuingStrategyBuiltinsWrapper&amp; byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }
</span><span class="cx">     CountQueuingStrategyBuiltinsWrapper&amp; countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins; }
</span><span class="cx"> #endif
</span><span class="lines">@@ -100,9 +108,13 @@
</span><span class="cx">     HashSet&lt;DOMWrapperWorld*&gt; m_worldSet;
</span><span class="cx">     RefPtr&lt;DOMWrapperWorld&gt; m_normalWorld;
</span><span class="cx"> 
</span><ins>+    WebCoreBuiltinNames m_builtinNames;
+
</ins><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">     ReadableStreamBuiltinsWrapper m_readableStreamBuiltins;
</span><ins>+    ReadableStreamControllerBuiltinsWrapper m_readableStreamControllerBuiltins;
</ins><span class="cx">     ReadableStreamInternalsBuiltinsWrapper m_readableStreamInternalsBuiltins;
</span><ins>+    ReadableStreamReaderBuiltinsWrapper m_readableStreamReaderBuiltins;
</ins><span class="cx">     ByteLengthQueuingStrategyBuiltinsWrapper m_byteLengthQueuingStrategyBuiltins;
</span><span class="cx">     CountQueuingStrategyBuiltinsWrapper m_countQueuingStrategyBuiltins;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>