Skip to content
Snippets Groups Projects
Commit 088ff23f authored by Adam Welc's avatar Adam Welc
Browse files

Removed redundant conditionals plus renamed ambiguously named variable.

parent 0d4a98ea
No related branches found
No related tags found
No related merge requests found
...@@ -71,9 +71,9 @@ public abstract class BrowserInteractNode extends RNode { ...@@ -71,9 +71,9 @@ public abstract class BrowserInteractNode extends RNode {
BrowserState browserState = RContext.getInstance().stateInstrumentation.getBrowserState(); BrowserState browserState = RContext.getInstance().stateInstrumentation.getBrowserState();
String savedPrompt = ch.getPrompt(); String savedPrompt = ch.getPrompt();
ch.setPrompt(browserPrompt(RArguments.getDepth(frame))); ch.setPrompt(browserPrompt(RArguments.getDepth(frame)));
RFunction caller = RArguments.getFunction(frame); RFunction callerFunction = RArguments.getFunction(frame);
// we may be at top level where there is not caller // we may be at top level where there is not caller
boolean callerIsDebugged = caller == null ? false : DebugHandling.isDebugged(caller); boolean callerIsDebugged = callerFunction == null ? false : DebugHandling.isDebugged(callerFunction);
int exitMode = NEXT; int exitMode = NEXT;
try { try {
browserState.setInBrowser(true); browserState.setInBrowser(true);
...@@ -96,16 +96,16 @@ public abstract class BrowserInteractNode extends RNode { ...@@ -96,16 +96,16 @@ public abstract class BrowserInteractNode extends RNode {
case "n": case "n":
exitMode = NEXT; exitMode = NEXT;
// don't enable debugging if at top level // don't enable debugging if at top level
if (!callerIsDebugged && caller != null) { if (!callerIsDebugged) {
DebugHandling.enableDebug(caller, "", "", true, true); DebugHandling.enableDebug(callerFunction, "", "", true, true);
} }
browserState.setLastEmptyLineCommand("n"); browserState.setLastEmptyLineCommand("n");
break LW; break LW;
case "s": case "s":
exitMode = STEP; exitMode = STEP;
// don't enable debugging if at top level // don't enable debugging if at top level
if (!callerIsDebugged & caller != null) { if (!callerIsDebugged) {
DebugHandling.enableDebug(caller, "", "", true, true); DebugHandling.enableDebug(callerFunction, "", "", true, true);
} }
browserState.setLastEmptyLineCommand("s"); browserState.setLastEmptyLineCommand("s");
break LW; break LW;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment