CfxGenerator - Duplicate event handler names

Issue #180 resolved
Geevo
created an issue

Hi,

I've attempted to generate the latest Cef available, however the generator seems to have snagged with two handlers using the same name but appear to use different signatures in the header files as both are trying to claim the CfxCanSetCookie handler name

cef\include\capi\cef_request_handler_capi.h

  int(CEF_CALLBACK* can_set_cookie)(struct _cef_request_handler_t* self,
                                    struct _cef_browser_t* browser,
                                    struct _cef_frame_t* frame,
                                    struct _cef_request_t* request,
                                    const struct _cef_cookie_t* cookie);

cef\include\capi\cef_resource_handler_capi.h

  int(CEF_CALLBACK* can_set_cookie)(struct _cef_resource_handler_t* self,
                                    const struct _cef_cookie_t* cookie);

I've had a quick look as i'm not entirely sure what changes to make with dealing with duplicates.

Any chance you could have have a quick look?

Thanks

Geevo

Comments (4)

  1. wborgsm

    Hi,

    Didn't look at the code yet, but IIRC when 2 handlers use the same name but different signatures, the generator should concatenate the class names with the handler names, CfxRequestHandlerCanSetCookie and CfxResourceHandlerCanSetCookie. Tomorrow I am going to fix this and push an update to the most recent CEF binaries.

  2. wborgsm

    Well, that concatenation algorithm wasn't implemented yet, just did it manually for some special cases. With commit f3252fe I implemented the generalized algorithm which resolved this issue and hopefully similar name collisions in the future as well.

    BTW there was another issue with the use of enum members which I generalized as well, so I hope the generator tool will now work smoothly for the next few CEF updates. If not, I am committed to fix the generator tool ASAP when it fails to generate files for a new CEF version, so don't hesitate to post an issue whenever that happens.

  3. wborgsm

    Thanks. Actually I once had a donation link in the readme. It's buried somewhere in the commit history :) but don’t bother – I take a virtual beer from here, cheers!

  4. Log in to comment