vcl/source/app/svapp.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 3204c50563ed2aa1f667e1e7a8484ee899d7d62f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Mar 13 18:51:10 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Mar 13 18:07:45 2024 +0100 Assert in ProcessEventsToIdle, that idles are not delayed As noted in https://gerrit.libreoffice.org/c/core/+/164753/9#message-88182774825ae8722961d099d643a6df6f4001a7: > I think this needs an assert inside ProcessEventsToIdle if the guard count > 0. > Otherwise we are going to get very hard to debug lock ups. Change-Id: I2b8753da7a6ae1672ce5d8634771174d87fe376c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164781 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 5400dcf5780f..e0995e0793e2 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -420,6 +420,11 @@ bool Application::IsOnSystemEventLoop() void Scheduler::ProcessEventsToIdle() { +#if OSL_DEBUG_LEVEL > 0 + const ImplSVData* pSVData = ImplGetSVData(); + if (pSVData->mpDefInst->IsMainThread()) + assert(pSVData->maSchedCtx.mnIdlesLockCount == 0); +#endif int nSanity = 1; while (ImplYield(false, true)) { @@ -432,7 +437,6 @@ void Scheduler::ProcessEventsToIdle() // If we yield from a non-main thread we just can guarantee that all idle // events were processed at some point, but our check can't prevent further // processing in the main thread, which may add new events, so skip it. - const ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->mpDefInst->IsMainThread() ) return; for (int nTaskPriority = 0; nTaskPriority < PRIO_COUNT; ++nTaskPriority)