clover: Catch errors from executing event action

Abort all dependent events.
v2: Abort the current event as well.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
Jan Vesely 2018-07-17 02:05:02 -04:00
parent e105b0ca30
commit 866b25fd01
1 changed files with 3 additions and 1 deletions

View File

@ -49,12 +49,14 @@ event::trigger_self() {
}
void
event::trigger() {
event::trigger() try {
if (wait_count() == 1)
action_ok(*this);
for (event &ev : trigger_self())
ev.trigger();
} catch (error &e) {
abort(e.get());
}
std::vector<intrusive_ref<event>>