Assert to add / remove observer during notifying
Let we assert the cases when observer list try to be changed during notifying.
But, allow to remove observer during notifying, only for Object cases.
Until now, we just change the observer list directly, so if notifying, then
memory corruption occured.
To avoid this case, follow as ProcessorInterface did, copy the observer lists
and check whether it is valid or not, only if somebody touch original list.
Note : For BaseObject::Impl case, it is not opened
and it didn't send notify when scene on/off.
The only observer for BaseObject::Impl is WeakHandle. and OnDestroy() didnt'
send callback that timing.
Note2 : PropertyOwner case, it is also only for update-render thread for DALi.
We can control that non of callback change the observers for this thing.
So let we assume BaseObject::Impl::RemoveObserver and
PropertyOwner::RemoveObserver will not be called
during desturct object.
TODO : Should we also control Object::RemoveObserver case?
TODO : Should we remove observer copy?
Change-Id: Ia373243bdaae83613b1b91680a77b86409977028
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
16 files changed: