Page MenuHomePhabricator

elc_naviframe: Delete naviframe items in LIFO manner on widget deletion.
ClosedPublic

Authored by shilpasingh on Dec 13 2016, 1:02 AM.

Details

Summary

Naviframe manages items in the form of a stack, but deletion is happening
in FIFO manner, the deletion of items on widget deletion should also happen
in LIFO manner.

Use Case: Application allocates memory on first push and passes down the same
handle for all subsequent pushes, now on deletion as first item is deleted first
crash happens when the memory is accessed in second item on its deletion.
hence Naviframe should also delete items in LIFO manner.

@feature

Test Plan

elementary_test->naviframe->push multiple pages
Now terminate the app, the items should be deleted in LIFO
manner.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
shilpasingh retitled this revision from to elc_naviframe: Delete naviframe items in LIFO manner on widget deletion..
shilpasingh updated this object.
shilpasingh edited the test plan for this revision. (Show Details)
shilpasingh added a reviewer: Hermet.
shilpasingh added subscribers: rajeshps, govi.
Jaehyun_Cho accepted this revision.Dec 13 2016, 3:13 AM
Jaehyun_Cho edited edge metadata.
This revision is now accepted and ready to land.Dec 13 2016, 3:13 AM
Jaehyun_Cho requested changes to this revision.Dec 13 2016, 3:20 AM
Jaehyun_Cho edited edge metadata.

if item is not pushed, then sd-<stack is NULL.
In this case, segmentation fault happens.
Please consider this case.

This revision now requires changes to proceed.Dec 13 2016, 3:20 AM
shilpasingh edited edge metadata.

if sd->stack is NULL, do not deref sd->stack

Jaehyun_Cho accepted this revision.Dec 13 2016, 3:55 AM
Jaehyun_Cho edited edge metadata.
This revision is now accepted and ready to land.Dec 13 2016, 3:55 AM
This revision was automatically updated to reflect the committed changes.