use of com.oracle.truffle.tools.chromeinspector.commands.Result in project graal by oracle.
the class TruffleDebugger method restartFrame.
@Override
public Params restartFrame(long cmdId, String callFrameId, CommandPostProcessor postProcessor) throws CommandProcessException {
if (callFrameId == null) {
throw new CommandProcessException("A callFrameId required.");
}
int frameId;
try {
frameId = Integer.parseInt(callFrameId);
} catch (NumberFormatException ex) {
throw new CommandProcessException(ex.getLocalizedMessage());
}
DebuggerSuspendedInfo susp = suspendedInfo;
if (susp != null) {
if (frameId >= susp.getCallFrames().length) {
throw new CommandProcessException("Too big callFrameId: " + frameId);
}
CallFrame cf = susp.getCallFrames()[frameId];
susp.getSuspendedEvent().prepareUnwindFrame(cf.getFrame());
postProcessor.setPostProcessJob(() -> {
silentResume = true;
commandLazyResponse = (DebuggerSuspendedInfo suspInfo) -> {
JSONObject res = new JSONObject();
res.put("callFrames", getFramesParam(suspInfo.getCallFrames()));
return new Event(cmdId, new Result(new Params(res)));
};
doResume();
});
}
return new Params(null);
}
Aggregations