mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
[WIN32K] ASSERT that all callout references have been cleaned up on thread exit
This commit is contained in:
parent
690783179e
commit
9eca7c52f6
3 changed files with 12 additions and 0 deletions
|
@ -813,6 +813,9 @@ ExitThreadCallback(PETHREAD Thread)
|
||||||
UserDereferenceObject(ref->obj);
|
UserDereferenceObject(ref->obj);
|
||||||
|
|
||||||
psle = PopEntryList(&ptiCurrent->ReferencesList);
|
psle = PopEntryList(&ptiCurrent->ReferencesList);
|
||||||
|
#if DBG
|
||||||
|
ptiCurrent->cRefObjectCo--;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,6 +875,8 @@ ExitThreadCallback(PETHREAD Thread)
|
||||||
}
|
}
|
||||||
ptiCurrent->hEventQueueClient = NULL;
|
ptiCurrent->hEventQueueClient = NULL;
|
||||||
|
|
||||||
|
ASSERT(ptiCurrent->cRefObjectCo == 0);
|
||||||
|
|
||||||
/* The thread is dying */
|
/* The thread is dying */
|
||||||
PsSetThreadWin32Thread(Thread /*ptiCurrent->pEThread*/, NULL, ptiCurrent);
|
PsSetThreadWin32Thread(Thread /*ptiCurrent->pEThread*/, NULL, ptiCurrent);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@ UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
|
||||||
UserReferenceEntry->obj = obj;
|
UserReferenceEntry->obj = obj;
|
||||||
UserReferenceObject(obj);
|
UserReferenceObject(obj);
|
||||||
PushEntryList(&W32Thread->ReferencesList, &UserReferenceEntry->Entry);
|
PushEntryList(&W32Thread->ReferencesList, &UserReferenceEntry->Entry);
|
||||||
|
#if DBG
|
||||||
|
W32Thread->cRefObjectCo++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline VOID
|
static __inline VOID
|
||||||
|
@ -53,6 +56,9 @@ UserDerefObjectCo(PVOID obj)
|
||||||
|
|
||||||
ASSERT(obj == UserReferenceEntry->obj);
|
ASSERT(obj == UserReferenceEntry->obj);
|
||||||
UserDereferenceObject(obj);
|
UserDereferenceObject(obj);
|
||||||
|
#if DBG
|
||||||
|
W32Thread->cRefObjectCo--;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FreeProcMarkObject(_In_ PVOID Object);
|
void FreeProcMarkObject(_In_ PVOID Object);
|
||||||
|
|
|
@ -158,6 +158,7 @@ typedef struct _THREADINFO
|
||||||
ULONG cExclusiveLocks;
|
ULONG cExclusiveLocks;
|
||||||
#if DBG
|
#if DBG
|
||||||
USHORT acExclusiveLockCount[GDIObjTypeTotal + 1];
|
USHORT acExclusiveLockCount[GDIObjTypeTotal + 1];
|
||||||
|
UINT cRefObjectCo;
|
||||||
#endif
|
#endif
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
} THREADINFO;
|
} THREADINFO;
|
||||||
|
|
Loading…
Reference in a new issue