Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Body locking with ExclusiveStreamReader. #21

Merged
merged 1 commit into from
Mar 26, 2015

Conversation

yutakahirano
Copy link
Owner

Use 'passed flag' instead of 'used flag' as discussed
at w3c/ServiceWorker#452.

@yutakahirano
Copy link
Owner Author

@tyoshino Can you take a look at this PR?

Each [chunk] (https://streams.spec.whatwg.org/#model) in an associated readable stream must be an ArrayBuffer.

The body attribute's getter must return the associated readable stream.
The __bodyUsed__ attribute's getter must return true if one of the following meets and false otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meet -> is met
or
is satisfied

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@yutakahirano yutakahirano force-pushed the exclusive-reader branch 3 times, most recently from d61d9a4 to 8992cf2 Compare March 26, 2015 04:33
@yutakahirano
Copy link
Owner Author

@tyoshino, I updated the PR to reflect recent ReadablStream API changes. PTAL.
(I will update the example section separately).

1. Return _stream_.

To construct a fixed ReadableStream with given _bytes_, run these steps.
To construct a fixed ReadableByteStream with given _chunks_, run these steps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about emphasizing the term we're defining here using bold?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

1. A new step is added after Step 21.
- Otherwise, set _r_'s readable stream to the result of constructing a fixed ReadableStream with empty bytes. Rethrow any exceptions.
1. Step 2 is modified as follows.
- If _input_ is a Request object and input's body is non-null, run these substeps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tyoshino
Copy link
Contributor

lgtm a7dab8c

@yutakahirano
Copy link
Owner Author

Thanks!

This change also reflects recent Streams API changes.
@yutakahirano yutakahirano merged commit af2a0a0 into master Mar 26, 2015
@yutakahirano yutakahirano deleted the exclusive-reader branch March 30, 2015 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants