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

Tight coupling between JS engine and browser engine #263

Closed
KiChjang opened this issue Mar 24, 2016 · 6 comments
Closed

Tight coupling between JS engine and browser engine #263

KiChjang opened this issue Mar 24, 2016 · 6 comments

Comments

@KiChjang
Copy link
Member

As it stands right now, the Fetch spec specifies that the bodies of both the Request and Response to have a ReadableStream object associated with it, which, if my spec reading is correct, is a JavaScript engine object, due to the existence of internal slots.

This overlaps the responsibilities of the JS engine and the browser engine - the JS engine depends on the browser engine to implement the Fetch spec, and the browser engine depends on the JS engine to implement the concept of a ReadableStream. I believe the ideal case would be to make it so that the fetch implementation is completely self-contained, i.e. only the browser engine should need to bear responsibility in handling network fetches.

@annevk
Copy link
Member

annevk commented Mar 24, 2016

Paging @yutakahirano and @domenic for thoughts. I'm not entirely sure this matters much. As long as what you implement is observably the same it does not really matter. I guess you're asking for some separation between "JS streams" and "IDL/internal streams", which the streams folks haven't been super interested in providing.

@domenic
Copy link
Member

domenic commented Mar 24, 2016

The Streams spec specifies itself in the style of ECMAScript, but makes no judgment as to whether you implement it in the JS engine or in the browser engine as long as the behavior is observably equivalent. In Chrome, we implement it in Blink, using a feature called V8 extras. We used to implement it in C++ using Blink's normal mechanisms.

@yutakahirano
Copy link
Member

We are using promises which comes from ES6 in many APIs.

@annevk
Copy link
Member

annevk commented Mar 25, 2016

@domenic I think the concern is about defining user agent internal streams in terms of the Streams Standard. But I don't really see that being a big problem personally.

@annevk
Copy link
Member

annevk commented May 4, 2016

@KiChjang I'm inclined to close this. Any further thoughts on the matter?

@KiChjang
Copy link
Member Author

KiChjang commented May 5, 2016

It looks like my question has been answered; @domenic stated that it is up to the browser's implementation when it comes to process isolation. Thanks!

@KiChjang KiChjang closed this as completed May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants