Kaydet (Commit) e19ffa13 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "Timer::Start must be called with SolarMutex locked"

This reverts commit 1c3e88a4; the static
AutoRecovery instance is only destroyed during exit, but wants to use
SolarMutex; that causes crashes at least in CppunitTest_services.  Apparently
needs more thought.
üst 34d76029
...@@ -2249,7 +2249,6 @@ void AutoRecovery::implts_updateTimer() ...@@ -2249,7 +2249,6 @@ void AutoRecovery::implts_updateTimer()
{ {
implts_stopTimer(); implts_stopTimer();
sal_Int32 nMilliSeconds = 0;
/* SAFE */ { /* SAFE */ {
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
...@@ -2259,6 +2258,7 @@ void AutoRecovery::implts_updateTimer() ...@@ -2259,6 +2258,7 @@ void AutoRecovery::implts_updateTimer()
) )
return; return;
sal_Int32 nMilliSeconds = 0;
if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL) if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL)
{ {
nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms
...@@ -2270,16 +2270,15 @@ void AutoRecovery::implts_updateTimer() ...@@ -2270,16 +2270,15 @@ void AutoRecovery::implts_updateTimer()
else if (m_eTimerType == AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED) else if (m_eTimerType == AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED)
nMilliSeconds = 300; // there is a minimum time frame, where the user can lose some key input data! nMilliSeconds = 300; // there is a minimum time frame, where the user can lose some key input data!
} /* SAFE */
SolarMutexGuard g;
m_aTimer.SetTimeout(nMilliSeconds); m_aTimer.SetTimeout(nMilliSeconds);
m_aTimer.Start(); m_aTimer.Start();
} /* SAFE */
} }
void AutoRecovery::implts_stopTimer() void AutoRecovery::implts_stopTimer()
{ {
SolarMutexGuard g; osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
if (!m_aTimer.IsActive()) if (!m_aTimer.IsActive())
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment