RESOLVED FIXED 146455
[Streams API] Remove ReadableStreamController.enqueue() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146455
Summary [Streams API] Remove ReadableStreamController.enqueue() custom binding
youenn fablet
Reported 2015-06-30 04:32:52 PDT
We should remove as much ReadableStream custom binding as possible.
Attachments
Patch (8.05 KB, patch)
2015-06-30 09:30 PDT, youenn fablet
no flags
Using Default in IDL (9.15 KB, patch)
2015-07-02 07:06 PDT, youenn fablet
no flags
Patch for landing (9.12 KB, patch)
2015-07-02 11:30 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2015-06-30 09:30:22 PDT
youenn fablet
Comment 2 2015-06-30 09:34:48 PDT
Comment on attachment 255824 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255824&action=review > Source/WebCore/bindings/js/ReadableJSStream.cpp:392 > + throwVMError(&state, error()); I thought initially about doing "ec = RangeError" here. But the same exception must be thrown and stored in the stream. I still see some value in introducing "RangeError" for other binding code. > Source/WebCore/bindings/js/ReadableJSStream.h:66 > void error(JSC::ExecState&, ExceptionCode&); I wonder whether we should rename controller methods (enqueue, error and close), in particular error() which may be misleading with m_error getter.
youenn fablet
Comment 3 2015-07-02 07:06:58 PDT
Created attachment 256008 [details] Using Default in IDL
Darin Adler
Comment 4 2015-07-02 09:40:44 PDT
Comment on attachment 256008 [details] Using Default in IDL View in context: https://bugs.webkit.org/attachment.cgi?id=256008&action=review > Source/WebCore/bindings/js/ReadableJSStream.cpp:344 > + throwVMError(&state, error()); This is messy. Having the same function sometimes set exceptions directly on ExecState and other times indicate the exception with an ExceptionCode is a bad idea. > Source/WebCore/dom/ExceptionCode.h:68 > + RangeError = 106, If you add this new type, I think you need to add handling for it in a few places.
youenn fablet
Comment 5 2015-07-02 10:04:21 PDT
Comment on attachment 256008 [details] Using Default in IDL View in context: https://bugs.webkit.org/attachment.cgi?id=256008&action=review >> Source/WebCore/bindings/js/ReadableJSStream.cpp:344 >> + throwVMError(&state, error()); > > This is messy. Having the same function sometimes set exceptions directly on ExecState and other times indicate the exception with an ExceptionCode is a bad idea. OK >> Source/WebCore/dom/ExceptionCode.h:68 >> + RangeError = 106, > > If you add this new type, I think you need to add handling for it in a few places. I plan to reuse it in ReadableJSStream::create(). I will also add it in some binding places where the range message is not very meaningful.
youenn fablet
Comment 6 2015-07-02 11:30:16 PDT
Created attachment 256021 [details] Patch for landing
WebKit Commit Bot
Comment 7 2015-07-02 12:28:24 PDT
Comment on attachment 256021 [details] Patch for landing Clearing flags on attachment: 256021 Committed r186231: <http://trac.webkit.org/changeset/186231>
WebKit Commit Bot
Comment 8 2015-07-02 12:28:28 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.