forked from enlightenment/efl
edje_cc: cleanup queued jobs for removed program
Summary: When a new edje program is created, some jobs like lookup part (Part_Lookup) or compiling embryo script (Code_Program) are queued. If program is removed, queued jobs should be removed also. Reviewers: jpeg, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3900 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
parent
0413c26f82
commit
5bb39ed43d
|
@ -1814,6 +1814,8 @@ _edje_program_check(const char *name, Edje_Program *me, Edje_Program **pgrms, un
|
|||
{
|
||||
_edje_program_remove(pc, me);
|
||||
current_program = pgrms[i];
|
||||
if (pgrms[i]->action == EDJE_ACTION_TYPE_SCRIPT)
|
||||
copied_program_anonymous_lookup_delete(pc, &pgrms[i]->id);
|
||||
epp->can_override = EINA_FALSE;
|
||||
return;
|
||||
}
|
||||
|
@ -5744,9 +5746,12 @@ st_collections_group_parts_part_inherit(void)
|
|||
static void
|
||||
_program_free(Edje_Program *pr)
|
||||
{
|
||||
Edje_Part_Collection *pc;
|
||||
Edje_Program_Target *prt;
|
||||
Edje_Program_After *pa;
|
||||
|
||||
pc = eina_list_last_data_get(edje_collections);
|
||||
|
||||
free((void*)pr->name);
|
||||
free((void*)pr->signal);
|
||||
free((void*)pr->source);
|
||||
|
@ -5757,7 +5762,10 @@ _program_free(Edje_Program *pr)
|
|||
free((void*)pr->sample_name);
|
||||
free((void*)pr->tone_name);
|
||||
EINA_LIST_FREE(pr->targets, prt)
|
||||
free(prt);
|
||||
{
|
||||
part_lookup_del(pc, &prt->id);
|
||||
free(prt);
|
||||
}
|
||||
EINA_LIST_FREE(pr->after, pa)
|
||||
free(pa);
|
||||
free(pr);
|
||||
|
|
|
@ -2945,6 +2945,25 @@ copied_program_anonymous_lookup_delete(Edje_Part_Collection *pc, int *dest)
|
|||
{
|
||||
if ((!pl->anonymous) || (pl->pc != pc) || (dest != &pl->u.ep->id)) continue;
|
||||
program_lookups = eina_list_remove_list(program_lookups, l);
|
||||
|
||||
Code *cd;
|
||||
Code_Program *cp;
|
||||
Edje_Part_Collection_Directory_Entry *de;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
de = eina_hash_find(edje_file->collection, pl->pc->part);
|
||||
cd = eina_list_nth(codes, de->id);
|
||||
|
||||
EINA_LIST_FOREACH_SAFE(cd->programs, l, ll, cp)
|
||||
{
|
||||
if (pl->dest == &cp->id)
|
||||
{
|
||||
cd->programs = eina_list_remove(cd->programs, cp);
|
||||
free(cp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
free(pl);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue