diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-10-02 23:23:46 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-10-02 23:52:30 +0200 |
commit | 970448ef96c8be8b282f91dc235cab518d941549 (patch) | |
tree | a217f2aed6e63a140174c9d989d311b0e3127c7f | |
parent | 4100e3b6204fc304cc7b60b9d7ff2af75118b805 (diff) |
vcl: add some SolarMutex assertions
Check that SolarMutex is locked after return from
Yield(), and in LazyDelete::flush().
Change-Id: I12ff312bd946b97b5f2c79169892719910884381
-rw-r--r-- | vcl/source/app/svapp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/helper/lazydelete.cxx | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b96de57ea0dc..987db604dce2 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -364,6 +364,8 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents ) pSVData->mpDefInst->Yield( i_bWait && !pSVData->maAppData.mbAppQuit && !pSVData->maAppData.mbNoYield, i_bAllEvents ); pSVData->maAppData.mnDispatchLevel--; + DBG_TESTSOLARMUTEX(); // must be locked on return from Yield + // flush lazy deleted objects if( pSVData->maAppData.mnDispatchLevel == 0 ) vcl::LazyDelete::flush(); diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx index df4e93d91bac..e3676dcb3ccd 100644 --- a/vcl/source/helper/lazydelete.cxx +++ b/vcl/source/helper/lazydelete.cxx @@ -46,6 +46,8 @@ void LazyDelete::addDeletor( LazyDeletorBase* i_pDel ) void LazyDelete::flush() { + DBG_TESTSOLARMUTEX(); // must be locked + unsigned int nCount = lcl_aDeletors.size(); for( unsigned int i = 0; i < nCount; i++ ) delete lcl_aDeletors[i]; |