Commit Graph

58881 Commits

Author SHA1 Message Date
Cedric BAIL 0fe3b7962d elementary: due to lifecycle difference between legacy object and unified object, we need to track their lifecycle more explicitely.
It is my understanding that some items view are created with efl_add directly
and manipulate VIEW directly with Eo new API. This clash with the inconsistent
behavior that evas_object_del expect. To work around this, we track object life
by explictely relying on efl_wref_add while holding the pointer to the object.
2018-05-24 16:02:19 -07:00
Cedric BAIL 0239099d01 eo: efl_del should not be something anyone can override this can break so many things.
Allowing override of efl_del allow for messing with object life cycle which can create
problem for binding where an object was expected to be invalidated, but isn't really.
2018-05-24 16:02:19 -07:00
Cedric BAIL 30d02a7410 evas: try to protect old legacy lifecycle without overloading Efl.Del. 2018-05-24 16:02:19 -07:00
Cedric BAIL 590304d597 eio: properly handle Eio.Model lifecycle inside Elm.Fileselector.
Differential Revision: https://phab.enlightenment.org/D6107
2018-05-24 16:02:18 -07:00
Cedric BAIL c753fc793b elementary: dayselector use efl_add to create the object, calling efl_del during destructor make no sense.
Differential Revision: https://phab.enlightenment.org/D6106
2018-05-24 16:02:18 -07:00
Cedric BAIL 1991900fd6 elementary: no need to check for part during destruction.
Differential Revision: https://phab.enlightenment.org/D6105
2018-05-24 16:02:18 -07:00
Cedric BAIL 6476896ec5 elementary: no need for resize an object during destruction.
Differential Revision: https://phab.enlightenment.org/D6104
2018-05-24 16:02:18 -07:00
Cedric BAIL 2508c1a3ae elementary: colorselector item are created with efl_add, so they are dead when they reach the destructor.
Differential Revision: https://phab.enlightenment.org/D6103
2018-05-24 16:02:18 -07:00
Cedric BAIL dbbcfa4a59 elementary: small correction in the API of Efl.Access.Object to have proper lifecycle.
This API require more review, I have just fixed API that return type that are
inconsistent over time and fail to allow for proper lifecycle of event, which
lead to crash when those event trigger at unexpected point.

Differential Revision: https://phab.enlightenment.org/D6102
2018-05-24 16:02:18 -07:00
Cedric BAIL fe14abd929 evas: refactor efl_input_event and remove some of the lifecycle hack.
Differential Revision: https://phab.enlightenment.org/D6101
2018-05-24 16:02:18 -07:00
Cedric BAIL c447b61756 eo: actually during invalidating we already have an invalidated object.
Differential Revision: https://phab.enlightenment.org/D6100
2018-05-24 16:02:18 -07:00
Cedric BAIL 4c9a33a388 eo: move EFL internal function ___efl_ref2 also to eo_internal.h
Differential Revision: https://phab.enlightenment.org/D6099
2018-05-24 16:02:18 -07:00
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Cedric BAIL c28eb28728 eo: check for allow_parent_unref during efl_unref and silence warning.
Differential Revision: https://phab.enlightenment.org/D6097
2018-05-24 16:02:18 -07:00
Cedric BAIL dcfddcd283 eo: make sure efl_noref is always called at the proper time.
Differential Revision: https://phab.enlightenment.org/D6096
2018-05-24 16:02:18 -07:00
Cedric BAIL 79e4947f3e eo: add an automatic fallback at the moment when efl_unref instead of efl_del is called.
Differential Revision: https://phab.enlightenment.org/D6095
2018-05-24 16:02:18 -07:00
Cedric Bail c1cef1e74b elementary: object created with efl_add should be destroyed with efl_del.
Differential Revision: https://phab.enlightenment.org/D6094
2018-05-24 16:02:18 -07:00
Cedric Bail 0135b23e45 elementary: object allocated with efl_add should be destroyed with efl_del.
Differential Revision: https://phab.enlightenment.org/D6093
2018-05-24 16:02:18 -07:00
Cedric Bail aaa827c2d2 eldbus: fix unref of eldbus to not throw warning all over the place.
Especially to note, that when giving a message to send, the caller
do not own it anymore and should not unref it.

Differential Revision: https://phab.enlightenment.org/D6092
2018-05-24 16:02:18 -07:00
Cedric Bail 6e078edaa9 eldbus: manage death of children during invalidate.
Differential Revision: https://phab.enlightenment.org/D6091
2018-05-24 16:02:18 -07:00
Cedric Bail 71cd44c176 eldbus: object created with efl_add should be destroyed with efl_del.
Differential Revision: https://phab.enlightenment.org/D6090
2018-05-24 16:02:18 -07:00
Cedric Bail 6bb450d7ee ecore: first invalidate the loop and its children, then destroy all the object capability.
Differential Revision: https://phab.enlightenment.org/D6089
2018-05-24 16:02:18 -07:00
Cedric BAIL 93a49da161 eo: optimize efl object reuse by limiting the amount of call to pointer translation.
Differential Revision: https://phab.enlightenment.org/D6088
2018-05-24 16:02:18 -07:00
Cedric BAIL ae5d0005d3 edje: properly handle lifecycle of edje global object.x
Differential Revision: https://phab.enlightenment.org/D6087
2018-05-24 16:02:18 -07:00
Cedric BAIL ef6cac1476 eo: prevent parenting to an already invalidated parent.
Differential Revision: https://phab.enlightenment.org/D6086
2018-05-24 16:02:18 -07:00
Cedric BAIL 546a4c79e0 eo: only call efl_parent_set(NULL) at the end of invalidate if the object is not invalidating.
Add also a comment to justify why we do force parent to NULL during invalidate.

Differential Revision: https://phab.enlightenment.org/D6085
2018-05-24 16:02:18 -07:00
Cedric BAIL 69c9d5bb50 ecore_con: correct lifecycle of object used by Efl.Net.Dialer.Ssl.
Differential Revision: https://phab.enlightenment.org/D6084
2018-05-24 16:02:18 -07:00
Cedric BAIL 594c254183 ecore_con: trigger teardown during invalidate.
Delaying teardown might result in code expecting parent to still be valid,
especially call to efl_provider_find won't work anymore.

Differential Revision: https://phab.enlightenment.org/D6083
2018-05-24 16:02:18 -07:00
Cedric BAIL e46369a569 ecore_con: it is best to call the super destructor and not touch the object anymore after.
Differential Revision: https://phab.enlightenment.org/D6082
2018-05-24 16:02:18 -07:00
Cedric BAIL 67e48c679d ecore_con: correct a typo wrongly calling super destructor instead of super invalidate.
Differential Revision: https://phab.enlightenment.org/D6081
2018-05-24 16:02:18 -07:00
Cedric BAIL 7ca25cae0f ecore: correct lifecycle of object used by Ecore_Con legacy.
Differential Revision: https://phab.enlightenment.org/D6080
2018-05-24 16:02:18 -07:00
Cedric BAIL 56fb2cf377 eo: improve error message by pointing to the class that is creating trouble.
Differential Revision: https://phab.enlightenment.org/D6079
2018-05-24 16:02:18 -07:00
Cedric BAIL bb66aa37ca eo: preventing infinite loop by safely iterating over children during destructor.
Differential Revision: https://phab.enlightenment.org/D6078
2018-05-24 16:02:18 -07:00
Cedric BAIL 93893def9f ecore: properly handle shutdown of Efl.Loop children by using invalidate.
Differential Revision: https://phab.enlightenment.org/D6077
2018-05-24 16:02:18 -07:00
Cedric BAIL 23281bc54a ecore: disable signal during shutdown.
Differential Revision: https://phab.enlightenment.org/D6076
2018-05-24 16:02:18 -07:00
Cedric BAIL 2160fe0d4d eo: invalidate at the end of efl_invalidate only and prevent infinite recursion with an invalidating phase.
Differential Revision: https://phab.enlightenment.org/D6075
2018-05-24 16:02:18 -07:00
Cedric BAIL 266dabc096 ecore: force close during invalidate of Efl.Io.Buffered_Stream.
Differential Revision: https://phab.enlightenment.org/D6074
2018-05-24 16:02:18 -07:00
Cedric BAIL 0ac6e47697 elementary: use invalidate instead of overriding del for widget items.
Differential Revision: https://phab.enlightenment.org/D6073
2018-05-24 16:02:18 -07:00
Cedric BAIL 95f8bf2ebd elementary: rely on inheritance instead of faking efl_del behavior.
Differential Revision: https://phab.enlightenment.org/D6072
2018-05-24 16:02:18 -07:00
Cedric BAIL b265c5c887 elementary: make del_pre not return a bool and force rely on Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6071
2018-05-24 16:02:18 -07:00
Cedric BAIL a669fb820a elementary: prevent death of list item using Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6070
2018-05-24 16:02:18 -07:00
Cedric BAIL ad009667b5 elementary: remove now useless walking in item.
Differential Revision: https://phab.enlightenment.org/D6069
2018-05-24 16:02:18 -07:00
Cedric BAIL 4b30a7df8e elementary: use Eo ref counting to prevent death of genlist items.
Differential Revision: https://phab.enlightenment.org/D6068
2018-05-24 16:02:18 -07:00
Cedric BAIL 2a51465593 elementary: use Eo ref counting to prevent death of gengrid items.
Differential Revision: https://phab.enlightenment.org/D6067
2018-05-24 16:02:18 -07:00
Mike Blumenkrantz 6932f0fdd6 elm_list: prevent list item operations during item deletion
ref T6880

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>

Differential Revision: https://phab.enlightenment.org/D6066
2018-05-24 16:02:17 -07:00
Mike Blumenkrantz 499beb9162 elm_list: fix crash in item deletion
this is still broken

ref T6881

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>

Differential Revision: https://phab.enlightenment.org/D6065
2018-05-24 16:02:17 -07:00
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Cedric Bail 36f8a70041 eo: to avoid mistake in timing, efl_invalidate should always be triggered before any destructor code.
Differential Revision: https://phab.enlightenment.org/D6061
2018-05-24 16:02:17 -07:00
Marcel Hollerbach 0090384ef5 elm_ctxpopup: prevent a giant load of errors
Summary:
i)  There have been 2 sorts of errors, first the items have been deleted
    after the list was deleted, thus the list items have already been
    destructed. which lead to the error as the popup items destroyed the list
    items on destruction as well.

ii) sd->box was attached to the ctxpopup when getting into group_del the
    box has already been destroyed by the cleanup logic.

Subscribers: cedric, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-24 16:02:17 -07:00
WooHyun Jung ea1760380e elm_main: call _elm_config_shutdown() after loop_iterate()
In _elm_config_shutdown(), _elm_config is freed.
So, if some ecore events call efl_ui_xxx API which refers _elm_config,
there can be crashes.

@fix
2018-05-24 15:30:29 +09:00