evas: we should be able to access this data during an object being destroyed.

So, this is maybe not the best fix. The question is should we be able to
get efl_data_scope_safe_get return the object private data, when we are
currently executing the object EFL_EVENT_DEL callbacks. Right now we don't
and this lead to bug where we wouldn't have been able to destroy a callback
and get that callback triggered later on destroyed data (I had a crash in
terminology). I have switched back to the not _safe_ version which doesn't
enforce this, but that might not be the only place that need a fix.
This commit is contained in:
Cedric Bail 2017-08-11 10:15:14 -07:00
parent c358ac0222
commit 207cab086f
1 changed files with 4 additions and 4 deletions

View File

@ -485,7 +485,7 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
EAPI void *
evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
{
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Event_Cb_Wrapper_Info *info;
if (!obj) return NULL;
@ -512,7 +512,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
EAPI void *
evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
{
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Event_Cb_Wrapper_Info *info;
if (!obj) return NULL;
@ -568,7 +568,7 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
EAPI void *
evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
{
Evas_Public_Data *e = efl_data_scope_safe_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Event_Cb_Wrapper_Info *info;
if (!e) return NULL;
@ -595,7 +595,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
EAPI void *
evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
{
Evas_Public_Data *e = efl_data_scope_safe_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Event_Cb_Wrapper_Info *info;
if (!e) return NULL;