Bug 145551

Summary: [Streams API] ReadableStreamReader::closed() should be called once by binding code
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description youenn fablet 2015-06-02 02:07:29 PDT
ReadableStreamReader.closed JS attribute is just an accessor to the promise.
We should only call ReadableStreamReader::closed() when we create the actual promise to set the callbacks properly.
Comment 1 youenn fablet 2015-06-02 02:10:05 PDT
Created attachment 254061 [details]
Patch
Comment 2 Darin Adler 2015-06-02 11:28:47 PDT
Comment on attachment 254061 [details]
Patch

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

> Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp:70
> +        return m_closedPromiseDeferred.get()->promise();

Is the call to .get() really needed?
Comment 3 youenn fablet 2015-06-02 23:39:15 PDT
Created attachment 254158 [details]
Patch for landing
Comment 4 youenn fablet 2015-06-02 23:40:52 PDT
Thanks for the review.

> > Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp:70
> > +        return m_closedPromiseDeferred.get()->promise();
> 
> Is the call to .get() really needed?

Right, I removed it in the landing patch.
Comment 5 WebKit Commit Bot 2015-06-03 00:35:28 PDT
Comment on attachment 254158 [details]
Patch for landing

Clearing flags on attachment: 254158

Committed r185149: <http://trac.webkit.org/changeset/185149>
Comment 6 WebKit Commit Bot 2015-06-03 00:35:32 PDT
All reviewed patches have been landed.  Closing bug.