From ea99c348b0a199c2b06ba95e00e45f6720f0c8d5 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Sat, 26 Mar 2016 13:21:58 +0100 Subject: [PATCH] if there are 2 breakpoints on first line for the same file name (e.g. test.js), we must not stop in incorrect file --- .../debugger-ui/src/LineBreakpointManager.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt b/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt index 2227e5f91384..8fee087ca062 100644 --- a/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt +++ b/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt @@ -211,11 +211,9 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl protected abstract fun doRunToLocation(position: XSourcePosition): List - fun isRunToCursorBreakpoints(breakpoints: List): Boolean { - synchronized (runToLocationBreakpoints) { - return runToLocationBreakpoints.containsAll(breakpoints) - } - } + fun isRunToCursorBreakpoints(breakpoints: List) = synchronized (runToLocationBreakpoints) { runToLocationBreakpoints.containsAll(breakpoints) } + + fun isRunToCursorBreakpoint(breakpoint: Breakpoint) = synchronized (runToLocationBreakpoints) { runToLocationBreakpoints.contains(breakpoint) } fun updateAllBreakpoints(vm: Vm) { val array = synchronized (lock) { IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.keys.toTypedArray() } } ?: return