mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] do not recompute location - use already computed value
GitOrigin-RevId: d62d86215d716db5a31d5fa337c825c91e9b4b99
This commit is contained in:
committed by
intellij-monorepo-bot
parent
13c1550f17
commit
ad645bf141
+6
-4
@@ -82,9 +82,8 @@ public class StackFrameDescriptorImpl extends NodeDescriptorImpl implements Stac
|
||||
}
|
||||
}
|
||||
|
||||
private static CompletableFuture<SourcePosition> getSourcePositionAsync(@NotNull StackFrameProxyImpl frame) {
|
||||
private static CompletableFuture<SourcePosition> getSourcePositionAsync(@NotNull Location location, @NotNull StackFrameProxyImpl frame) {
|
||||
try {
|
||||
Location location = frame.location();
|
||||
CompoundPositionManager positionManager = frame.getVirtualMachine().getDebugProcess().getPositionManager();
|
||||
return positionManager.getSourcePositionFuture(location);
|
||||
}
|
||||
@@ -95,9 +94,12 @@ public class StackFrameDescriptorImpl extends NodeDescriptorImpl implements Stac
|
||||
|
||||
public static CompletableFuture<StackFrameDescriptorImpl> createAsync(@NotNull StackFrameProxyImpl frame,
|
||||
@NotNull MethodsTracker tracker) {
|
||||
return frame.locationAsync()
|
||||
CompletableFuture<Location> locationAsync = frame.locationAsync();
|
||||
CompletableFuture<SourcePosition> positionAsync =
|
||||
locationAsync.thenCompose(location -> DebuggerUtilsAsync.reschedule(getSourcePositionAsync(location, frame)));
|
||||
return locationAsync
|
||||
.thenCompose(DebuggerUtilsAsync::method)
|
||||
.thenCombine(DebuggerUtilsAsync.reschedule(getSourcePositionAsync(frame)), (method, position) -> {
|
||||
.thenCombine(positionAsync, (method, position) -> {
|
||||
DebuggerManagerThreadImpl.assertIsManagerThread();
|
||||
return new StackFrameDescriptorImpl(frame, true, method, tracker, position);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user