Bug 145551 - [Streams API] ReadableStreamReader::closed() should be called once by binding code
Summary: [Streams API] ReadableStreamReader::closed() should be called once by binding...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 02:07 PDT by youenn fablet
Modified: 2015-06-03 00:35 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.04 KB, patch)
2015-06-02 02:10 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (1.98 KB, patch)
2015-06-02 23:39 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.