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

Global and a ReadableStream reader when consuming the body #826

Open
bakulf opened this issue Nov 1, 2018 · 7 comments
Open

Global and a ReadableStream reader when consuming the body #826

bakulf opened this issue Nov 1, 2018 · 7 comments

Comments

@bakulf
Copy link

bakulf commented Nov 1, 2018

"Let reader be the result of getting a reader from stream. If that threw an exception, return a new promise rejected with that exception."

In which global should this reader belong to? And what about the 'promise' created by the reader when retrieving data from the ReadableStream? I guess it's the same global of the reader.

@domenic
Copy link
Member

domenic commented Nov 1, 2018

In which way is this observable?

@annevk
Copy link
Member

annevk commented Nov 1, 2018

It's not, apart from extensions perhaps. Perhaps this should say "implementation-defined realm", but perhaps it'd fall out of fixing whatwg/webidl#135?

@annevk
Copy link
Member

annevk commented Nov 1, 2018

(Also relates to #730 somewhat I suppose for the creation of the empty stream.)

@bzbarsky
Copy link

bzbarsky commented Nov 1, 2018

It's not, apart from extensions perhaps.

The Promise involved is completely unobservable?

@annevk
Copy link
Member

annevk commented Nov 1, 2018

The promise returned by the undefined "transforming" operation (hopefully IDL integrates that part of the promises guide at some point) would be exposed. Presumably that would use the global of this per yet-to-be-defined IDL shorthands.

@bzbarsky
Copy link

bzbarsky commented Nov 1, 2018

Which "this", in this case?

@annevk
Copy link
Member

annevk commented Nov 2, 2018

Of the object on which the method is declared that ends up returning the promise. As the "consume body" algorithm is some internal algorithm of that object, the this object is somewhat obvious, but perhaps we'd need to make this explicit anyway somehow depending on how promises and object creation get formalized in IDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants
@bakulf @domenic @bzbarsky @annevk and others