From b37653fdc74e05ff2f86dad39cc1878d9047580b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 13 Aug 2020 15:03:20 +0200 Subject: improve comments around blocks which abort on UI thread event exceptions Change-Id: If3336b8a39e41d958de2e998e3d9467888f2df6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100659 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/app/salusereventlist.cxx | 7 +++++++ vcl/source/app/scheduler.cxx | 1 + 2 files changed, 8 insertions(+) (limited to 'vcl') diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx index 088bc141f5a6..0321fc29e9fd 100644 --- a/vcl/source/app/salusereventlist.cxx +++ b/vcl/source/app/salusereventlist.cxx @@ -103,6 +103,13 @@ bool SalUserEventList::DispatchUserEvents( bool bHandleAllCurrentEvents ) continue; } + /* + * Current policy is that scheduler tasks aren't allowed to throw an exception. + * Because otherwise the exception is caught somewhere totally unrelated. + * TODO Ideally we could capture a proper backtrace and feed this into breakpad, + * which is do-able, but requires writing some assembly. + * See also Scheduler::ProcessTaskScheduling + */ #ifndef IOS try #endif diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index e8ad527ec949..f9fc3dc01fc6 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -479,6 +479,7 @@ bool Scheduler::ProcessTaskScheduling() * Because otherwise the exception is caught somewhere totally unrelated. * TODO Ideally we could capture a proper backtrace and feed this into breakpad, * which is do-able, but requires writing some assembly. + * See also SalUserEventList::DispatchUserEvents */ try { -- cgit