Skip to content

Commit

Permalink
Idle::Start must be called with SolarMutex locked
Browse files Browse the repository at this point in the history
...as asserted now since c00d827 "vcl: assert
solar mutex is held for various timer / scheduler ops."  Caused that assert to
fire when adding an extension via "Tools - Extension Manager... Add".

Change-Id: I86eeb2c4a83c3dff98ba9012c068af91e7932df6
(cherry picked from commit f108d9f)
Reviewed-on: https://gerrit.libreoffice.org/31354
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
  • Loading branch information
stbergmann committed Nov 29, 2016
1 parent 9a1e401 commit 19c34aa
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions linguistic/source/lngsvcmgr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <com/sun/star/linguistic2/ProofreadingIterator.hpp>

#include <unotools/lingucfg.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
Expand Down Expand Up @@ -479,17 +480,22 @@ LngSvcMgr::LngSvcMgr()
void LngSvcMgr::modified(const lang::EventObject&)
throw(uno::RuntimeException, std::exception)
{
osl::MutexGuard aGuard(GetLinguMutex());
//assume that if an extension has been added/removed that
//it might be a dictionary extension, so drop our cache
{
osl::MutexGuard aGuard(GetLinguMutex());
//assume that if an extension has been added/removed that
//it might be a dictionary extension, so drop our cache

clearSvcInfoArray(pAvailSpellSvcs);
clearSvcInfoArray(pAvailGrammarSvcs);
clearSvcInfoArray(pAvailHyphSvcs);
clearSvcInfoArray(pAvailThesSvcs);
clearSvcInfoArray(pAvailSpellSvcs);
clearSvcInfoArray(pAvailGrammarSvcs);
clearSvcInfoArray(pAvailHyphSvcs);
clearSvcInfoArray(pAvailThesSvcs);
}

//schedule in an update to execute in the main thread
aUpdateIdle.Start();
{
SolarMutexGuard aGuard;
//schedule in an update to execute in the main thread
aUpdateIdle.Start();
}
}

//run update, and inform everyone that dictionaries (may) have changed, this
Expand Down

0 comments on commit 19c34aa

Please sign in to comment.