Commit 791f1182 authored by yann300's avatar yann300

modify resolveToReducedTrace

parent b8bcfeff
...@@ -64,8 +64,13 @@ function StepManager (_parent, _traceManager) { ...@@ -64,8 +64,13 @@ function StepManager (_parent, _traceManager) {
StepManager.prototype.resolveToReducedTrace = function (value, incr) { StepManager.prototype.resolveToReducedTrace = function (value, incr) {
if (this.parent.callTree.reducedTrace.length) { if (this.parent.callTree.reducedTrace.length) {
var nextSource = utils.findLowerClosestBound(value, this.parent.callTree.reducedTrace) var nextSource = utils.findClosestIndex(value, this.parent.callTree.reducedTrace)
nextSource = nextSource < this.parent.callTree.reducedTrace.length - 1 ? nextSource + incr : nextSource nextSource = nextSource + incr
if (nextSource <= 0) {
nextSource = 0
} else if (nextSource > this.parent.callTree.reducedTrace.length) {
nextSource = this.parent.callTree.reducedTrace.length - 1
}
return this.parent.callTree.reducedTrace[nextSource] return this.parent.callTree.reducedTrace[nextSource]
} }
return value return value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment