Closed Bug 1562680 Opened 4 months ago Closed 4 months ago

Implement the new syntax (= {}) for dictionary defaulting

Categories

(Core :: DOM: Bindings (WebIDL), enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

See https://github.com/heycam/webidl/pull/750

This implements two things:

  1. A syntax for specifying "default dictionary" using {}.
  2. The requirement that trailing optional dictionaries be thus specified.

= {} can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

Bugbug thinks this bug is a enhancement, but please change it back in case of error.

Type: defect → enhancement
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12653dd76667
Implement the new syntax for Web IDL dictionary defaulting.  r=peterv

Backed out changeset 12653dd76667 for causing bustages in FuzzingFunctions.webidl

Backout link: https://hg.mozilla.org/integration/autoland/rev/ea1bdf131082f9a8a2fd96282f70896632e62a58

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=12653dd76667080596c6d71f01d4bc6457bb4527&searchStr=build&selectedJob=254552202

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=254552202&repo=autoland&lineNumber=3699

[task 2019-07-03T06:38:43.296Z] 06:38:43 INFO - WebIDL.WebIDLError: error: Dictionary argument without any required fields or union argument containing such dictionary not followed by a required argument must have a default value, /builds/worker/workspace/build/src/dom/webidl/FuzzingFunctions.webidl line 111:66
[task 2019-07-03T06:38:43.296Z] 06:38:43 INFO - optional KeyboardEventInit aDictionary);
[task 2019-07-03T06:38:43.296Z] 06:38:43 INFO - ^
[task 2019-07-03T06:38:43.296Z] 06:38:43 INFO - Makefile:55: recipe for target 'webidl.stub' failed
[task 2019-07-03T06:38:43.296Z] 06:38:43 ERROR - make[4]: *** [webidl.stub] Error 1

Flags: needinfo?(bzbarsky)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8e16f13a88c8
Implement the new syntax for Web IDL dictionary defaulting.  r=peterv

Looks like the fuzzing builds include the extra FuzzingFunctions file that nothing else builds...

Flags: needinfo?(bzbarsky)
Backout by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6430800a95e1
Backed out changeset 8e16f13a88c8 for colliding with Bug 1366738 that was backed out. CLOSED TREE

Somehow when backing out Bug 1366738 we didn't have hunked fail

That's because that bug removed some code that this bug would have needed to change had that code still been around.

That said, looks like bug 1366738 has been re-landed, so this should just re-land too.

Flags: needinfo?(bzbarsky)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59c08b215af5
Implement the new syntax for Web IDL dictionary defaulting.  r=peterv
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.