efl_ui_table: hardening of pack_at function
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Thu, 4 Apr 2019 11:24:59 +0000 (13:24 +0200)
committerYeongjong Lee <yj34.lee@samsung.com>
Wed, 24 Apr 2019 05:24:47 +0000 (14:24 +0900)
commitf2d47af0f14c4d212d85603289026405f1411bd2
tree542d4118cf9d95df8d57967fc7cf56ceee5a3027
parent0fbf1f87e964cfbd52990a0ee3dedbfab80b0a79
efl_ui_table: hardening of pack_at function

_pack_at is used to add new subobjects to the table. When a object is
already part of this table, then we should not add it again. Additional,
when there is already a gi structure, but the parent is something else,
then we should NOT just reuse this struct, otherwise we might use a
struct reference that we do not own. The struct could be owned by
another table widget.

The test must be adjusted, before we did not error on adding a widget
twice. Now we do (just like in box). Hence we should not do that in
test.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8554
src/lib/elementary/efl_ui_table.c
src/tests/elementary/efl_ui_test_table.c