Bug 145965

Summary: [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, calvaris, commit-queue, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 145839    
Bug Blocks:    
Attachments:
Description Flags
Patch before additional tests
none
Rebasing with new tests
none
Patch for landing none

Description youenn fablet 2015-06-14 23:13:44 PDT
https://streams.spec.whatwg.org/#request-readable-stream-pull should be implemented.
Comment 1 youenn fablet 2015-06-15 10:00:10 PDT
Created attachment 254879 [details]
Patch before additional tests
Comment 2 youenn fablet 2015-06-15 23:32:53 PDT
Created attachment 254938 [details]
Rebasing with new tests
Comment 3 Darin Adler 2015-06-16 09:36:36 PDT
Comment on attachment 254938 [details]
Rebasing with new tests

View in context: https://bugs.webkit.org/attachment.cgi?id=254938&action=review

> Source/WebCore/Modules/streams/ReadableStream.h:122
> +    bool m_isPullRequested { false };

Normally we try to make these things work grammatically. I don’t understand what “readable stream is pull requested” means. So I would expect this to have some other name, like “hasRequestedPull” or whatever would be the colloquial or standards language way for talking about the state of the stream.
Comment 4 youenn fablet 2015-06-16 09:43:06 PDT
(In reply to comment #3)
> Comment on attachment 254938 [details]
> Rebasing with new tests
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=254938&action=review
> 
> > Source/WebCore/Modules/streams/ReadableStream.h:122
> > +    bool m_isPullRequested { false };
> 
> Normally we try to make these things work grammatically. I don’t understand
> what “readable stream is pull requested” means. So I would expect this to
> have some other name, like “hasRequestedPull” or whatever would be the
> colloquial or standards language way for talking about the state of the
> stream.

OK. stream spec is now using "pullAgain".
Let's call it "shouldPullAgain" then.
Comment 5 youenn fablet 2015-06-16 23:49:43 PDT
Created attachment 255003 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2015-06-17 00:46:32 PDT
Comment on attachment 255003 [details]
Patch for landing

Clearing flags on attachment: 255003

Committed r185648: <http://trac.webkit.org/changeset/185648>
Comment 7 WebKit Commit Bot 2015-06-17 00:46:38 PDT
All reviewed patches have been landed.  Closing bug.