WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146408
[Streams API] Finish pulling must always be done asynchronously as it is the expected promise behavior (according to the spec)
https://bugs.webkit.org/show_bug.cgi?id=146408
Summary
[Streams API] Finish pulling must always be done asynchronously as it is the ...
Xabier Rodríguez Calvar
Reported
2015-06-29 05:39:19 PDT
[Streams API] Fix readable-stream pull test
Attachments
Patch
(3.76 KB, patch)
2015-06-29 05:42 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(3.72 KB, patch)
2015-06-29 11:03 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch for landing
(3.86 KB, patch)
2015-06-30 02:29 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Xabier Rodríguez Calvar
Comment 1
2015-06-29 05:42:47 PDT
Created
attachment 255745
[details]
Patch Add a delay to simulate the promise resolution
youenn fablet
Comment 2
2015-06-29 06:57:05 PDT
Comment on
attachment 255745
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255745&action=review
> Source/WebCore/Modules/streams/ReadableStream.cpp:142 > + finishPulling();
Sounds good to me. I wonder whether this is necessary for native sources though. The same principle might be useful for doCancel as well if that is observable. Not sure the comment is needed.
Darin Adler
Comment 3
2015-06-29 10:16:00 PDT
Comment on
attachment 255745
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255745&action=review
> Source/WebCore/Modules/streams/ReadableStream.cpp:139 > + // We need to post the task to simulate the delay in promise resolution.
I agree that this comment isn’t really all that helpful.
> Source/WebCore/Modules/streams/ReadableStream.cpp:140 > + RefPtr<ReadableStream> protectedStream(this);
Wait, this is not right. To have this RefPtr do any good we need to capture protectedStream, not this.
Xabier Rodríguez Calvar
Comment 4
2015-06-29 11:03:29 PDT
Created
attachment 255760
[details]
Patch Honored comments in bugzilla
Xabier Rodríguez Calvar
Comment 5
2015-06-29 11:04:42 PDT
(In reply to
comment #3
)
> > Source/WebCore/Modules/streams/ReadableStream.cpp:139 > > + // We need to post the task to simulate the delay in promise resolution. > > I agree that this comment isn’t really all that helpful.
I think the comment is helpful, otherwise when reading the code people might think that there is no good reason to do that.
> > Source/WebCore/Modules/streams/ReadableStream.cpp:140 > > + RefPtr<ReadableStream> protectedStream(this); > > Wait, this is not right. To have this RefPtr do any good we need to capture > protectedStream, not this.
Good catch, done.
youenn fablet
Comment 6
2015-06-29 11:11:48 PDT
Related to the comment, would changing the name of the bug (and the change log) be sufficient as some lightweight documentation means? Something like: "[Streams API] Finish pulling must always be done asynchronously"?
Xabier Rodríguez Calvar
Comment 7
2015-06-29 15:11:52 PDT
(In reply to
comment #6
)
> Related to the comment, would changing the name of the bug (and the change > log) be sufficient as some lightweight documentation means? > Something like: "[Streams API] Finish pulling must always be done > asynchronously"?
That can work, I could do that in the landing latch if Darin gives the r+
Xabier Rodríguez Calvar
Comment 8
2015-06-30 02:29:25 PDT
Created
attachment 255816
[details]
Patch for landing
WebKit Commit Bot
Comment 9
2015-06-30 02:54:36 PDT
Comment on
attachment 255816
[details]
Patch for landing Clearing flags on attachment: 255816 Committed
r186113
: <
http://trac.webkit.org/changeset/186113
>
WebKit Commit Bot
Comment 10
2015-06-30 02:54:40 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