Re: [streams] Reader fixups (#262)

> @@ -558,8 +558,13 @@ Instances of <code>ReadableStream</code> are created with the internal slots des
>  </div>
>  
>  <ol>
> -  <li> If <b>this</b>@\[[reader]] is not <b>undefined</b>, return <b>this</b>@\[[reader]]@\[[lockReleased]].
> -  <li> Return <b>this</b>@\[[readyPromise]].
> +  <li> If <b>this</b>@\[[readableStreamReader]] is not <b>undefined</b>, return the result of transforming
> +    <b>this</b>@\[[readableStreamReader]]@\[[lockReleased]] by a fulfillment handler that returns <b>this</b>@\[[readyPromise]].

Shouldn't this@[[readyPromise]] be Get(this, "ready")?
The current rule exposes the resolution that should be hidden in the following sequence.

1. The stream is locked to a reader.
1. `.ready` is accessed and some handlers are attached on it.
1. The reader is released.
1. The stream is locked to another reader.
1. Data is enqueued and stream@[[readyPromise]] is resolved.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/262/files#r22990833

Received on Thursday, 15 January 2015 05:10:45 UTC