From a8eec5de77d7fdf99e30d20be1afb60617cff985 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Wed, 12 Jun 2013 20:20:41 +0900 Subject: [PATCH] Update finalize sequence. [model] Redwood [binary_type] AP [customer] Docomo/Orange/Open [issue#] N/A [problem] Crash while terminating process [cause] While delete evas object, it calls non-exists callback functions which are loaded from script plugin(livebox-edje) [solution] Guarantees that all objects are deleted before unloading livebox-edje plugin [team] HomeTF [request] [horizontal_expansion] Change-Id: Ie11504205a25019e61d07dcd67e547b3ce9c6840 --- packaging/liblivebox-edje.spec | 2 +- src/script_port.c | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packaging/liblivebox-edje.spec b/packaging/liblivebox-edje.spec index 8f3d142..7480574 100644 --- a/packaging/liblivebox-edje.spec +++ b/packaging/liblivebox-edje.spec @@ -1,6 +1,6 @@ Name: liblivebox-edje Summary: EDJE Script loader for the data provider master -Version: 0.5.7 +Version: 0.5.8 Release: 1 Group: HomeTF/Livebox License: Flora License diff --git a/src/script_port.c b/src/script_port.c index 38451e5..bd8d71b 100644 --- a/src/script_port.c +++ b/src/script_port.c @@ -85,9 +85,13 @@ struct obj_info { static struct { char *font_name; int font_size; + + Eina_List *handle_list; } s_info = { .font_name = NULL, .font_size = -100, + + .handle_list = NULL, }; static inline double scale_get(void) @@ -1358,6 +1362,8 @@ PUBLIC void *script_create(const char *file, const char *group) return NULL; } + s_info.handle_list = eina_list_append(s_info.handle_list, handle); + return handle; } @@ -1368,6 +1374,13 @@ PUBLIC int script_destroy(void *_handle) handle = _handle; + if (!eina_list_data_find(s_info.handle_list, handle)) { + DbgPrint("Not found (already deleted?)\n"); + return LB_STATUS_ERROR_NOT_EXIST; + } + + s_info.handle_list = eina_list_remove(s_info.handle_list, handle); + edje = eina_list_nth(handle->obj_list, 0); if (edje) evas_object_del(edje); @@ -1603,8 +1616,16 @@ PUBLIC int script_init(void) PUBLIC int script_fini(void) { int ret; + Eina_List *l; + Eina_List *n; + struct info *handle; + + EINA_LIST_FOREACH_SAFE(s_info.handle_list, l, n, handle) { + script_destroy(handle); + } + ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE); - ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE); + ret = vconf_ignore_key_changed("db/setting/accessibility/font_name", font_changed_cb); ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, access_cb); elm_shutdown(); return LB_STATUS_SUCCESS; -- 2.7.4