Bug 193328

Summary: Bindings generator emits incorrect code when using VoidCallback as an IDL dictionary attribute
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: BindingsAssignee: Wenson Hsieh <wenson_hsieh>
Severity: Normal CC: bdakin, cdumez, commit-queue, esprehn+autocc, ews-watchlist, kondapallykalyan, rniwa, thorton, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 193109    
Description Flags
Patch none

Description Wenson Hsieh 2019-01-10 11:21:57 PST
For instance, this IDL:

    dictionary Foo {
        required VoidCallback bar;

...generates this code in the corresponding implementation of convertDictionary:

    if (!barValue.isUndefined()) {
        result.bar = convert<IDLCallbackFunction<JSVoidCallback>>(state, barValue, );
        RETURN_IF_EXCEPTION(throwScope, { });
    } else {
        throwRequiredMemberTypeError(state, throwScope, "bar", "FooInit", "VoidCallback");
        return { };

...which (of course) fails to compile.
Comment 1 Wenson Hsieh 2019-01-10 12:01:40 PST
Created attachment 358816 [details]
Comment 2 WebKit Commit Bot 2019-01-10 13:46:39 PST
Comment on attachment 358816 [details]

Clearing flags on attachment: 358816

Committed r239842: <https://trac.webkit.org/changeset/239842>
Comment 3 WebKit Commit Bot 2019-01-10 13:46:41 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-01-10 13:47:29 PST