<!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>[191383] 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/191383">191383</a></dd>
<dt>Author</dt> <dd>calvaris@igalia.com</dd>
<dt>Date</dt> <dd>2015-10-21 01:34:41 -0700 (Wed, 21 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Streams API] Construct a writable stream
https://bugs.webkit.org/show_bug.cgi?id=150360

Reviewed by Darin Adler.

Source/WebCore:

This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
translation from the spec.

Current test set suffices, expectations are updated accordingly.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/WebCoreBuiltinNames.h:
* bindings/js/WebCoreJSBuiltinInternals.h:
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
* Modules/streams/WritableStream.js:
(initializeWritableStream): Function that acts as constructor of WritableStream.
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(errorWritableStream): As per spec.

LayoutTests:

Expectations for the writable stream initialization.

* streams/reference-implementation/bad-strategies-expected.txt:
* streams/reference-implementation/bad-underlying-sinks-expected.txt:
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/pipe-through-expected.txt:
* streams/reference-implementation/pipe-to-expected.txt:
* streams/reference-implementation/pipe-to-options-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/writable-stream-abort-expected.txt:
* streams/reference-implementation/writable-stream-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationbadstrategiesexpectedtxt">trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationbadunderlyingsinksexpectedtxt">trunk/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationbrandchecksexpectedtxt">trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationbytelengthqueuingstrategyexpectedtxt">trunk/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationcountqueuingstrategyexpectedtxt">trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationpipethroughexpectedtxt">trunk/LayoutTests/streams/reference-implementation/pipe-through-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationpipetoexpectedtxt">trunk/LayoutTests/streams/reference-implementation/pipe-to-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationpipetooptionsexpectedtxt">trunk/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedexpectedtxt">trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationwritablestreamabortexpectedtxt">trunk/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreferenceimplementationwritablestreamexpectedtxt">trunk/LayoutTests/streams/reference-implementation/writable-stream-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="#trunkSourceWebCoreModulesstreamsWritableStreamjs">trunk/Source/WebCore/Modules/streams/WritableStream.js</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSBuiltinInternalsh">trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSBuiltinscpp">trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSBuiltinsh">trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesstreamsWritableStreamInternalsjs">trunk/Source/WebCore/Modules/streams/WritableStreamInternals.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/ChangeLog        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-10-21  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
+
+        [Streams API] Construct a writable stream
+        https://bugs.webkit.org/show_bug.cgi?id=150360
+
+        Reviewed by Darin Adler.
+
+        Expectations for the writable stream initialization.
+
+        * streams/reference-implementation/bad-strategies-expected.txt:
+        * streams/reference-implementation/bad-underlying-sinks-expected.txt:
+        * streams/reference-implementation/brand-checks-expected.txt:
+        * streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
+        * streams/reference-implementation/count-queuing-strategy-expected.txt:
+        * streams/reference-implementation/pipe-through-expected.txt:
+        * streams/reference-implementation/pipe-to-expected.txt:
+        * streams/reference-implementation/pipe-to-options-expected.txt:
+        * streams/reference-implementation/readable-stream-templated-expected.txt:
+        * streams/reference-implementation/writable-stream-abort-expected.txt:
+        * streams/reference-implementation/writable-stream-expected.txt:
+
</ins><span class="cx"> 2015-10-21  Frederic Wang  &lt;fred.wang@free.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed gardening. Test expectation for use-typo-metrics-1 on Mac and Windows should be &quot;ImageOnlyFailure&quot; not &quot;Failure&quot;.
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationbadstrategiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -4,15 +4,9 @@
</span><span class="cx"> PASS Readable stream: throwing strategy.highWaterMark getter 
</span><span class="cx"> PASS Readable stream: invalid strategy.highWaterMark 
</span><span class="cx"> PASS Readable stream: invalid strategy.size return value 
</span><del>-FAIL Writable stream: throwing strategy.size getter assert_throws: construction should re-throw the error function &quot;function () {
-        new WritableStream({}, {
-          ...&quot; threw object &quot;EvalError: WritableStream constructor not implemented&quot; (&quot;EvalError&quot;) expected object &quot;Error: a unique string&quot; (&quot;Error&quot;)
-FAIL Writable stream: throwing strategy.size method WritableStream constructor not implemented
-FAIL Writable stream: invalid strategy.size return value WritableStream constructor not implemented
-FAIL Writable stream: throwing strategy.highWaterMark getter assert_throws: construction should re-throw the error function &quot;function () {
-        new WritableStream({}, {
-          ...&quot; threw object &quot;EvalError: WritableStream constructor not implemented&quot; (&quot;EvalError&quot;) expected object &quot;Error: a unique string&quot; (&quot;Error&quot;)
-FAIL Writable stream: invalid strategy.highWaterMark assert_throws: construction should throw a RangeError for -1 function &quot;function () {
-            new WritableStream({}, {
-      ...&quot; threw object &quot;EvalError: WritableStream constructor not implemented&quot; (&quot;EvalError&quot;) expected object &quot;RangeError&quot; (&quot;RangeError&quot;)
</del><ins>+PASS Writable stream: throwing strategy.size getter 
+FAIL Writable stream: throwing strategy.size method write not implemented
+FAIL Writable stream: invalid strategy.size return value write not implemented
+PASS Writable stream: throwing strategy.highWaterMark getter 
+PASS Writable stream: invalid strategy.highWaterMark 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationbadunderlyingsinksexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,14 +1,10 @@
</span><span class="cx"> 
</span><del>-FAIL Underlying sink: throwing start getter assert_throws: function &quot;function () {
-        new WritableStream({
-            ge...&quot; threw object &quot;EvalError: WritableStream constructor not implemented&quot; (&quot;EvalError&quot;) expected object &quot;Error: a unique string&quot; (&quot;Error&quot;)
-FAIL Underlying sink: throwing start method assert_throws: function &quot;function () {
-        new WritableStream({
-            st...&quot; threw object &quot;EvalError: WritableStream constructor not implemented&quot; (&quot;EvalError&quot;) expected object &quot;Error: a unique string&quot; (&quot;Error&quot;)
-FAIL Underlying sink: throwing write getter WritableStream constructor not implemented
-FAIL Underlying sink: throwing write method WritableStream constructor not implemented
-FAIL Underlying sink: throwing abort getter WritableStream constructor not implemented
-FAIL Underlying sink: throwing abort method WritableStream constructor not implemented
-FAIL Underlying sink: throwing close getter WritableStream constructor not implemented
-FAIL Underlying sink: throwing close method WritableStream constructor not implemented
</del><ins>+PASS Underlying sink: throwing start getter 
+PASS Underlying sink: throwing start method 
+FAIL Underlying sink: throwing write getter write not implemented
+FAIL Underlying sink: throwing write method write not implemented
+FAIL Underlying sink: throwing abort getter abort not implemented
+FAIL Underlying sink: throwing abort method abort not implemented
+FAIL Underlying sink: throwing close getter close not implemented
+FAIL Underlying sink: throwing close method close not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationbrandchecksexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/brand-checks-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Can get the ReadableStreamReader constructor indirectly 
</span><span class="cx"> PASS Can get the ReadableStreamController constructor indirectly 
</span><del>-FAIL ReadableStream.prototype.cancel enforces a brand check WritableStream constructor not implemented
-FAIL ReadableStream.prototype.getReader enforces a brand check WritableStream constructor not implemented
</del><ins>+PASS ReadableStream.prototype.cancel enforces a brand check 
+PASS ReadableStream.prototype.getReader enforces a brand check 
</ins><span class="cx"> PASS ReadableStream.prototype.pipeThrough works generically on its this and its arguments 
</span><span class="cx"> FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments pipeTo is not implemented
</span><del>-FAIL ReadableStream.prototype.tee enforces a brand check WritableStream constructor not implemented
</del><ins>+PASS ReadableStream.prototype.tee enforces a brand check 
</ins><span class="cx"> PASS ReadableStreamReader enforces a brand check on its argument 
</span><span class="cx"> PASS ReadableStreamReader.prototype.closed enforces a brand check 
</span><span class="cx"> PASS ReadableStreamReader.prototype.cancel enforces a brand check 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationbytelengthqueuingstrategyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -4,5 +4,5 @@
</span><span class="cx"> PASS ByteLengthQueuingStrategy constructor behaves as expected with wrong arguments 
</span><span class="cx"> PASS ByteLengthQueuingStrategy size behaves as expected with wrong arguments 
</span><span class="cx"> PASS ByteLengthQueuingStrategy instances have the correct properties 
</span><del>-FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly WritableStream constructor not implemented
</del><ins>+FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly write not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationcountqueuingstrategyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS Correctly governs the return value of a ReadableStream's enqueue function (HWM = 0) 
</span><span class="cx"> PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 1) 
</span><span class="cx"> PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 4) 
</span><del>-FAIL Can construct a writable stream with a valid CountQueuingStrategy WritableStream constructor not implemented
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) WritableStream constructor not implemented
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) WritableStream constructor not implemented
</del><ins>+PASS Can construct a writable stream with a valid CountQueuingStrategy 
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) state not implemented
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) state not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationpipethroughexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/pipe-through-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/pipe-through-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/pipe-through-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL Piping through a duck-typed pass-through transform stream works WritableStream constructor not implemented
</del><ins>+FAIL Piping through a duck-typed pass-through transform stream works pipeTo is not implemented
</ins><span class="cx"> FAIL Piping through an identity transform stream will close the destination when the source closes Can't find variable: TransformStream
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationpipetoexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/pipe-to-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/pipe-to-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/pipe-to-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> 
</span><del>-FAIL Piping from a ReadableStream from which lots of data are readable synchronously WritableStream constructor not implemented
-FAIL Piping from a ReadableStream in readable state to a WritableStream in closing state WritableStream constructor not implemented
-FAIL Piping from a ReadableStream in readable state to a WritableStream in errored state WritableStream constructor not implemented
-FAIL Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
-FAIL Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call WritableStream constructor not implemented
-FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call WritableStream constructor not implemented
-FAIL Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call WritableStream constructor not implemented
-FAIL Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state WritableStream constructor not implemented
-FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete WritableStream constructor not implemented
-FAIL Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state WritableStream constructor not implemented
</del><ins>+FAIL Piping from a ReadableStream from which lots of data are readable synchronously state not implemented
+FAIL Piping from a ReadableStream in readable state to a WritableStream in closing state close not implemented
+FAIL Piping from a ReadableStream in readable state to a WritableStream in errored state write not implemented
+FAIL Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state pipeTo is not implemented
+FAIL Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state pipeTo is not implemented
+FAIL Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state pipeTo is not implemented
+FAIL Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state pipeTo is not implemented
+FAIL Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call state not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call write not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call write not implemented
+FAIL Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state write not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo write not implemented
+FAIL Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call write not implemented
+FAIL Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete write not implemented
+FAIL Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state write not implemented
</ins><span class="cx"> FAIL Piping to a duck-typed asynchronous &quot;writable stream&quot; works pipeTo is not implemented
</span><del>-FAIL Piping to a stream that has been aborted passes through the error as the cancellation reason WritableStream constructor not implemented
-FAIL Piping to a stream and then aborting it passes through the error as the cancellation reason WritableStream constructor not implemented
-FAIL Piping to a stream that has been closed propagates a TypeError cancellation reason backward WritableStream constructor not implemented
-FAIL Piping to a stream and then closing it propagates a TypeError cancellation reason backward WritableStream constructor not implemented
-FAIL Piping to a stream that errors on write should pass through the error as the cancellation reason WritableStream constructor not implemented
-FAIL Piping to a stream that errors on write should not pass through the error if the stream is already closed WritableStream constructor not implemented
-FAIL Piping to a stream that errors soon after writing should pass through the error as the cancellation reason WritableStream constructor not implemented
-FAIL Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source WritableStream constructor not implemented
</del><ins>+FAIL Piping to a stream that has been aborted passes through the error as the cancellation reason abort not implemented
+FAIL Piping to a stream and then aborting it passes through the error as the cancellation reason pipeTo is not implemented
+FAIL Piping to a stream that has been closed propagates a TypeError cancellation reason backward close not implemented
+FAIL Piping to a stream and then closing it propagates a TypeError cancellation reason backward pipeTo is not implemented
+FAIL Piping to a stream that errors on write should pass through the error as the cancellation reason pipeTo is not implemented
+FAIL Piping to a stream that errors on write should not pass through the error if the stream is already closed pipeTo is not implemented
+FAIL Piping to a stream that errors soon after writing should pass through the error as the cancellation reason pipeTo is not implemented
+FAIL Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source pipeTo is not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationpipetooptionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL Piping with no options and a destination error WritableStream constructor not implemented
-FAIL Piping with { preventCancel: false } and a destination error WritableStream constructor not implemented
-FAIL Piping with { preventCancel: true } and a destination error WritableStream constructor not implemented
</del><ins>+FAIL Piping with no options and a destination error pipeTo is not implemented
+FAIL Piping with { preventCancel: false } and a destination error pipeTo is not implemented
+FAIL Piping with { preventCancel: true } and a destination error pipeTo is not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationreadablestreamtemplatedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -18,8 +18,8 @@
</span><span class="cx"> PASS cancel() should return a distinct fulfilled promise each time 
</span><span class="cx"> PASS locked should be false 
</span><span class="cx"> PASS getReader() should be OK 
</span><del>-FAIL piping to a WritableStream in the writable state should close the writable stream WritableStream constructor not implemented
-FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing WritableStream constructor not implemented
</del><ins>+FAIL piping to a WritableStream in the writable state should close the writable stream state not implemented
+FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing state not implemented
</ins><span class="cx"> PASS should be able to acquire multiple readers if they are released in succession 
</span><span class="cx"> FAIL should not be able to acquire a second reader if we don't release the first one assert_throws: getting a second reader should throw function &quot;function () { rs.getReader(); }&quot; did not throw
</span><span class="cx"> PASS Running templatedRSClosedReader with ReadableStream reader (closed before getting reader) 
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> PASS cancel() should return a distinct fulfilled promise each time 
</span><span class="cx"> PASS locked should be false 
</span><span class="cx"> PASS getReader() should be OK 
</span><del>-FAIL piping to a WritableStream in the writable state should close the writable stream WritableStream constructor not implemented
-FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing WritableStream constructor not implemented
</del><ins>+FAIL piping to a WritableStream in the writable state should close the writable stream state not implemented
+FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing state not implemented
</ins><span class="cx"> PASS should be able to acquire multiple readers if they are released in succession 
</span><span class="cx"> FAIL should not be able to acquire a second reader if we don't release the first one assert_throws: getting a second reader should throw function &quot;function () { rs.getReader(); }&quot; did not throw
</span><span class="cx"> PASS Running templatedRSClosedReader with ReadableStream reader (closed via cancel after getting reader) 
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> FAIL releasing the lock should cause closed to reject and change identity assert_not_equals: the closed promise should change identity got disallowed value object &quot;[object Promise]&quot;
</span><span class="cx"> PASS cancel() should return a distinct fulfilled promise each time 
</span><span class="cx"> PASS Running templatedRSErrored with ReadableStream (errored via call in start) 
</span><del>-FAIL piping to a WritableStream in the writable state should abort the writable stream WritableStream constructor not implemented
</del><ins>+FAIL piping to a WritableStream in the writable state should abort the writable stream state not implemented
</ins><span class="cx"> PASS getReader() should return a reader that acts errored 
</span><span class="cx"> PASS read() twice should give the error each time 
</span><span class="cx"> PASS locked should be false 
</span><span class="lines">@@ -62,14 +62,14 @@
</span><span class="cx"> PASS cancel() should return a distinct rejected promise each time 
</span><span class="cx"> PASS reader cancel() should return a distinct rejected promise each time 
</span><span class="cx"> PASS Running templatedRSErrored with ReadableStream (errored via returning a rejected promise in start) 
</span><del>-FAIL piping to a WritableStream in the writable state should abort the writable stream WritableStream constructor not implemented
</del><ins>+FAIL piping to a WritableStream in the writable state should abort the writable stream state not implemented
</ins><span class="cx"> PASS getReader() should return a reader that acts errored 
</span><span class="cx"> PASS read() twice should give the error each time 
</span><span class="cx"> PASS locked should be false 
</span><span class="cx"> PASS Running templatedRSErroredAsyncOnly with ReadableStream (errored via returning a rejected promise in start) reader 
</span><del>-FAIL piping with no options WritableStream constructor not implemented
-FAIL piping with { preventAbort: false } WritableStream constructor not implemented
-FAIL piping with { preventAbort: true } WritableStream constructor not implemented
</del><ins>+FAIL piping with no options pipeTo is not implemented
+FAIL piping with { preventAbort: false } pipeTo is not implemented
+FAIL piping with { preventAbort: true } pipeTo is not implemented
</ins><span class="cx"> PASS Running templatedRSErroredReader with ReadableStream (errored via returning a rejected promise in start) reader 
</span><span class="cx"> PASS closed should reject with the error 
</span><span class="cx"> FAIL releasing the lock should cause closed to reject and change identity assert_not_equals: the closed promise should change identity got disallowed value object &quot;[object Promise]&quot;
</span><span class="lines">@@ -88,26 +88,26 @@
</span><span class="cx"> PASS read() should return distinct promises each time 
</span><span class="cx"> PASS cancel() after a read() should still give that single read result 
</span><span class="cx"> PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued, then closed) 
</span><del>-FAIL piping with no options and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
</del><ins>+FAIL piping with no options and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: true } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk pipeTo is not implemented
</ins><span class="cx"> PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued async, then closed) 
</span><del>-FAIL piping with no options and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
</del><ins>+FAIL piping with no options and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: true } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk pipeTo is not implemented
</ins><span class="cx"> PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued via pull, then closed) 
</span><del>-FAIL piping with no options and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
-FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
</del><ins>+FAIL piping with no options and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: true } and no destination errors pipeTo is not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously pipeTo is not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk pipeTo is not implemented
</ins><span class="cx"> PASS Running templatedRSTwoChunksClosedReader with ReadableStream (two chunks enqueued, then closed) reader 
</span><span class="cx"> PASS third read(), without waiting, should give { value: undefined, done: true } 
</span><span class="cx"> PASS third read, with waiting, should give { value: undefined, done: true } 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationwritablestreamabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,14 +1,14 @@
</span><span class="cx"> 
</span><del>-FAIL Aborting a WritableStream immediately prevents future writes WritableStream constructor not implemented
-FAIL Aborting a WritableStream prevents further writes after any that are in progress WritableStream constructor not implemented
-FAIL Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value WritableStream constructor not implemented
-FAIL WritableStream if sink's abort throws, the promise returned by ws.abort() rejects WritableStream constructor not implemented
-FAIL Aborting a WritableStream passes through the given reason WritableStream constructor not implemented
-FAIL Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason WritableStream constructor not implemented
-FAIL Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately WritableStream constructor not implemented
-FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason WritableStream constructor not implemented
-FAIL Closing but then immediately aborting a WritableStream causes the stream to error WritableStream constructor not implemented
-FAIL Closing a WritableStream and aborting it while it closes causes the stream to error WritableStream constructor not implemented
-FAIL Aborting a WritableStream after it is closed is a no-op WritableStream constructor not implemented
-FAIL WritableStream should call underlying sink's close if no abort is supplied WritableStream constructor not implemented
</del><ins>+FAIL Aborting a WritableStream immediately prevents future writes abort not implemented
+FAIL Aborting a WritableStream prevents further writes after any that are in progress write not implemented
+FAIL Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value abort not implemented
+FAIL WritableStream if sink's abort throws, the promise returned by ws.abort() rejects abort not implemented
+FAIL Aborting a WritableStream passes through the given reason abort not implemented
+FAIL Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason abort not implemented
+FAIL Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately write not implemented
+FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason write not implemented
+FAIL Closing but then immediately aborting a WritableStream causes the stream to error close not implemented
+FAIL Closing a WritableStream and aborting it while it closes causes the stream to error close not implemented
+FAIL Aborting a WritableStream after it is closed is a no-op close not implemented
+FAIL WritableStream should call underlying sink's close if no abort is supplied abort not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreferenceimplementationwritablestreamexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/reference-implementation/writable-stream-expected.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/reference-implementation/writable-stream-expected.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/LayoutTests/streams/reference-implementation/writable-stream-expected.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,14 +1,14 @@
</span><span class="cx"> 
</span><del>-FAIL error argument is given to start method WritableStream constructor not implemented
-FAIL Underlying sink's write won't be called until start finishes WritableStream constructor not implemented
-FAIL Underlying sink's close won't be called until start finishes WritableStream constructor not implemented
-FAIL Fulfillment value of ws.close() call must be undefined even if the underlying sink returns a non-undefined value WritableStream constructor not implemented
-FAIL Underlying sink's write or close are never invoked if start throws assert_equals: expected object &quot;Error: horrible things&quot; but got object &quot;EvalError: WritableStream constructor not implemented&quot;
-FAIL Underlying sink's write or close are never invoked if the promise returned by start is rejected WritableStream constructor not implemented
-FAIL WritableStream can be constructed with no arguments WritableStream constructor not implemented
-FAIL WritableStream instances have the correct methods and properties WritableStream constructor not implemented
-FAIL WritableStream with simple input, processed asynchronously WritableStream constructor not implemented
-FAIL WritableStream with simple input, processed synchronously WritableStream constructor not implemented
-FAIL WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure WritableStream constructor not implemented
-FAIL Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined ovalue WritableStream constructor not implemented
</del><ins>+FAIL error argument is given to start method state not implemented
+FAIL Underlying sink's write won't be called until start finishes write not implemented
+FAIL Underlying sink's close won't be called until start finishes close not implemented
+FAIL Fulfillment value of ws.close() call must be undefined even if the underlying sink returns a non-undefined value close not implemented
+PASS Underlying sink's write or close are never invoked if start throws 
+PASS Underlying sink's write or close are never invoked if the promise returned by start is rejected 
+PASS WritableStream can be constructed with no arguments 
+FAIL WritableStream instances have the correct methods and properties state not implemented
+FAIL WritableStream with simple input, processed asynchronously write not implemented
+FAIL WritableStream with simple input, processed synchronously write not implemented
+FAIL WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure state not implemented
+FAIL Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined ovalue write not implemented
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -3371,6 +3371,7 @@
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/StreamInternals.js
</span><span class="cx">     ${WEBCORE_DIR}/Modules/streams/WritableStream.js
</span><ins>+    ${WEBCORE_DIR}/Modules/streams/WritableStreamInternals.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 (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/ChangeLog        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-10-21  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
+
+        [Streams API] Construct a writable stream
+        https://bugs.webkit.org/show_bug.cgi?id=150360
+
+        Reviewed by Darin Adler.
+
+        This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
+        are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
+        translation from the spec.
+
+        Current test set suffices, expectations are updated accordingly.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMWindowBase.cpp:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * bindings/js/WebCoreJSBuiltinInternals.h:
+        * bindings/js/WebCoreJSBuiltins.cpp:
+        * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
+        * Modules/streams/WritableStream.js:
+        (initializeWritableStream): Function that acts as constructor of WritableStream.
+        * Modules/streams/WritableStreamInternals.js:
+        (syncWritableStreamStateWithQueue):
+        (errorWritableStream): As per spec.
+
</ins><span class="cx"> 2015-10-21  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         NetworkProcess: DNS prefetch happens in the Web Process
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/DerivedSources.make        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1266,6 +1266,7 @@
</span><span class="cx">     $(WebCore)/Modules/streams/ReadableStreamReader.js \
</span><span class="cx">     $(WebCore)/Modules/streams/StreamInternals.js \
</span><span class="cx">     $(WebCore)/Modules/streams/WritableStream.js \
</span><ins>+    $(WebCore)/Modules/streams/WritableStreamInternals.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="trunkSourceWebCoreModulesstreamsWritableStreamjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/WritableStream.js (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/WritableStream.js        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/Modules/streams/WritableStream.js        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -30,8 +30,39 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    throw new EvalError(&quot;WritableStream constructor not implemented&quot;);
</del><ins>+    if (typeof underlyingSink === &quot;undefined&quot;)
+        underlyingSink = { };
+    if (typeof strategy === &quot;undefined&quot;)
+        strategy = { highWaterMark: 0, size: function() { return 1; } };
</ins><span class="cx"> 
</span><ins>+    if (!@isObject(underlyingSink))
+        throw new @TypeError(&quot;WritableStream constructor takes an object as first argument&quot;);
+
+    if (!@isObject(strategy))
+        throw new @TypeError(&quot;WritableStream constructor takes an object as second argument, if any&quot;);
+
+    this.@underlyingSink = underlyingSink;
+    this.@closedPromise = @createNewStreamsPromise();
+    this.@readyPromise = Promise.resolve(undefined);
+    this.@queue = @newQueue();
+    this.@started = false;
+    this.@writing = false;
+
+    this.@strategy = @validateAndNormalizeQueuingStrategy(strategy.size, strategy.highWaterMark);
+
+    @syncWritableStreamStateWithQueue(this);
+
+    var error = @errorWritableStream.bind(this);
+    var startResult = @invokeOrNoop(underlyingSink, &quot;start&quot;, [error]);
+    this.@startedPromise = Promise.resolve(startResult);
+    var _this = this;
+    this.@startedPromise.then(function() {
+        _this.@started = true;
+        _this.@startedPromise = undefined;
+    }, function(r) {
+        error(r);
+    });
+
</ins><span class="cx">     return this;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsWritableStreamInternalsjsfromrev191382trunkSourceWebCoreModulesstreamsWritableStreamjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/streams/WritableStreamInternals.js (from rev 191382, trunk/Source/WebCore/Modules/streams/WritableStream.js) (0 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/WritableStreamInternals.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/streams/WritableStreamInternals.js        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon Inc.
+ * Copyright (C) 2015 Igalia
+ *
+ * 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.
+ */
+
+// @optional=STREAMS_API
+// @internals
+
+function syncWritableStreamStateWithQueue(stream)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === &quot;closing&quot;)
+        return undefined;
+
+    // TODO
+    // assert(stream.@state === &quot;writable&quot; || stream.@state === &quot;waiting&quot; || stream.@state === undefined);
+
+    if (stream.@queue.size &gt; stream.@strategy.highWaterMark) {
+        stream.@state = &quot;waiting&quot;;
+        stream.@readyPromise = @createNewStreamsPromise();
+    } else {
+        stream.@state = &quot;writable&quot;;
+        @resolveStreamsPromise(stream.@readyPromise, undefined);
+    }
+
+    return undefined;
+}
+
+function errorWritableStream(e)
+{
+    &quot;use strict&quot;;
+
+    if (this.@state === &quot;closed&quot; || this.@state === &quot;errored&quot;)
+        return undefined;
+    while (this.@queue.content.length &gt; 0) {
+        var writeRecord = @dequeueValue(this.@queue);
+        if (writeRecord !== &quot;close&quot; &amp;&amp; writeRecord.promise)
+            @rejectStreamsPromise(writeRecord.promise, e);
+    }
+    this.@storedError = e;
+    if (this.@state === &quot;waiting&quot;)
+        @resolveStreamsPromise(this.@readyPromise, undefined);
+    @rejectStreamsPromise(this.@closedPromise, e);
+    this.@state = &quot;errored&quot;;
+    return undefined;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -1520,7 +1520,9 @@
</span><span class="cx">                 416E6FE81BBD12DF000A6043 /* ReadableStreamInternalsBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764D9 /* ReadableStreamInternalsBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 416E6FE91BBD12E5000A6043 /* ReadableStreamBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764D8 /* ReadableStreamBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 416E6FEA1BBD1684000A6044 /* ReadableStreamInternalsBuiltinsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8071BB3110D00B764DA /* ReadableStreamInternalsBuiltinsWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                416E6FE81BBD12DF000A6053 /* WritableStreamInternalsBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764E9 /* WritableStreamInternalsBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                416E6FEA1BBD1684000A6054 /* WritableStreamInternalsBuiltinsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8071BB3110D00B764EA /* WritableStreamInternalsBuiltinsWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 417253AA1354BBBC00360F2A /* MediaControlElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417253A81354BBBC00360F2A /* MediaControlElements.cpp */; };
</span><span class="cx">                 417253AB1354BBBC00360F2A /* MediaControlElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 417253A91354BBBC00360F2A /* MediaControlElements.h */; };
</span><span class="cx">                 417DA6D913734E6E007C57FB /* Internals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417DA4CF13734326007C57FB /* Internals.cpp */; };
</span><span class="lines">@@ -11369,6 +11371,7 @@
</span><span class="cx">                 9908B0F11BCACF9100ED0F65 /* ReadableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamInternals.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0F21BCACF9100ED0F65 /* ReadableStreamReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamReader.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0EF1BCACF9100ED0F75 /* WritableStream.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStream.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9908B0F11BCACF9100ED0F75 /* WritableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStreamInternals.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9908B0F31BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ByteLengthQueuingStrategyBuiltins.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0F41BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0F51BCAD07D00ED0F65 /* ByteLengthQueuingStrategyBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltins.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -11384,6 +11387,7 @@
</span><span class="cx">                 9908B0FF1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltins.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B1001BCAD07D00ED0F65 /* ReadableStreamReaderBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WritableStreamBuiltins.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9908B0FD1BCAD07D00ED0F75 /* WritableStreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WritableStreamInternalsBuiltins.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoizedDOMResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -11427,7 +11431,9 @@
</span><span class="cx">                 9B03D8071BB3110D00B764D8 /* ReadableStreamBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9B03D8071BB3110D00B764DA /* ReadableStreamInternalsBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamInternalsBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamBuiltins.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9B03D8061BB3110D00B764E9 /* WritableStreamInternalsBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamInternalsBuiltins.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9B03D8071BB3110D00B764E8 /* WritableStreamBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9B03D8071BB3110D00B764EA /* WritableStreamInternalsBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamInternalsBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9B19B67E1B964E5200348745 /* ShadowRoot.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ShadowRoot.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9B1AB0791648C69D0051F3F2 /* HTMLFormControlsCollection.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLFormControlsCollection.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9B1AB07B1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFormControlsCollectionCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16401,6 +16407,7 @@
</span><span class="cx">                                 9908B0F11BCACF9100ED0F55 /* StreamInternals.js */,
</span><span class="cx">                                 41A023ED1A39DB7900F722DF /* WritableStream.idl */,
</span><span class="cx">                                 9908B0EF1BCACF9100ED0F75 /* WritableStream.js */,
</span><ins>+                                9908B0F11BCACF9100ED0F75 /* WritableStreamInternals.js */,
</ins><span class="cx"> 
</span><span class="cx">                         );
</span><span class="cx">                         path = streams;
</span><span class="lines">@@ -17260,6 +17267,9 @@
</span><span class="cx">                                 9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */,
</span><span class="cx">                                 9B03D8071BB3110D00B764E8 /* WritableStreamBuiltinsWrapper.h */,
</span><span class="cx">                                 9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */,
</span><ins>+                                9908B0FD1BCAD07D00ED0F75 /* WritableStreamInternalsBuiltins.cpp */,
+                                9B03D8061BB3110D00B764E9 /* WritableStreamInternalsBuiltins.h */,
+                                9B03D8071BB3110D00B764EA /* WritableStreamInternalsBuiltinsWrapper.h */,
</ins><span class="cx">                                 656581EA09D1508D000E61D7 /* XLinkNames.cpp */,
</span><span class="cx">                                 656581EB09D1508D000E61D7 /* XLinkNames.h */,
</span><span class="cx">                                 A833C80A0A2CF25600D57664 /* XMLNames.cpp */,
</span><span class="lines">@@ -27990,6 +28000,8 @@
</span><span class="cx">                                 97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */,
</span><span class="cx">                                 93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */,
</span><span class="cx">                                 416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */,
</span><ins>+                                416E6FE81BBD12DF000A6053 /* WritableStreamInternalsBuiltins.h in Headers */,
+                                416E6FEA1BBD1684000A6054 /* WritableStreamInternalsBuiltinsWrapper.h in Headers */,
</ins><span class="cx">                                 9BAF3B2412C1A39800014BF1 /* WritingDirection.h in Headers */,
</span><span class="cx">                                 14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */,
</span><span class="cx">                                 6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #include &quot;JSReadableStreamPrivateConstructors.h&quot;
</span><span class="cx"> #include &quot;ReadableStreamInternalsBuiltins.h&quot;
</span><span class="cx"> #include &quot;StreamInternalsBuiltins.h&quot;
</span><ins>+#include &quot;WritableStreamInternalsBuiltins.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="lines">@@ -103,6 +104,12 @@
</span><span class="cx">             m_privateFunctions.streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
</span><span class="cx">         WEBCORESTREAMINTERNALS_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</span><span class="cx"> #undef DECLARE_GLOBAL_STATIC
</span><ins>+#define DECLARE_GLOBAL_STATIC(name)\
+        GlobalPropertyInfo(\
+            static_cast&lt;JSVMClientData*&gt;(vm.clientData)-&gt;builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), \
+            m_privateFunctions.writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+        WEBCOREWRITABLESTREAMINTERNALS_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+#undef DECLARE_GLOBAL_STATIC
</ins><span class="cx"> #endif
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -46,11 +46,15 @@
</span><span class="cx">     macro(readableStreamReadable) \
</span><span class="cx">     macro(reader) \
</span><span class="cx">     macro(readRequests) \
</span><ins>+    macro(readyPromise) \
</ins><span class="cx">     macro(state) \
</span><span class="cx">     macro(started) \
</span><ins>+    macro(startedPromise) \
</ins><span class="cx">     macro(storedError) \
</span><span class="cx">     macro(strategy) \
</span><ins>+    macro(underlyingSink) \
</ins><span class="cx">     macro(underlyingSource) \
</span><ins>+    macro(writing) \
</ins><span class="cx">     macro(ReadableStreamReader) \
</span><span class="cx">     macro(ReadableStreamController) \
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSBuiltinInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx"> #include &quot;ReadableStreamInternalsBuiltinsWrapper.h&quot;
</span><span class="cx"> #include &quot;StreamInternalsBuiltinsWrapper.h&quot;
</span><ins>+#include &quot;WritableStreamInternalsBuiltinsWrapper.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -41,17 +42,20 @@
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">         , m_readableStreamInternalsFunctions(vm)
</span><span class="cx">         , m_streamInternalsFunctions(vm)
</span><ins>+        , m_writableStreamInternalsFunctions(vm)
</ins><span class="cx"> #endif
</span><span class="cx">     { }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">     ReadableStreamInternalsBuiltinFunctions readableStreamInternals() { return m_readableStreamInternalsFunctions; }
</span><span class="cx">     StreamInternalsBuiltinFunctions streamInternals() { return m_streamInternalsFunctions; }
</span><ins>+    WritableStreamInternalsBuiltinFunctions writableStreamInternals() { return m_writableStreamInternalsFunctions; }
</ins><span class="cx"> #endif
</span><span class="cx">     void visit(JSC::SlotVisitor&amp; visitor) {
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">         m_readableStreamInternalsFunctions.visit(visitor);
</span><span class="cx">         m_streamInternalsFunctions.visit(visitor);
</span><ins>+        m_writableStreamInternalsFunctions.visit(visitor);
</ins><span class="cx"> #else
</span><span class="cx">         UNUSED_PARAM(visitor);
</span><span class="cx"> #endif
</span><span class="lines">@@ -60,6 +64,7 @@
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">         m_readableStreamInternalsFunctions.init(globalObject);
</span><span class="cx">         m_streamInternalsFunctions.init(globalObject);
</span><ins>+        m_writableStreamInternalsFunctions.init(globalObject);
</ins><span class="cx"> #else
</span><span class="cx">         UNUSED_PARAM(globalObject);
</span><span class="cx"> #endif
</span><span class="lines">@@ -70,6 +75,7 @@
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">     ReadableStreamInternalsBuiltinFunctions m_readableStreamInternalsFunctions;
</span><span class="cx">     StreamInternalsBuiltinFunctions m_streamInternalsFunctions;
</span><ins>+    WritableStreamInternalsBuiltinFunctions m_writableStreamInternalsFunctions;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -39,4 +39,5 @@
</span><span class="cx"> #include &quot;ReadableStreamReaderBuiltins.cpp&quot;
</span><span class="cx"> #include &quot;StreamInternalsBuiltins.cpp&quot;
</span><span class="cx"> #include &quot;WritableStreamBuiltins.cpp&quot;
</span><ins>+#include &quot;WritableStreamInternalsBuiltins.cpp&quot;
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSBuiltinsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h (191382 => 191383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h        2015-10-21 08:18:29 UTC (rev 191382)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h        2015-10-21 08:34:41 UTC (rev 191383)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &quot;ReadableStreamReaderBuiltinsWrapper.h&quot;
</span><span class="cx"> #include &quot;StreamInternalsBuiltinsWrapper.h&quot;
</span><span class="cx"> #include &quot;WritableStreamBuiltinsWrapper.h&quot;
</span><ins>+#include &quot;WritableStreamInternalsBuiltinsWrapper.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #include &lt;runtime/VM.h&gt;
</span><span class="lines">@@ -59,6 +60,7 @@
</span><span class="cx">         , m_readableStreamReaderBuiltins(&amp;vm)
</span><span class="cx">         , m_streamInternalsBuiltins(&amp;vm)
</span><span class="cx">         , m_writableStreamBuiltins(&amp;vm)
</span><ins>+        , m_writableStreamInternalsBuiltins(&amp;vm)
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">         , m_mediaDevicesBuiltins(&amp;vm)
</span><span class="lines">@@ -67,6 +69,7 @@
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="cx">         m_readableStreamInternalsBuiltins.exportNames();
</span><span class="cx">         m_streamInternalsBuiltins.exportNames();
</span><ins>+        m_writableStreamInternalsBuiltins.exportNames();
</ins><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><span class="lines">@@ -78,6 +81,7 @@
</span><span class="cx">     ReadableStreamReaderBuiltinsWrapper&amp; readableStreamReaderBuiltins() { return m_readableStreamReaderBuiltins; }
</span><span class="cx">     StreamInternalsBuiltinsWrapper&amp; streamInternalsBuiltins() { return m_streamInternalsBuiltins; }
</span><span class="cx">     WritableStreamBuiltinsWrapper&amp; writableStreamBuiltins() { return m_writableStreamBuiltins; }
</span><ins>+    WritableStreamInternalsBuiltinsWrapper&amp; writableStreamInternalsBuiltins() { return m_writableStreamInternalsBuiltins;}
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">     MediaDevicesBuiltinsWrapper&amp; mediaDevicesBuiltins() { return m_mediaDevicesBuiltins; }
</span><span class="lines">@@ -94,6 +98,7 @@
</span><span class="cx">     ReadableStreamReaderBuiltinsWrapper m_readableStreamReaderBuiltins;
</span><span class="cx">     StreamInternalsBuiltinsWrapper m_streamInternalsBuiltins;
</span><span class="cx">     WritableStreamBuiltinsWrapper m_writableStreamBuiltins;
</span><ins>+    WritableStreamInternalsBuiltinsWrapper m_writableStreamInternalsBuiltins;
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">     MediaDevicesBuiltinsWrapper m_mediaDevicesBuiltins;
</span></span></pre>
</div>
</div>

</body>
</html>