[debugger] IDEA-351125 Pass the thead explicitly to filter the current coroutine

The evaluation may be performed on another thread so Thread.currentThread() better should not be used

GitOrigin-RevId: fdded0d4877c9ee36193f5d2ce082722a2a8264d
This commit is contained in:
Alexey Merkulov
2024-04-17 12:55:19 +02:00
committed by intellij-monorepo-bot
parent d5161f5519
commit ccce9c9613
2 changed files with 4 additions and 3 deletions

View File

@@ -14,8 +14,7 @@ public final class CoroutinesDebugHelper {
private static final String DEBUG_COROUTINE_INFO_FIELD = "info";
private static final String SEQUENCE_NUMBER_FIELD = "sequenceNumber";
public static long[] getCoroutinesRunningOnCurrentThread(Object debugProbes) throws ReflectiveOperationException {
Thread currentThread = Thread.currentThread();
public static long[] getCoroutinesRunningOnCurrentThread(Object debugProbes, Thread currentThread) throws ReflectiveOperationException {
List<Long> coroutinesIds = new ArrayList<>();
List infos = (List)invoke(debugProbes, DUMP_COROUTINES_INFO_METHOD);
for (Object info : infos) {