WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145262
[Streams API] Implement pulling of a source by a ReadableStream
https://bugs.webkit.org/show_bug.cgi?id=145262
Summary
[Streams API] Implement pulling of a source by a ReadableStream
youenn fablet
Reported
2015-05-21 05:18:16 PDT
At start time or after reading some data, a ReadableStream may want to pull data from its source until a limit. This mechanism should be implemented.
Attachments
Patch
(15.47 KB, patch)
2015-06-09 01:16 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Rebasing
(19.10 KB, patch)
2015-06-09 01:58 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Fixed typo
(19.25 KB, patch)
2015-06-09 07:59 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(19.36 KB, patch)
2015-06-09 12:44 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2015-06-09 01:16:50 PDT
Created
attachment 254556
[details]
Patch
youenn fablet
Comment 2
2015-06-09 01:58:21 PDT
Created
attachment 254557
[details]
Rebasing
youenn fablet
Comment 3
2015-06-09 07:59:33 PDT
Created
attachment 254569
[details]
Fixed typo
Darin Adler
Comment 4
2015-06-09 09:49:45 PDT
Comment on
attachment 254569
[details]
Fixed typo View in context:
https://bugs.webkit.org/attachment.cgi?id=254569&action=review
> Source/WebCore/bindings/js/ReadableJSStream.cpp:108 > + ExecState& exec= *globalObject()->globalExec();
Missing space here before before the "=" sign. Also, lately I have been thinking we should start using “state” as the name for this rather then “exec”.
> Source/WebCore/bindings/js/ReadableJSStream.cpp:153 > +bool ReadableJSStream::checkForException(JSC::ExecState& exec)
I don’t think the name for this is exactly right; this does more than just “check for” an exception. It moves the exception from the execution state to the stream object. It’s a lot like “store error” in fact. I think maybe the storeError that doesn’t take an argument should just do this if there’s an exception in the exception state. I also think the idea of having this function do the hadException boolean check is so great. If the caller needs to distinguish that case, I think checking hadException at the call site makes no sense.
youenn fablet
Comment 5
2015-06-09 10:15:49 PDT
Comment on
attachment 254569
[details]
Fixed typo View in context:
https://bugs.webkit.org/attachment.cgi?id=254569&action=review
>> Source/WebCore/bindings/js/ReadableJSStream.cpp:108 >> + ExecState& exec= *globalObject()->globalExec(); > > Missing space here before before the "=" sign. Also, lately I have been thinking we should start using “state” as the name for this rather then “exec”.
OK
>> Source/WebCore/bindings/js/ReadableJSStream.cpp:153 >> +bool ReadableJSStream::checkForException(JSC::ExecState& exec) > > I don’t think the name for this is exactly right; this does more than just “check for” an exception. It moves the exception from the execution state to the stream object. It’s a lot like “store error” in fact. I think maybe the storeError that doesn’t take an argument should just do this if there’s an exception in the exception state. > > I also think the idea of having this function do the hadException boolean check is so great. If the caller needs to distinguish that case, I think checking hadException at the call site makes no sense.
Initially, I did a first version doing everything in storeError(). The issue is that storeError() will always store an error, even if none is provided, in case of "controller.error()" for instance. We would need to do twice a exec.hadException() check if doing everything in storeError(). I plan to rewrite this using "void ReadableJSStream::storeException(ExecState&)" in lieu of checkForException. Please let me know if you have any better idea.
youenn fablet
Comment 6
2015-06-09 12:44:10 PDT
Created
attachment 254590
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2015-06-10 01:11:00 PDT
Comment on
attachment 254590
[details]
Patch for landing Clearing flags on attachment: 254590 Committed
r185406
: <
http://trac.webkit.org/changeset/185406
>
WebKit Commit Bot
Comment 8
2015-06-10 01:11:05 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.
Top of Page
Format For Printing
XML
Clone This Bug