Fix the getBreakpoint() function in the HTML Debugger client.
There was a problem around the offset, the function tried to use some invalid object reference.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss
@@ -524,16 +524,16 @@ function DebuggerClient(address)
var func = functions[breakpointData[0]];
var offset = breakpointData[1];
- if (offset in functions)
+ if (offset in func.offsets)
{
returnValue.breakpoint = func.offsets[offset];
returnValue.at = true;
return returnValue;
}
- if (offset < functions.firstBreakpointOffset)
+ if (offset < func.firstBreakpointOffset)
{
- returnValue.breakpoint = func.offsets[firstBreakpointOffset];
+ returnValue.breakpoint = func.offsets[func.firstBreakpointOffset];
returnValue.at = true;
return returnValue;
}
