Skip to content

Conversation

@saschanaz
Copy link
Member

This patch closes #746 and includes:

  • A relevant test
  • A relevant documentation update

@saschanaz saschanaz requested a review from marcoscaceres June 22, 2023 13:33
if (this.idlType === "BufferSource") {
// XXX: For now this is a hack. Consider moving parents' extAttrs into types as the spec says:
// https://webidl.spec.whatwg.org/#idl-annotated-types
for (const extAttrs of [this.extAttrs, this.parent?.extAttrs]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be [this.extAttrs, this.parent?.extAttrs].flat() to avoid the second for loop?

Copy link
Member

@marcoscaceres marcoscaceres Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, maybe also... to flatten to code a little more:

for (const extAttr of [this.extAttrs, this.parent?.extAttrs].flat()) {
   if (extAttr.name !== "AllowShared") continue;
   // the rest... 
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way the autofix won't know which array includes the attr and it'll need to rescan 😬

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a style nit.

@saschanaz saschanaz merged commit 164675c into main Jun 26, 2023
@saschanaz saschanaz deleted the allowshared branch June 26, 2023 11:55
pyoor added a commit to pyoor/gecko-webidl that referenced this pull request Jul 5, 2023
Since w3c/webidl2.js#747, webidl2 treats
SharedArrayBuffer as an inline type which breaks parsing of gecko IDLs.
saschanaz pushed a commit to mozilla/gecko-webidl that referenced this pull request Jul 11, 2023
Since w3c/webidl2.js#747, webidl2 treats
SharedArrayBuffer as an inline type which breaks parsing of gecko IDLs.
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

Successfully merging this pull request may close these issues.

Give SharedArrayBuffer a dedicated type

3 participants