diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-09-28 13:59:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-09-30 09:30:03 +0200 |
commit | 0d43f5176d34145b0965fdb2536cd6f454e985c5 (patch) | |
tree | cdce3fff899e08e9aa4aa405213b23fd5a4da7f6 /vcl/source/uitest | |
parent | 736a4e659cff2ef5f900301d7d288494f9b98178 (diff) |
Access to ProcessEventsToSignal's bSignal is racy
...so spell out its single use, locking the appropriate mutex around the access
Change-Id: I8e8f47de1979f5a80cf1ad65e5ec24d25145c463
Reviewed-on: https://gerrit.libreoffice.org/42908
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/uitest')
-rw-r--r-- | vcl/source/uitest/uno/uiobject_uno.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index b68b15aeb5df..a32ff6542198 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -96,7 +96,15 @@ IMPL_LINK_NOARG(ExecuteWrapper, ExecuteActionHdl, Timer*, void) aIdle.Start(); } - Scheduler::ProcessEventsToSignal(mbSignal); + for (;;) { + { + std::unique_lock<std::mutex> lock(mMutex); + if (mbSignal) { + break; + } + } + Application::Reschedule(); + } std::unique_lock<std::mutex> lock(mMutex); while (!mbSignal) { |