Bug 193328 - Bindings generator emits incorrect code when using VoidCallback as an IDL dictionary attribute
Summary: Bindings generator emits incorrect code when using VoidCallback as an IDL dic...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks: 193109
  Show dependency treegraph
 
Reported: 2019-01-10 11:21 PST by Wenson Hsieh
Modified: 2019-01-10 13:47 PST (History)
10 users (show)

See Also:


Attachments
Patch (5.01 KB, patch)
2019-01-10 12:01 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Patch
Comment 2 WebKit Commit Bot 2019-01-10 13:46:39 PST
Comment on attachment 358816 [details]
Patch

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
<rdar://problem/47189164>