Skip to content

Missing values for Report in dictionary #286

@TimvdLippe

Description

@TimvdLippe

With the recently introduced dictionary, there are a couple of values in Report missing, for example attempts and timestamp. Additionally, the body is marked as optional with ?, which doesn't compile with WebIDL:

  --- stderr
  Traceback (most recent call last):
    File "/home/tvanderlippe/Projects/servo/components/script_bindings/codegen/run.py", line 168, in <module>
      main()
    File "/home/tvanderlippe/Projects/servo/components/script_bindings/codegen/run.py", line 48, in main
      parser_results = parser.finish()
                       ^^^^^^^^^^^^^^^
    File "/home/tvanderlippe/Projects/servo/third_party/WebIDL/WebIDL.py", line 9436, in finish
      production.validate()
    File "/home/tvanderlippe/Projects/servo/third_party/WebIDL/WebIDL.py", line 2402, in validate
      raise WebIDLError(
  WebIDL.WebIDLError: error: Dictionary Report has member with nullable dictionary type, /home/tvanderlippe/Projects/servo/components/script_bindings/codegen/../webidls/ReportingObserver.webidl line 13:14
    ReportBody? body;
                ^
warning: build failed, waiting for other jobs to finish...

For now, in Servo I am working with the following dictionary, but let me know if this is not as intended?

dictionary Report {
  required DOMString type;
  required DOMString url;
  required DOMString destination;
  required double timestamp;
  required long attempts;
  ReportBody body;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions