sc/inc/refreshtimer.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit a6dc1d415492c160551dd98bad1cd4c116f136eb Author: Eike Rathke <[email protected]> AuthorDate: Sat Feb 26 01:57:51 2022 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Feb 26 20:12:51 2022 +0100 Resolves: tdf#147448 ScRefreshTimerControl mutex must be std::recursive_mutex ScRefreshTimer::Invoke() locks the mutex and subsequent nested locks are attempted in ScDocShell::ConvertFrom() and ScDocShellModificator ctor by ScRefreshTimerProtector. A std::mutex must not be owned by the calling thread when a lock is attempted, otherwise even deadlocks may occur, as was the case here. This is exactly the difference of std::recursive_mutex. Likely a regression from commit 287680683ca266f1fb4f447ac9bdaf76669d559d CommitDate: Mon Aug 2 12:17:07 2021 +0200 osl::Mutex->std::mutex in ScRefreshTimer Change-Id: Iaa0f1da2b4b9616e9627d8d0001775f554756048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130573 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Jenkins (cherry picked from commit 4361ee2585e616cb3c504eb719deca4076de78da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130552 Reviewed-by: Luboš Luňák <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Mike Kaganski <[email protected]> diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx index 9582d1b19a2c..e6be7431d9e5 100644 --- a/sc/inc/refreshtimer.hxx +++ b/sc/inc/refreshtimer.hxx @@ -29,14 +29,14 @@ class ScRefreshTimerControl { - std::mutex aMutex; - sal_uInt16 nBlockRefresh; + std::recursive_mutex aMutex; + sal_uInt16 nBlockRefresh; public: ScRefreshTimerControl() : nBlockRefresh(0) {} void SetAllowRefresh( bool b ); bool IsRefreshAllowed() const { return !nBlockRefresh; } - std::mutex& GetMutex() { return aMutex; } + std::recursive_mutex& GetMutex() { return aMutex; } }; class ScRefreshTimer : public AutoTimer
