WebKit Bugzilla
Attachment 340296 Details for
Bug 185602
: readableStreamDefaultControllerError should return early if stream is not readable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185602-20180514092450.patch (text/plain), 8.24 KB, created by
youenn fablet
on 2018-05-14 00:24:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-05-14 00:24:52 PDT
Size:
8.24 KB
patch
obsolete
>Subversion Revision: 231744 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cf540aec2a73503bea3bb0d3d9ba349723b88337..abe268e8a1f79763921252da33d339a121d34182 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-14 Youenn Fablet <youenn@apple.com> >+ >+ readableStreamDefaultControllerError should return early if stream is not readable >+ https://bugs.webkit.org/show_bug.cgi?id=185602 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Return early if stream is not readable in @readableStreamDefaultControllerError. >+ Update call sites to no longer check for ReadableStream state. >+ Covered by unflaked tests. >+ >+ * Modules/streams/ReadableStreamDefaultController.js: >+ (error): >+ * Modules/streams/ReadableStreamInternals.js: >+ (readableStreamDefaultControllerError): >+ (readableStreamDefaultControllerCallPullIfNeeded): >+ > 2018-05-13 Dirk Schulze <krit@webkit.org> > > Implement SVGGeometryElement's isPointInFill and isPointInStroke >diff --git a/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js b/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js >index cf3defff3eff7cdb769c73d7daa6f8cfa4e57356..a373fadb74b063205dc7fcf005f499a2c56a72da 100644 >--- a/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js >+++ b/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js >@@ -45,9 +45,6 @@ function error(error) > if (!@isReadableStreamDefaultController(this)) > throw @makeThisTypeError("ReadableStreamDefaultController", "error"); > >- if (@getByIdDirectPrivate(@getByIdDirectPrivate(this, "controlledReadableStream"), "state") !== @streamReadable) >- @throwTypeError("ReadableStream is not readable"); >- > @readableStreamDefaultControllerError(this, error); > } > >diff --git a/Source/WebCore/Modules/streams/ReadableStreamInternals.js b/Source/WebCore/Modules/streams/ReadableStreamInternals.js >index 3429a6104c971290ced6a213e080b23c12628fda..95aa75b504da5c4d1d2542a4cff87a58679d7a7e 100644 >--- a/Source/WebCore/Modules/streams/ReadableStreamInternals.js >+++ b/Source/WebCore/Modules/streams/ReadableStreamInternals.js >@@ -85,8 +85,7 @@ function privateInitializeReadableStreamDefaultController(stream, underlyingSour > @assert(!@getByIdDirectPrivate(controller, "pullAgain")); > @readableStreamDefaultControllerCallPullIfNeeded(controller); > }, (error) => { >- if (@getByIdDirectPrivate(stream, "state") === @streamReadable) >- @readableStreamDefaultControllerError(controller, error); >+ @readableStreamDefaultControllerError(controller, error); > }); > > @putByIdDirectPrivate(this, "cancel", @readableStreamDefaultControllerCancel); >@@ -101,7 +100,8 @@ function readableStreamDefaultControllerError(controller, error) > "use strict"; > > const stream = @getByIdDirectPrivate(controller, "controlledReadableStream"); >- @assert(@getByIdDirectPrivate(stream, "state") === @streamReadable); >+ if (@getByIdDirectPrivate(stream, "state") !== @streamReadable) >+ return; > @putByIdDirectPrivate(controller, "queue", @newQueue()); > @readableStreamError(stream, error); > } >@@ -341,8 +341,7 @@ function readableStreamDefaultControllerCallPullIfNeeded(controller) > @readableStreamDefaultControllerCallPullIfNeeded(controller); > } > }, function(error) { >- if (@getByIdDirectPrivate(stream, "state") === @streamReadable) >- @readableStreamDefaultControllerError(controller, error); >+ @readableStreamDefaultControllerError(controller, error); > }); > } > >@@ -477,8 +476,7 @@ function readableStreamDefaultControllerEnqueue(controller, chunk) > @enqueueValueWithSize(@getByIdDirectPrivate(controller, "queue"), chunk, chunkSize); > } > catch(error) { >- if (@getByIdDirectPrivate(stream, "state") === @streamReadable) >- @readableStreamDefaultControllerError(controller, error); >+ @readableStreamDefaultControllerError(controller, error); > throw error; > } > @readableStreamDefaultControllerCallPullIfNeeded(controller); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2ce1d0a52ca71d966faed23858b0e5627ecb2fe6..e351694c69521ea03ec435a73666bf5b3af06f84 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2018-05-14 Youenn Fablet <youenn@apple.com> >+ >+ readableStreamDefaultControllerError should return early if stream is not readable >+ https://bugs.webkit.org/show_bug.cgi?id=185602 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: >+ > 2018-05-13 Andy VanWagoner <andy@vanwagoner.family> > > [INTL] Improve spec & test262 compliance for Intl APIs >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index e125abf020f4b243fd9a97fd8491308dfa2f7ec8..3387a436c2792ba44bd400e6b2662904048a109b 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,12 @@ >+2018-05-14 Youenn Fablet <youenn@apple.com> >+ >+ readableStreamDefaultControllerError should return early if stream is not readable >+ https://bugs.webkit.org/show_bug.cgi?id=185602 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/streams/readable-streams/tee-expected.txt: >+ > 2018-05-11 Ryosuke Niwa <rniwa@webkit.org> > > Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index ec018affd716addde45481504ea2b1a896c4f780..752fefb41c8297f238aa5b53ba05ad1dcb5afb09 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -618,10 +618,8 @@ http/tests/loading/text-content-type-with-binary-extension.html [ Pass Failure ] > webkit.org/b/171094 streams/brand-checks.html [ Pass Failure ] > webkit.org/b/171094 streams/reference-implementation/abstract-ops.html [ Pass Failure ] > >-# tee.html is flaky with release and crashes with debug builds >-webkit.org/b/171094 imported/w3c/web-platform-tests/streams/readable-streams/tee.html [ Pass Failure Crash ] >-[ Debug ] imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https.html [ Failure ] >-[ Debug ] imported/w3c/web-platform-tests/streams/readable-streams/tee.dedicatedworker.html [ Crash ] >+# tee.html is flaky with unhandled promise rejections >+imported/w3c/web-platform-tests/streams/readable-streams/tee.html [ DumpJSConsoleLogInStdErr ] > > # WPT tests that fail after doing full test repository reimport and need further investigation > imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace.html [ Pass Failure ] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee-expected.txt >index 6de2142fdce3682870f9df4b36f71ab18f28eb84..e03a5c2183c845526d1b0b2f9a7ea433981d3d5d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee-expected.txt >@@ -1,7 +1,3 @@ >-CONSOLE MESSAGE: Unhandled Promise Rejection: [object Object] >-CONSOLE MESSAGE: Unhandled Promise Rejection: [object Object] >-CONSOLE MESSAGE: Unhandled Promise Rejection: [object Object] >-CONSOLE MESSAGE: Unhandled Promise Rejection: [object Object] > > PASS ReadableStream teeing: rs.tee() returns an array of two ReadableStreams > PASS ReadableStream teeing: should be able to read one branch to the end without affecting the other >@@ -11,6 +7,8 @@ PASS ReadableStream teeing: canceling branch1 should not impact branch2 > PASS ReadableStream teeing: canceling branch2 should not impact branch2 > PASS ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array > PASS ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches >+PASS ReadableStream teeing: erroring a teed stream should properly handle canceled branches > PASS ReadableStream teeing: closing the original should immediately close the branches > PASS ReadableStream teeing: erroring the original should immediately error the branches >+PASS ReadableStreamTee should not use a modified ReadableStream constructor from the global object >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185602
:
340296
|
340301
|
340307