fix deadlock in xmlhelper::Databases
after
commit 2c37a0ca31
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue Feb 21 15:35:20 2023 +0200
osl::Mutex->std::mutex in xmlhelp::Databases
Change-Id: I3cce9bcd9c6c9d55c5162fdfd351048d16574477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -81,7 +81,12 @@ using namespace com::sun::star::beans;
|
||||
|
||||
OUString Databases::expandURL( const OUString& aURL )
|
||||
{
|
||||
std::unique_lock aGuard( m_aMutex );
|
||||
std::unique_lock aGuard(m_aMutex);
|
||||
return expandURL(aGuard, aURL);
|
||||
}
|
||||
|
||||
OUString Databases::expandURL( std::unique_lock<std::mutex>& /*rGuard*/, const OUString& aURL )
|
||||
{
|
||||
OUString aRetURL = expandURL( aURL, m_xContext );
|
||||
return aRetURL;
|
||||
}
|
||||
@@ -453,7 +458,7 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( std::u16string_view Database
|
||||
|
||||
OUString fileURL;
|
||||
if( pExtensionPath )
|
||||
fileURL = expandURL(*pExtensionPath) + Language + dbFileName;
|
||||
fileURL = expandURL(aGuard, *pExtensionPath) + Language + dbFileName;
|
||||
else
|
||||
fileURL = m_aInstallDirectory + key;
|
||||
|
||||
@@ -809,7 +814,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( std::u16string_view jar
|
||||
std::u16string_view aExtensionPath = jar.substr( nQuestionMark1 + 1, nQuestionMark2 - nQuestionMark1 - 1 );
|
||||
std::u16string_view aPureJar = jar.substr( nQuestionMark2 + 1 );
|
||||
|
||||
zipFile = expandURL( OUString::Concat(aExtensionPath) + "/" + aPureJar );
|
||||
zipFile = expandURL( aGuard, OUString::Concat(aExtensionPath) + "/" + aPureJar );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -218,6 +218,7 @@ namespace chelp {
|
||||
const css::uno::Reference< css::uno::XComponentContext >& xContext );
|
||||
|
||||
private:
|
||||
OUString expandURL( std::unique_lock<std::mutex>& rGuard, const OUString& aURL );
|
||||
OUString processLang( std::unique_lock<std::mutex>& rGuard, const OUString& Language );
|
||||
|
||||
std::mutex m_aMutex;
|
||||
|
||||
Reference in New Issue
Block a user