Add assert to windows SuspendedThreadTask::internal_do_task

This commit is contained in:
Evgeny Astigeevich 2026-06-10 20:01:03 +00:00
parent 368aab8eba
commit 5895ca772a

View File

@ -6058,6 +6058,11 @@ static inline HANDLE get_thread_handle_for_extended_context(DWORD tid) {
// Thread sampling implementation
//
void SuspendedThreadTask::internal_do_task() {
#if INCLUDE_JFR
assert(NOT_COMPILER2(true) COMPILER2_PRESENT(!HotCodeHeap) ||
SuspendedThreadTask_lock->owned_by_self(),
"suspend/resume must be serialized when HotCodeHeap is enabled");
#endif
const HANDLE h = get_thread_handle_for_extended_context(_thread->osthread()->thread_id());
if (h == nullptr) {
return;