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

"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

@domenic
Copy link
Member

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
Copy link
Collaborator

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
Copy link
Member

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

@bzbarsky
Copy link
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
Labels
None yet
Development

No branches or pull requests

3 participants