Title: [266162] trunk
- Revision
- 266162
- Author
- [email protected]
- Date
- 2020-08-26 00:22:08 -0700 (Wed, 26 Aug 2020)
Log Message
pipeThrough should check for readableStream type
https://bugs.webkit.org/show_bug.cgi?id=215497
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/streams/piping/pipe-through.any-expected.txt:
* web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:
Source/WebCore:
Covered by rebased tests.
* Modules/streams/ReadableStream.js:
(pipeThrough):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266161 => 266162)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-26 06:26:55 UTC (rev 266161)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-26 07:22:08 UTC (rev 266162)
@@ -1,3 +1,13 @@
+2020-08-26 Youenn Fablet <[email protected]>
+
+ pipeThrough should check for readableStream type
+ https://bugs.webkit.org/show_bug.cgi?id=215497
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/streams/piping/pipe-through.any-expected.txt:
+ * web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:
+
2020-08-25 Ryosuke Niwa <[email protected]>
Resolve with the class used to define the Custom Element
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt (266161 => 266162)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt 2020-08-26 06:26:55 UTC (rev 266161)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt 2020-08-26 07:22:08 UTC (rev 266162)
@@ -6,69 +6,27 @@
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
-FAIL pipeThrough should brand-check readable and not allow 'null' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
-FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
-FAIL pipeThrough should brand-check readable and not allow '0' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
-FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
-FAIL pipeThrough should brand-check readable and not allow 'true' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
-FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
-FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
-FAIL pipeThrough should brand-check writable and not allow 'null' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'undefined' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow '0' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'NaN' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'true' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'WritableStream' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow '[object WritableStream]' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should rethrow errors from accessing readable or writable assert_throws_exactly: pipeThrough should rethrow the error thrown by the readable getter function "() => ReadableStream.prototype.pipeThrough.call(rs, throwingReadable, {})" threw object "TypeError: writable should be WritableStream" but we expected it to throw object "custom"
+PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
+PASS pipeThrough should brand-check writable and not allow 'null'
+PASS pipeThrough should brand-check writable and not allow 'undefined'
+PASS pipeThrough should brand-check writable and not allow '0'
+PASS pipeThrough should brand-check writable and not allow 'NaN'
+PASS pipeThrough should brand-check writable and not allow 'true'
+PASS pipeThrough should brand-check writable and not allow 'WritableStream'
+PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
+PASS pipeThrough should rethrow errors from accessing readable or writable
PASS invalid values of signal should throw; specifically 'null'
PASS invalid values of signal should throw; specifically '0'
PASS invalid values of signal should throw; specifically 'NaN'
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt (266161 => 266162)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt 2020-08-26 06:26:55 UTC (rev 266161)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt 2020-08-26 07:22:08 UTC (rev 266162)
@@ -6,69 +6,27 @@
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
-FAIL pipeThrough should brand-check readable and not allow 'null' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
-FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
-FAIL pipeThrough should brand-check readable and not allow '0' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
-FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
-FAIL pipeThrough should brand-check readable and not allow 'true' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
-FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
+PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
-FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
- get writable() {
- writableGetterCalled = true;
- return new WritableStream();
- },
- readable
- })" did not throw
-FAIL pipeThrough should brand-check writable and not allow 'null' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'undefined' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow '0' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'NaN' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'true' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow 'WritableStream' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should brand-check writable and not allow '[object WritableStream]' assert_true: readable should have been accessed expected true got false
-FAIL pipeThrough should rethrow errors from accessing readable or writable assert_throws_exactly: pipeThrough should rethrow the error thrown by the readable getter function "() => ReadableStream.prototype.pipeThrough.call(rs, throwingReadable, {})" threw object "TypeError: writable should be WritableStream" but we expected it to throw object "custom"
+PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
+PASS pipeThrough should brand-check writable and not allow 'null'
+PASS pipeThrough should brand-check writable and not allow 'undefined'
+PASS pipeThrough should brand-check writable and not allow '0'
+PASS pipeThrough should brand-check writable and not allow 'NaN'
+PASS pipeThrough should brand-check writable and not allow 'true'
+PASS pipeThrough should brand-check writable and not allow 'WritableStream'
+PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
+PASS pipeThrough should rethrow errors from accessing readable or writable
PASS invalid values of signal should throw; specifically 'null'
PASS invalid values of signal should throw; specifically '0'
PASS invalid values of signal should throw; specifically 'NaN'
Modified: trunk/Source/WebCore/ChangeLog (266161 => 266162)
--- trunk/Source/WebCore/ChangeLog 2020-08-26 06:26:55 UTC (rev 266161)
+++ trunk/Source/WebCore/ChangeLog 2020-08-26 07:22:08 UTC (rev 266162)
@@ -1,3 +1,15 @@
+2020-08-26 Youenn Fablet <[email protected]>
+
+ pipeThrough should check for readableStream type
+ https://bugs.webkit.org/show_bug.cgi?id=215497
+
+ Reviewed by Alex Christensen.
+
+ Covered by rebased tests.
+
+ * Modules/streams/ReadableStream.js:
+ (pipeThrough):
+
2020-08-25 Fujii Hironori <[email protected]>
Move FreeType port's Font::platformWidthForGlyph and Font::platformBoundsForGlyph for Cairo port (WinCairo port)
Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (266161 => 266162)
--- trunk/Source/WebCore/Modules/streams/ReadableStream.js 2020-08-26 06:26:55 UTC (rev 266161)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.js 2020-08-26 07:22:08 UTC (rev 266162)
@@ -117,14 +117,18 @@
if (@writableStreamAPIEnabled()) {
if (!@isReadableStream(this))
- throw @makeThisTypeError("ReadableStream", "getReader");
+ throw @makeThisTypeError("ReadableStream", "pipeThrough");
if (@isReadableStreamLocked(this))
throw @makeTypeError("ReadableStream is locked");
const transforms = streams;
+
+ const readable = transforms["readable"];
+ if (!@isReadableStream(readable))
+ throw @makeTypeError("readable should be ReadableStream");
+
const writable = transforms["writable"];
-
if (!@isWritableStream(writable))
throw @makeTypeError("writable should be WritableStream");
@@ -147,7 +151,7 @@
@readableStreamPipeToWritableStream(this, writable, preventClose, preventAbort, preventCancel, signal);
- return transforms["readable"];
+ return readable;
}
const writable = streams.writable;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes