Revert "e_comp_object: fix dangling pointer of content object" 65/278365/1 accepted/tizen/unified/20220721.135044 submit/tizen/20220719.232114
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 19 Jul 2022 11:28:40 +0000 (20:28 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Tue, 19 Jul 2022 23:06:02 +0000 (08:06 +0900)
This reverts commit 3c67afdbf5ece121e974e140186d584deba4761c.

Change-Id: I6fda62a65f74842278df54540959213de4b507f5

src/bin/e_comp_object.c
src/bin/e_policy_wl.c

index 3e3d3f6d79c4e01ffa83ae7f99e62cd9b05fea4b..42cbd8fe3b05eb302330465c28e4ce614d1aec30 100644 (file)
@@ -3389,10 +3389,7 @@ _e_comp_smart_del(Evas_Object *obj)
    evas_object_del(cw->frame_object);
    evas_object_del(cw->zoomobj);
    evas_object_del(cw->input_obj);
-   if (cw->content_type == E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE)
-     evas_object_del(cw->obj);
-   else
-     evas_object_unref(cw->obj);
+   evas_object_del(cw->obj);
    evas_object_del(cw->mask.obj);
    if (cw->dim.mask_obj) evas_object_del(cw->dim.mask_obj);
    evas_object_del(cw->transform_bg_obj);
@@ -5870,7 +5867,6 @@ e_comp_object_content_set(Evas_Object *obj,
 
    cw->external_content = EINA_TRUE;
 
-   evas_object_ref(content);
    cw->obj = content;
    cw->content_type = type;
    e_util_size_debug_set(cw->obj, 1);
@@ -5909,8 +5905,8 @@ e_comp_object_content_unset(Evas_Object *obj)
         else if (cw->shobj)
           edje_object_part_unswallow(cw->shobj, cw->obj);
 
+        evas_object_del(cw->obj);
         evas_object_hide(cw->obj);
-        evas_object_unref(cw->obj);
         cw->obj = NULL;
      }
 
index 8ea2dd8647394f0c3b2f0421400f4faa9ddf11d3..236a739d3bb759432f15942f391491221fcd81dd 100644 (file)
@@ -6150,7 +6150,7 @@ _launch_splash_off(E_Policy_Wl_Tzlaunch_Splash *tzlaunch_splash)
      }
 
    if (obj)
-     evas_object_del(obj);
+     evas_object_unref(obj);
 
    tzlaunch_splash->ep = NULL;
    tzlaunch_splash->replaced = EINA_FALSE;
@@ -6372,8 +6372,11 @@ _launchscreen_splash_setup(E_Policy_Wl_Tzlaunch_Splash *splash,
         splash->indicator_obj = indicator_obj;
      }
 
+   //ref splash object
    if (splash->obj)
      {
+        evas_object_ref(splash->obj);
+
         evas_object_event_callback_add(splash->obj,
                                        EVAS_CALLBACK_DEL,
                                        _launchscreen_splash_cb_del, splash);
@@ -6488,8 +6491,6 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
                    new_ec,
                    old_ec, new_ec, tzlaunch_splash->obj);
 
-             e_comp_object_content_unset(old_ec->frame);
-
              if (tzlaunch_splash->indicator_obj)
                {
                   e_mod_indicator_owner_set(new_ec);