[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - salhelper/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Tue Aug 2 15:24:11 UTC 2016
salhelper/source/thread.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 5ccf6776a130cc7bdd692bbcfd1be47001609ee4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Aug 2 14:25:44 2016 +0200
don't catch SEH exceptions in sal thread code
...just for libreoffice-5-2, which does not have
62c047ffb397802c09df9070492e70725928cadf "switch to EHs on windows" and
needs this for crash reporting in spawned salhelper::Threads.
Change-Id: I1e8f15d8f2fb5a741538d16de34c47f66dfaba0d
Reviewed-on: https://gerrit.libreoffice.org/26968
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/salhelper/source/thread.cxx b/salhelper/source/thread.cxx
index 52c028c..ea188b8 100644
--- a/salhelper/source/thread.cxx
+++ b/salhelper/source/thread.cxx
@@ -38,12 +38,20 @@ void salhelper::Thread::run() {
try {
setName(name_);
execute();
- } catch (...) {
+ } catch (const std::exception&) {
// Work around the problem that onTerminated is not called if run throws
// an exception:
onTerminated();
throw;
}
+ // don't use a catch all handler with EHa as that will catch SEH exceptions
+#ifndef WNT
+ catch (...)
+ {
+ onTerminated();
+ throw;
+ }
+#endif
}
void salhelper::Thread::onTerminated() { release(); }
More information about the Libreoffice-commits
mailing list