[Libreoffice-commits] core.git: cppu/source

Christophe JAILLET (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 18 09:04:24 UTC 2021


 cppu/source/typelib/typelib.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6317f8cc83ec92b8700785ab67c4c66ed1aa8fb2
Author:     Christophe JAILLET <christophe.jaillet at wanadoo.fr>
AuthorDate: Fri Jun 18 00:00:40 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 18 11:03:47 2021 +0200

    Re-add a removed mutex
    
    In commit b33fbd55d630, many getMutex() have been replaced by an equivalent
    maMutex.
    Only in place, the use of a mutex have been simply removed.
    
    Restore it as done in all the other places
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
    Change-Id: Id85e74e166ec57dd37f8913f8ecf19e2b6465f8f
    ---
    This patch is completely speculative. The removal of this mutex was maybe
    done on purpose.
    This only looks spurious to me.
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117402
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 7c392e147c89..26875778c22b 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -2289,6 +2289,7 @@ extern "C" void SAL_CALL typelib_setCacheSize( sal_Int32 nNewSize )
         return;
 
     TypeDescriptor_Init_Impl &rInit = Init::get();
+    MutexGuard aGuard( rInit.maMutex );
     if (nNewSize < nCacheSize)
     {
         while (static_cast<sal_Int32>(rInit.maCache.size()) != nNewSize)


More information about the Libreoffice-commits mailing list