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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue May 21 19:55:23 UTC 2019


 ucb/source/ucp/hierarchy/hierarchycontent.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 165327d4ae442fb33b634577c32fe692a9293457
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue May 21 18:52:54 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue May 21 21:54:04 2019 +0200

    tdf#125424: properly reset temporarily cleared guard
    
    Since the guard is only cleared optionally, most probably the code after
    the conditional block is expected to be guarded until the second clear.
    
    Change-Id: I913cb4bff42140da605a6f45414bece419f4a4c8
    Reviewed-on: https://gerrit.libreoffice.org/72689
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index e0ac3c81fda7..923225a1df90 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1002,7 +1002,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
         const uno::Sequence< beans::PropertyValue >& rValues,
         const uno::Reference< ucb::XCommandEnvironment > & xEnv )
 {
-    osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
+    osl::ResettableGuard< osl::Mutex > aGuard( m_aMutex );
 
     uno::Sequence< uno::Any > aRet( rValues.getLength() );
     uno::Sequence< beans::PropertyChangeEvent > aChanges( rValues.getLength() );
@@ -1253,6 +1253,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
                     "Exchange failed!",
                     static_cast< cppu::OWeakObject * >( this ) );
         }
+        aGuard.reset();
     }
 
     if ( !aOldTitle.isEmpty() )


More information about the Libreoffice-commits mailing list