mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extra check for JRE-937
This commit is contained in:
@@ -157,14 +157,17 @@ public class ThreadDumpAction extends AnAction implements AnAction.TransparentUp
|
||||
hasEmptyStack = frames.size() == 0;
|
||||
|
||||
final TIntObjectHashMap<List<ObjectReference>> lockedAt = new TIntObjectHashMap<>();
|
||||
if (vmProxy.canGetMonitorFrameInfo() && vmProxy.canBeModified()) {
|
||||
for (MonitorInfo info : threadReference.ownedMonitorsAndFrames()) {
|
||||
final int stackDepth = info.stackDepth();
|
||||
List<ObjectReference> monitors;
|
||||
if ((monitors = lockedAt.get(stackDepth)) == null) {
|
||||
lockedAt.put(stackDepth, monitors = new SmartList<>());
|
||||
if (vmProxy.canGetMonitorFrameInfo()) {
|
||||
for (Object m : threadReference.ownedMonitorsAndFrames()) {
|
||||
if (m instanceof MonitorInfo) { // see JRE-937
|
||||
MonitorInfo info = (MonitorInfo)m;
|
||||
final int stackDepth = info.stackDepth();
|
||||
List<ObjectReference> monitors;
|
||||
if ((monitors = lockedAt.get(stackDepth)) == null) {
|
||||
lockedAt.put(stackDepth, monitors = new SmartList<>());
|
||||
}
|
||||
monitors.add(info.monitor());
|
||||
}
|
||||
monitors.add(info.monitor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user