mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[coroutines-debuuger] Fix CoroutinesDebugHelper#dumpCoroutinesInfoAsJsonAndReferences return null in case of an error
GitOrigin-RevId: d0a7ff5f6ea4932ca570044ec348aabd1bdb95d4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f282f68b1e
commit
78427051ef
@@ -146,10 +146,14 @@ public final class CoroutinesDebugHelper {
|
|||||||
|
|
||||||
public static Object[] dumpCoroutinesInfoAsJsonAndReferences() throws ReflectiveOperationException {
|
public static Object[] dumpCoroutinesInfoAsJsonAndReferences() throws ReflectiveOperationException {
|
||||||
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||||
|
try {
|
||||||
Class<?> debugProbesImplClass = classLoader.loadClass("kotlinx.coroutines.debug.internal.DebugProbesImpl");
|
Class<?> debugProbesImplClass = classLoader.loadClass("kotlinx.coroutines.debug.internal.DebugProbesImpl");
|
||||||
Object debugProbesImplInstance = debugProbesImplClass.getField("INSTANCE").get(null);
|
Object debugProbesImplInstance = debugProbesImplClass.getField("INSTANCE").get(null);
|
||||||
Object[] infos = (Object[])invoke(debugProbesImplInstance, "dumpCoroutinesInfoAsJsonAndReferences");
|
Object[] infos = (Object[])invoke(debugProbesImplInstance, "dumpCoroutinesInfoAsJsonAndReferences");
|
||||||
return infos;
|
return infos;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user