<!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>[208422] 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/208422">208422</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-11-07 06:46:04 -0800 (Mon, 07 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/208382">r208382</a>.

This change appears to have caused 3
SerializedCryptoKeyWrapTest API tests to fail on macOS.

Reverted changeset:

&quot;[Readable Streams API] Implement ByteStreamController
error()&quot;
https://bugs.webkit.org/show_bug.cgi?id=164319
http://trac.webkit.org/changeset/208382</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstreamsreadablebytestreamcontrollerexpectedtxt">trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstreamsreadablebytestreamcontrollerjs">trunk/LayoutTests/streams/readable-byte-stream-controller.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableByteStreamControllerjs">trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableByteStreamInternalsjs">trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamjs">trunk/Source/WebCore/Modules/streams/ReadableStream.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamDefaultControllerjs">trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/LayoutTests/ChangeLog        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-07  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r208382.
+
+        This change appears to have caused 3
+        SerializedCryptoKeyWrapTest API tests to fail on macOS.
+
+        Reverted changeset:
+
+        &quot;[Readable Streams API] Implement ByteStreamController
+        error()&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=164319
+        http://trac.webkit.org/changeset/208382
+
</ins><span class="cx"> 2016-11-05  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Removing flaky expectations for tests that were fixed with r208327.
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreadablebytestreamcontrollerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -1,14 +1,10 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed 
</span><del>-PASS ReadableByteStreamController instances should have the correct list of properties 
-PASS Calling error() with a this object different from ReadableByteStreamController should fail 
-PASS Calling read() on a reader associated to a controller that has been errored should be rejected 
</del><ins>+FAIL Calling read() on a reader associated to a controller that has been errored should be rejected ReadableByteStreamController error() is not implemented
</ins><span class="cx"> FAIL Calling read() on a reader associated to a controller that has been closed should not be rejected ReadableByteStreamController close() is not implemented
</span><span class="cx"> FAIL Calling read() after a chunk has been enqueued should result in obtaining said chunk ReadableByteStreamController enqueue() is not implemented
</span><span class="cx"> PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed 
</span><del>-PASS ReadableByteStreamController instances should have the correct list of properties 
-PASS Calling error() with a this object different from ReadableByteStreamController should fail 
-PASS Calling read() on a reader associated to a controller that has been errored should be rejected 
</del><ins>+FAIL Calling read() on a reader associated to a controller that has been errored should be rejected ReadableByteStreamController error() is not implemented
</ins><span class="cx"> FAIL Calling read() on a reader associated to a controller that has been closed should not be rejected ReadableByteStreamController close() is not implemented
</span><span class="cx"> FAIL Calling read() after a chunk has been enqueued should result in obtaining said chunk ReadableByteStreamController enqueue() is not implemented
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstreamsreadablebytestreamcontrollerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/streams/readable-byte-stream-controller.js (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/streams/readable-byte-stream-controller.js        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/LayoutTests/streams/readable-byte-stream-controller.js        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -10,59 +10,6 @@
</span><span class="cx">     });
</span><span class="cx"> }, &quot;Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed&quot;);
</span><span class="cx"> 
</span><del>-test(() =&gt; {
-    const methods = ['close', 'constructor', 'enqueue', 'error'];
-    // FIXME: Add byobRequest when implemented.
-    const properties = methods.concat(['desiredSize']).sort();
-
-    let controller;
-
-    const rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        },
-        type: &quot;bytes&quot;
-    });
-
-    const proto = Object.getPrototypeOf(controller);
-
-    assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties);
-
-    for (const m of methods) {
-        const propDesc = Object.getOwnPropertyDescriptor(proto, m);
-        assert_equals(propDesc.enumerable, false, 'method should be non-enumerable');
-        assert_equals(propDesc.configurable, true, 'method should be configurable');
-        assert_equals(propDesc.writable, true, 'method should be writable');
-        assert_equals(typeof controller[m], 'function', 'should have be a method');
-    }
-
-    const desiredSizePropDesc = Object.getOwnPropertyDescriptor(proto, 'desiredSize');
-    assert_equals(desiredSizePropDesc.enumerable, false, 'desiredSize should be non-enumerable');
-    assert_equals(desiredSizePropDesc.configurable, true, 'desiredSize should be configurable');
-    assert_not_equals(desiredSizePropDesc.get, undefined, 'desiredSize should have a getter');
-    assert_equals(desiredSizePropDesc.set, undefined, 'desiredSize should not have a setter');
-
-    assert_equals(controller.close.length, 0, 'close has 0 parameter');
-    assert_equals(controller.constructor.length, 3, 'constructor has 3 parameters');
-    assert_equals(controller.enqueue.length, 1, 'enqueue has 1 parameter');
-    assert_equals(controller.error.length, 1, 'error has 1 parameter');
-
-}, 'ReadableByteStreamController instances should have the correct list of properties');
-
-test(function() {
-    let controller;
-
-    const rs = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        },
-        type: &quot;bytes&quot;
-    });
-
-    assert_throws(new TypeError(&quot;Can only call ReadableByteStreamController.error on instances of ReadableByteStreamController&quot;),
-        function() { controller.error.apply(rs); });
-}, &quot;Calling error() with a this object different from ReadableByteStreamController should fail&quot;);
-
</del><span class="cx"> const test2 = async_test(&quot;Calling read() on a reader associated to a controller that has been errored should be rejected&quot;);
</span><span class="cx"> test2.step(function() {
</span><span class="cx">     let controller;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/ChangeLog        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-07  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r208382.
+
+        This change appears to have caused 3
+        SerializedCryptoKeyWrapTest API tests to fail on macOS.
+
+        Reverted changeset:
+
+        &quot;[Readable Streams API] Implement ByteStreamController
+        error()&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=164319
+        http://trac.webkit.org/changeset/208382
+
</ins><span class="cx"> 2016-11-04  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableByteStreamControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.js (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.js        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.js        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -37,13 +37,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (!@isReadableByteStreamController(this))
-        throw @makeThisTypeError(&quot;ReadableByteStreamController&quot;, &quot;error&quot;);
-
-    if (this.@controlledReadableStream.@state !== @streamReadable)
-        @throwTypeError(&quot;ReadableStream is not readable&quot;);
-
-    @readableByteStreamControllerError(this, error);
</del><ins>+    //FIXME: Implement appropriate behavior.
+    @throwTypeError(&quot;ReadableByteStreamController error() is not implemented&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function close()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableByteStreamInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -39,13 +39,11 @@
</span><span class="cx"> 
</span><span class="cx">     this.@controlledReadableStream = stream;
</span><span class="cx">     this.@underlyingByteSource = underlyingByteSource;
</span><del>-    this.@pullAgain = false;
-    this.@pulling = false;
-    @readableByteStreamControllerClearPendingPullIntos(this);
</del><span class="cx">     this.@queue = @newQueue();
</span><del>-    this.@totalQueuedBytes = 0;
</del><span class="cx">     this.@started = false;
</span><span class="cx">     this.@closeRequested = false;
</span><ins>+    this.@pullAgain = false;
+    this.@pulling = false;
</ins><span class="cx"> 
</span><span class="cx">     let hwm = @Number(highWaterMark);
</span><span class="cx">     if (@isNaN(hwm) || hwm &lt; 0)
</span><span class="lines">@@ -52,6 +50,8 @@
</span><span class="cx">         @throwRangeError(&quot;highWaterMark value is negative or not a number&quot;);
</span><span class="cx">     this.@strategyHWM = hwm;
</span><span class="cx"> 
</span><ins>+    // FIXME: Implement readableByteStreamControllerClearPendingPullIntos.
+
</ins><span class="cx">     let autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;
</span><span class="cx">     if (autoAllocateChunkSize !== @undefined) {
</span><span class="cx">         autoAllocateChunkSize = @Number(autoAllocateChunkSize);
</span><span class="lines">@@ -75,29 +75,3 @@
</span><span class="cx"> 
</span><span class="cx">     return this;
</span><span class="cx"> }
</span><del>-
-function isReadableByteStreamController(controller)
-{
-    &quot;use strict&quot;;
-
-    // Same test mechanism as in isReadableStreamDefaultController (ReadableStreamInternals.js).
-    // See corresponding function for explanations.
-    return @isObject(controller) &amp;&amp; !!controller.@underlyingByteSource;
-}
-
-function readableByteStreamControllerError(controller, e)
-{
-    &quot;use strict&quot;;
-
-    @assert(controller.@controlledReadableStream.@state === @streamReadable);
-    @readableByteStreamControllerClearPendingPullIntos(controller);
-    controller.@queue = @newQueue();
-    @readableStreamError(controller.@controlledReadableStream, e);
-}
-
-function readableByteStreamControllerClearPendingPullIntos(controller)
-{
-    &quot;use strict&quot;;
-
-    // FIXME: To be implemented in conjunction with ReadableStreamBYOBRequest.
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.js        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.js        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -58,11 +58,10 @@
</span><span class="cx">         // Constructor is not necessarily available if the byteStream part of Readeable Stream API is not activated. Therefore, a
</span><span class="cx">         // specific handling of error is done.
</span><span class="cx">         try {
</span><del>-            let readableByteStreamControllerConstructor = @ReadableByteStreamController;
</del><ins>+            this.@readableStreamController = new @ReadableByteStreamController(this, underlyingSource, strategy.highWaterMark);
</ins><span class="cx">         } catch (e) {
</span><del>-            @throwTypeError(&quot;ReadableByteStreamController is not implemented&quot;);
</del><ins>+            @throwTypeError(&quot;ReadableByteStreamController could not be created&quot;);
</ins><span class="cx">         }
</span><del>-        this.@readableStreamController = new @ReadableByteStreamController(this, underlyingSource, strategy.highWaterMark);
</del><span class="cx">     } else if (type === @undefined) {
</span><span class="cx">         if (strategy.highWaterMark === @undefined)
</span><span class="cx">             strategy.highWaterMark = 1;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamDefaultControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -48,7 +48,8 @@
</span><span class="cx">     if (!@isReadableStreamDefaultController(this))
</span><span class="cx">         throw @makeThisTypeError(&quot;ReadableStreamDefaultController&quot;, &quot;error&quot;);
</span><span class="cx"> 
</span><del>-    if (this.@controlledReadableStream.@state !== @streamReadable)
</del><ins>+    const stream = this.@controlledReadableStream;
+    if (stream.@state !== @streamReadable)
</ins><span class="cx">         @throwTypeError(&quot;ReadableStream is not readable&quot;);
</span><span class="cx"> 
</span><span class="cx">     @readableStreamDefaultControllerError(this, error);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (208421 => 208422)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2016-11-07 14:46:04 UTC (rev 208422)
</span><span class="lines">@@ -97,7 +97,6 @@
</span><span class="cx">     macro(streamWritable) \
</span><span class="cx">     macro(structuredCloneArrayBuffer) \
</span><span class="cx">     macro(structuredCloneArrayBufferView) \
</span><del>-    macro(totalQueuedBytes) \
</del><span class="cx">     macro(underlyingByteSource) \
</span><span class="cx">     macro(underlyingSink) \
</span><span class="cx">     macro(underlyingSource) \
</span></span></pre>
</div>
</div>

</body>
</html>