ecore: check eina_main_loop before lock.

Summary:
 - EINA_MAIN_LOOP_CHECK_RETURN should be called before ecore lock
   because this may return without ecore_unlock.
 - remove EINA_UNLIKELY(!eina_main_loop_is()) which is redundant.

Reviewers: jpeg, jaehwan, cedric, raster

Reviewed By: raster

Subscribers: raster, conr2d, cedric, jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3541

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Sung-Taek Hong 2016-01-14 14:23:03 -08:00 committed by Cedric BAIL
parent 943f2df006
commit 5e53e4b7e1
1 changed files with 2 additions and 6 deletions

View File

@ -44,13 +44,9 @@ ecore_idle_exiter_add(Ecore_Task_Cb func,
EOLIAN static void
_ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_Cb func, const void *data)
{
EINA_MAIN_LOOP_CHECK_RETURN;
_ecore_lock();
if (EINA_UNLIKELY(!eina_main_loop_is()))
{
EINA_MAIN_LOOP_CHECK_RETURN;
}
ie->obj = obj;
eo_manual_free_set(obj, EINA_TRUE);