Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Invalid Web IDL loop between NDEFRecordInit and NDEFMessageInit #620

@rakuco

Description

@rakuco

https://heycam.github.io/webidl/#idl-dictionaries says:

The type of a dictionary member must not include the dictionary it appears on. A type includes a dictionary D if at least one of the following is true:

  1. the type is D
  2. the type is a dictionary that inherits from D
  3. the type is a nullable type whose inner type includes D
  4. the type is a sequence type or frozen array whose element type includes D
  5. the type is a union type, one of whose member types includes D
  6. the type is a dictionary, one of whose members or inherited members has a type that includes D
  7. the type is record<K, V> where V includes D

#454 introduced a case of 4, 5 and 6, as right now NDEFRecordInit.data can be an NDEFMessageInit, which is a dictionary with a sequence of NDEFRecordInits. This creates a loop that is not allowed by Web IDL and which can cause implementation issues like https://bugs.chromium.org/p/chromium/issues/detail?id=1242274

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions