Diff
Modified: trunk/LayoutTests/ChangeLog (208421 => 208422)
--- trunk/LayoutTests/ChangeLog 2016-11-07 06:12:36 UTC (rev 208421)
+++ trunk/LayoutTests/ChangeLog 2016-11-07 14:46:04 UTC (rev 208422)
@@ -1,3 +1,17 @@
+2016-11-07 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r208382.
+
+ This change appears to have caused 3
+ SerializedCryptoKeyWrapTest API tests to fail on macOS.
+
+ Reverted changeset:
+
+ "[Readable Streams API] Implement ByteStreamController
+ error()"
+ https://bugs.webkit.org/show_bug.cgi?id=164319
+ http://trac.webkit.org/changeset/208382
+
2016-11-05 Ryan Haddad <[email protected]>
Removing flaky expectations for tests that were fixed with r208327.
Modified: trunk/LayoutTests/streams/readable-byte-stream-controller-expected.txt (208421 => 208422)
--- 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)
@@ -1,14 +1,10 @@
PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed
-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
+FAIL Calling read() on a reader associated to a controller that has been errored should be rejected ReadableByteStreamController error() is not implemented
FAIL Calling read() on a reader associated to a controller that has been closed should not be rejected ReadableByteStreamController close() is not implemented
FAIL Calling read() after a chunk has been enqueued should result in obtaining said chunk ReadableByteStreamController enqueue() is not implemented
PASS Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed
-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
+FAIL Calling read() on a reader associated to a controller that has been errored should be rejected ReadableByteStreamController error() is not implemented
FAIL Calling read() on a reader associated to a controller that has been closed should not be rejected ReadableByteStreamController close() is not implemented
FAIL Calling read() after a chunk has been enqueued should result in obtaining said chunk ReadableByteStreamController enqueue() is not implemented
Modified: trunk/LayoutTests/streams/readable-byte-stream-controller.js (208421 => 208422)
--- 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)
@@ -10,59 +10,6 @@
});
}, "Creating a ReadableStream with an underlyingSource with type property set to 'bytes' should succeed");
-test(() => {
- 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: "bytes"
- });
-
- 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: "bytes"
- });
-
- assert_throws(new TypeError("Can only call ReadableByteStreamController.error on instances of ReadableByteStreamController"),
- function() { controller.error.apply(rs); });
-}, "Calling error() with a this object different from ReadableByteStreamController should fail");
-
const test2 = async_test("Calling read() on a reader associated to a controller that has been errored should be rejected");
test2.step(function() {
let controller;
Modified: trunk/Source/WebCore/ChangeLog (208421 => 208422)
--- 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)
@@ -1,3 +1,17 @@
+2016-11-07 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r208382.
+
+ This change appears to have caused 3
+ SerializedCryptoKeyWrapTest API tests to fail on macOS.
+
+ Reverted changeset:
+
+ "[Readable Streams API] Implement ByteStreamController
+ error()"
+ https://bugs.webkit.org/show_bug.cgi?id=164319
+ http://trac.webkit.org/changeset/208382
+
2016-11-04 Filip Pizlo <[email protected]>
WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
Modified: trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.js (208421 => 208422)
--- 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)
@@ -37,13 +37,8 @@
{
"use strict";
- if (!@isReadableByteStreamController(this))
- throw @makeThisTypeError("ReadableByteStreamController", "error");
-
- if (this.@controlledReadableStream.@state !== @streamReadable)
- @throwTypeError("ReadableStream is not readable");
-
- @readableByteStreamControllerError(this, error);
+ //FIXME: Implement appropriate behavior.
+ @throwTypeError("ReadableByteStreamController error() is not implemented");
}
function close()
Modified: trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js (208421 => 208422)
--- 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)
@@ -39,13 +39,11 @@
this.@controlledReadableStream = stream;
this.@underlyingByteSource = underlyingByteSource;
- this.@pullAgain = false;
- this.@pulling = false;
- @readableByteStreamControllerClearPendingPullIntos(this);
this.@queue = @newQueue();
- this.@totalQueuedBytes = 0;
this.@started = false;
this.@closeRequested = false;
+ this.@pullAgain = false;
+ this.@pulling = false;
let hwm = @Number(highWaterMark);
if (@isNaN(hwm) || hwm < 0)
@@ -52,6 +50,8 @@
@throwRangeError("highWaterMark value is negative or not a number");
this.@strategyHWM = hwm;
+ // FIXME: Implement readableByteStreamControllerClearPendingPullIntos.
+
let autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;
if (autoAllocateChunkSize !== @undefined) {
autoAllocateChunkSize = @Number(autoAllocateChunkSize);
@@ -75,29 +75,3 @@
return this;
}
-
-function isReadableByteStreamController(controller)
-{
- "use strict";
-
- // Same test mechanism as in isReadableStreamDefaultController (ReadableStreamInternals.js).
- // See corresponding function for explanations.
- return @isObject(controller) && !!controller.@underlyingByteSource;
-}
-
-function readableByteStreamControllerError(controller, e)
-{
- "use strict";
-
- @assert(controller.@controlledReadableStream.@state === @streamReadable);
- @readableByteStreamControllerClearPendingPullIntos(controller);
- controller.@queue = @newQueue();
- @readableStreamError(controller.@controlledReadableStream, e);
-}
-
-function readableByteStreamControllerClearPendingPullIntos(controller)
-{
- "use strict";
-
- // FIXME: To be implemented in conjunction with ReadableStreamBYOBRequest.
-}
Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (208421 => 208422)
--- 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)
@@ -58,11 +58,10 @@
// Constructor is not necessarily available if the byteStream part of Readeable Stream API is not activated. Therefore, a
// specific handling of error is done.
try {
- let readableByteStreamControllerConstructor = @ReadableByteStreamController;
+ this.@readableStreamController = new @ReadableByteStreamController(this, underlyingSource, strategy.highWaterMark);
} catch (e) {
- @throwTypeError("ReadableByteStreamController is not implemented");
+ @throwTypeError("ReadableByteStreamController could not be created");
}
- this.@readableStreamController = new @ReadableByteStreamController(this, underlyingSource, strategy.highWaterMark);
} else if (type === @undefined) {
if (strategy.highWaterMark === @undefined)
strategy.highWaterMark = 1;
Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js (208421 => 208422)
--- 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)
@@ -48,7 +48,8 @@
if (!@isReadableStreamDefaultController(this))
throw @makeThisTypeError("ReadableStreamDefaultController", "error");
- if (this.@controlledReadableStream.@state !== @streamReadable)
+ const stream = this.@controlledReadableStream;
+ if (stream.@state !== @streamReadable)
@throwTypeError("ReadableStream is not readable");
@readableStreamDefaultControllerError(this, error);
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (208421 => 208422)
--- 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)
@@ -97,7 +97,6 @@
macro(streamWritable) \
macro(structuredCloneArrayBuffer) \
macro(structuredCloneArrayBufferView) \
- macro(totalQueuedBytes) \
macro(underlyingByteSource) \
macro(underlyingSink) \
macro(underlyingSource) \