HomePhabricator

eo: only return NULL when the object is destructed.

Authored by Cedric Bail <cedric@osg.samsung.com> on Aug 13 2017, 1:14 PM.

Description

eo: only return NULL when the object is destructed.

There is a problem with the previous version. The object can still be
alive due to the use of manual_free in evas. So you wouldn't be able
for example to remove a callback from an object that hasn't been
destroyed yet. If that callback is triggered by the destruction
of the object, you would end up with an unexpected and impossible to
prevent effect of access after free on a callback that you had removed.

Not sure if that still solve the original problem that the code was
trying to prevent in Ecore_Evas.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>

Fixes T5968

@fix

Details

Committed
Jean-Philippe Andre <jp.andre@samsung.com>Sep 11 2017, 11:06 PM
Parents
rEFL9c9e5040414d: filters: Safety++
Branches
Unknown
Tags
Unknown
Tasks
T5968: edje crash
Jean-Philippe Andre <jp.andre@samsung.com> committed rEFL760ee9930692: eo: only return NULL when the object is destructed. (authored by Cedric Bail <cedric@osg.samsung.com>).Sep 11 2017, 11:06 PM