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

Is [AllowShared] an applicable-to-types attribute? #687

Closed
peria opened this issue Mar 15, 2019 · 4 comments · Fixed by #695
Closed

Is [AllowShared] an applicable-to-types attribute? #687

peria opened this issue Mar 15, 2019 · 4 comments · Fixed by #695

Comments

@peria
Copy link
Contributor

peria commented Mar 15, 2019

The section of annotated types has an explicit list of applicable-to-types, as [Clamp], [EnforceRange], and [TreatNullAs].

Beside it, in the section of [AllowShared], it says

If the [AllowShared] extended attribute appears on one of the buffer source types, it creates a new IDL type

it seems to say [AllowShared] is an applicable-to-types. Is it correct? And do we need the explicit list of applicable-to-type ones?

@annevk
Copy link
Member

annevk commented Mar 15, 2019

The link "annotated types" in OP should probably go to https://heycam.github.io/webidl/#idl-annotated-types. In any case, I think you've found an error and [AllowShared] should be in that list.

@peria
Copy link
Contributor Author

peria commented Mar 15, 2019

Oops. Yes. I fixed the link.

If the list of applicable to types has [AllowShared], it answers my questions,
But I still wonder if it needs the explict list.

@annevk
Copy link
Member

annevk commented Mar 15, 2019

I haven't really done a deep dive, but it seems you need this list for step 4 and 5 of https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with as well as the requirement directly after this algorithm. Do see a way to address that in some other way?

@peria
Copy link
Contributor Author

peria commented Mar 15, 2019

IMO, it's enough if the section of each applicable-to-types extended attribute mentions that the attribute is applicable to types.
Unless any specific attribute is required in the algorith description, we don't need a whitelist.

annevk pushed a commit that referenced this issue Apr 4, 2019
Annotated types lists 3 extended attributes as applicable-to-type attributes, and [AllowShared] is not in the list. On the other hand, [AllowShared] is explained to appear on one of the buffer source type, and it means [AllowShared] is applicable to types.

This adds [AllowShared] in the list of applicable to types extended attributes, so that it fixes the ambiguity.

Fixes #687.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants