[ooo-build-commit] Branch 'ooo/OOO310' - bridges/source

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Jun 23 19:27:38 PDT 2009


 bridges/source/remote/urp/urp_environment.cxx |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit ef301d5a8174bb425e7d453da2f5ad12e31fe49a
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Jun 23 06:17:53 2009 +0000

    CWS-TOOLING: integrate CWS sb112
    2009-06-02 13:30:55 +0200 sb  r272498 : #i101394# missing PATCH flag
    2009-06-02 08:49:47 +0200 sb  r272478 : #i101394# backported fix for issue 97975 from OOo 3.2 to OOo 3.1.1, by applying cws/sb109/bridges/source/remote/urp/urp_environment.cxx -c270972 and subsequent fix cws/dba32c/bridges/source/remote/urp/urp_environment.cxx -c272434

diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx
index 9d9129b..69a0223 100644
--- a/bridges/source/remote/urp/urp_environment.cxx
+++ b/bridges/source/remote/urp/urp_environment.cxx
@@ -182,6 +182,7 @@ struct StaticSingleton
 {
     ~StaticSingleton()
         {
+            ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
             g_bStaticDestructorsCalled = sal_True;
         }
 };
@@ -267,7 +268,13 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote
       }
     // in case, that the static destructors already have been called, no
     // tiding up is done.
-    if( ! g_bStaticDestructorsCalled  && ! pContext->m_pBridgeImpl->m_bDisposed )
+    bool tidyUp;
+    {
+        ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
+        tidyUp = ! g_bStaticDestructorsCalled &&
+            ! pContext->m_pBridgeImpl->m_bDisposed;
+    }
+    if( tidyUp )
     {
         // TODO : not threadsafe
         // synchronization with dispatch methods needed !
@@ -335,9 +342,15 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote
             pImpl->m_pReader = 0;
         }
 
-        // delete the stubs
-        releaseStubs( pEnvRemote );
-
+        bool bReleaseStubs = false;
+        {
+            ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
+            bReleaseStubs = !g_bStaticDestructorsCalled;
+        }
+        if( bReleaseStubs )
+        {
+            releaseStubs( pEnvRemote );
+        }
     }
 }
 


More information about the ooo-build-commit mailing list