Bug 215514

Summary: [WebIDL] 'void' type is changing to 'undefined'
Product: WebKit Reporter: Tab Atkins Jr. <jackalmage>
Component: BindingsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, benjamin, calvaris, cdumez, changseok, cmarcelo, cyb.ai.815, darin, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, glenn, graouts, gyuyoung.kim, hi, hta, japhet, jer.noble, jiewen_tan, joepeck, jsbell, kangil.han, kondapallykalyan, macpherson, menard, mifenton, mmaxfield, pdr, philipj, sabouhallawa, sam, schenney, sergio, tommyw, toyoshim, webkit-bug-importer, youennf, yutak
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=215652
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Tab Atkins Jr. 2020-08-14 10:45:51 PDT
As part of efforts to finally add an 'undefined' type to WebIDL (so methods/etc don't have to generalize their type to 'any'), it was decided to actually add 'undefined' as the type name, and so the previous function return signature 'void' is being removed for redundancy.

See https://github.com/heycam/webidl/pull/906 for details on the change.

This change will be merged shortly; this bug is a heads-up to adjust your IDL parser (see the PR for the changes to the grammar; it's quite small). You may wish to have a transitional period where you recognize 'void' and 'undefined' as synonyms, as specifications are moved over to the new syntax.
Comment 1 Sam Weinig 2020-08-19 12:03:09 PDT
*** Bug 215652 has been marked as a duplicate of this bug. ***
Comment 2 Radar WebKit Bug Importer 2020-08-21 10:46:13 PDT
<rdar://problem/67566201>
Comment 3 Sam Weinig 2020-08-28 10:36:48 PDT
Created attachment 407481 [details]
Patch
Comment 4 Darin Adler 2020-08-28 10:42:25 PDT
Comment on attachment 407481 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407481&action=review

> Source/WebCore/ChangeLog:10
> +        Also updates the parser to better match current WebIDl grammar, removing the special 

WebIDL

> Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp:200
> -    using KeyType = void;
> +    using KeyType = undefined;

Looks like this change in expected results is wrong.

> Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp:388
> -    using KeyType = void;
> +    using KeyType = undefined;

Ditto.
Comment 5 Sam Weinig 2020-08-28 10:45:07 PDT
(In reply to Darin Adler from comment #4)
> Comment on attachment 407481 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=407481&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        Also updates the parser to better match current WebIDl grammar, removing the special 
> 
> WebIDL

Fixing.

> 
> > Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp:200
> > -    using KeyType = void;
> > +    using KeyType = undefined;
> 
> Looks like this change in expected results is wrong.
> 
> > Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp:388
> > -    using KeyType = void;
> > +    using KeyType = undefined;
> 
> Ditto.

Oh, yeah, didn't run run-bindings-test --reset-results after I fixed that. Fixing.
Comment 6 Sam Weinig 2020-08-28 10:49:46 PDT
Created attachment 407484 [details]
Patch
Comment 7 EWS 2020-08-28 15:05:01 PDT
Tools/Scripts/svn-apply failed to apply attachment 407484 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 8 Sam Weinig 2020-08-28 15:24:05 PDT
Created attachment 407507 [details]
Patch
Comment 9 EWS 2020-08-28 16:05:00 PDT
Committed r266311: <https://trac.webkit.org/changeset/266311>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407507 [details].