Page MenuHomePhabricator

ecore: fix built-in event types generation

Authored by jayji on Aug 22 2018, 11:17 AM.



Ecore internally uses 10 events, from ECORE_EVENT_SIGNAL_USER=1 to
singleton that holds the counter of events is initialized with -1.
This is followed in _ecore_event_init() by ten calls to
ecore_event_message_handler_type_new(), which increase the counter of
event by one each.

This results in an event counter to be 9 (-1 + 10) at the end of the
initialization of ecore_events. This means that the next event to be
created will have a value of 10, which will overlap with
ECORE_EVENT_SYSTEM_TIMEDATE_CHANGED. As such, these two distinct events
will be aliased and their associated handlers will be called at
unexpected times, with unexpected data.

By changing the constructor value from -1 to 0, we prevent this event

Fixes T6605

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
jayji created this revision.Aug 22 2018, 11:17 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

jayji requested review of this revision.Aug 22 2018, 11:17 AM
Hermet accepted this revision.Aug 26 2018, 8:02 PM
This revision is now accepted and ready to land.Aug 26 2018, 8:02 PM
This revision was automatically updated to reflect the committed changes.