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

"converting to an ECMAScript value" needs to take a realm, at least sometimes #371

Open
domenic opened this Issue Jun 21, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@domenic
Collaborator

domenic commented Jun 21, 2017

E.g. if you convert a sequence<DOMString> to an array, you need to specify the realm/global in which the conversion happens.

Related: w3ctag/promises-guide#52 (comment)

@bzbarsky

This comment has been minimized.

Collaborator

bzbarsky commented Jun 21, 2017

So for the uses in the IDL spec itself, there is always a current Realm, I believe.

But I agree, for uses from other specs something needs to happen.

@TimothyGu

This comment has been minimized.

Contributor

TimothyGu commented Dec 3, 2017

Is there a way to find out which specs call the "convert to an ECMAScript value" algorithm, other than Web IDL itself?

@bzbarsky

This comment has been minimized.

Collaborator

bzbarsky commented Dec 4, 2017

Not trivially.

You could look for specs that have object or any (or sequences thereof) return values. And specs with Promise<sequence<something>> return values. And so on....

It's not even trivial to tell from implementations, I suspect. In Gecko promises will automatically pick a global based on various criteria when you resolve them with something...

That said, a non-exhaustive list (just Promise<sequence<*>> bits, not all of which actually invoke the WebIDL algorithm) is:

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