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

Deal with realms? #9

Closed
domenic opened this issue Jan 28, 2014 · 6 comments
Closed

Deal with realms? #9

domenic opened this issue Jan 28, 2014 · 6 comments

Comments

@domenic
Copy link
Member

domenic commented Jan 28, 2014

@bzbarsky had some good feedback on specifying the realms in which various operations run:

One issue I just realized, as I was considering how to implement some of this stuff in automated ways. All the terms in the "Creating Promises"
are implicitly assuming operation in a particular realm. Same for the ones in "Aggregating Promises" and the definition of "Transforming p with onFulfilled and onRejected". Same thing for the "Promise Arguments Should Be Cast" guidance.

They need to either explicitly specify which realm is used somehow or all consumers (that is, specs using this terminology) need to do it.

This is particularly relevant when functions from one realm are invoked on a this object or arguments from another realm (and possible from multiple other realms); the algorithm defining the behavior of the function may need to think carefully about what realms are used for which operations in that situation...

As per the follow-ups in the thread, this might not be promise-specific, but it's possibly something this guide could handle in its shorthand definitions.

@domenic
Copy link
Member Author

domenic commented May 22, 2014

This is out of scope. domenic/promises-unwrapping#108 is starting to make progress on these issues, but it is a normative specification-level thing between the ES and HTML specs, and not something for the guide.

@domenic domenic closed this as completed May 22, 2014
@bzbarsky
Copy link

Actually, the issues in domenic/promises-unwrapping#108 are a bit separate. Those are about incumbent and entry globals, but this issue is about object creation and realms, which is unrelated to incumbent/entry globals.

@domenic
Copy link
Member Author

domenic commented May 22, 2014

Ah, you're totally right; I should have re-read my own post. Reopening.

@domenic domenic reopened this May 22, 2014
@annevk
Copy link
Member

annevk commented May 22, 2014

@domenic
Copy link
Member Author

domenic commented Jun 25, 2014

@bzbarsky
Copy link

bzbarsky commented Jul 1, 2014

@domenic That looks good, thanks!

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

No branches or pull requests

3 participants