Closed Bug 1507943 Opened 6 years ago Closed 6 years ago

ReadableStream constructor handling of "pull" and "cancel" methods

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The spec says we should GetV the "pull" and "cancel" properties of the underlyingSource object only once, under the ReadableStream constructor, and the constructor should throw if either value isn't either callable or undefined. https://streams.spec.whatwg.org/#rs-constructor -> https://streams.spec.whatwg.org/#set-up-readable-stream-default-controller-from-underlying-source -> https://streams.spec.whatwg.org/#create-algorithm-from-underlying-method Currently we do none of this in the constructor, and we Get these properties like any other JS method call, each time we need to call them. This causes test failures in several wpt-tests: testing/web-platform/tests/streams/readable-streams/ bad-underlying-sources*.html constructor*.html general*.html
Assignee: nobody → jorendorff
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/345ad3e746e8 Fix ReadableStream constructor handling of "pull" and "cancel" methods. r=arai
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/efcada818361 Fix ReadableStream constructor handling of "pull" and "cancel" methods. r=arai
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: