[Tizen] Guard NPatchData removal case during signal emit 96/306396/1 accepted/tizen/7.0/unified/20240222.070145
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 29 Aug 2023 06:52:47 +0000 (15:52 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 21 Feb 2024 05:18:01 +0000 (14:18 +0900)
commit46b6d60583c41a35d950599740ffaed998a4cc2a
tree3cedc6e7c587bf7a33153f4081b71beb8d5685db
parent3442f239e45a1283bb11f123c7d0c423537e12a0
[Tizen] Guard NPatchData removal case during signal emit

This is a combination of 3 commits.

Guard NPatchData removal case during signal emit

It was possible that NPatchData removed during NotifyObserver.
For more safety, let we make NPatchData as shared_ptr, instead
of unique_ptr.

And also, let we don't touch observer list container during
NotifyObservers.

And also, let we remove NPatchInfo at post processing.
It will keep the life of NPatchData during NotifyObserver try to
remove the NPatchInfo.

Change-Id: Ieca33a2231df38d23966f96593506d67333cfcd0
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Remove NPatchLoader observer when they request remove

Since we make remove NPatchData later, the observer was disconnected lately.
It might make some unusual behavior.

Change-Id: I794f22e21964962428f353ee84a9340687274808
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Make NPatchData always use shared pointer

Let we keep NPatchData user always use shared_ptr instead of raw pointer.
In this case, NPatchData itself will be safe enought even if
NPatchData removed from NPatchLoader cache.

Change-Id: I27db855888bc21c7a7282a9e1114945f3f0e758d
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
dali-toolkit/devel-api/utility/npatch-helper.cpp
dali-toolkit/devel-api/utility/npatch-helper.h
dali-toolkit/internal/visuals/npatch-data.cpp
dali-toolkit/internal/visuals/npatch-data.h
dali-toolkit/internal/visuals/npatch-loader.cpp
dali-toolkit/internal/visuals/npatch-loader.h
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/visual-factory-cache.cpp