Commit e6fea60b authored by yann300's avatar yann300

typo + comment

parent 574cf958
......@@ -85,8 +85,16 @@ module.exports = {
return index >= 0 ? array[index] : null
},
/**
* Find the call from @args rootCall which contains @args index (recursive)
*
* @param {Int} index - index of the vmtrace
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Object} - return the call which include the @args index
*/
findCall: findCall,
buildCallsPath: buildCallsPath
buildCallPath: buildCallPath
}
/**
......@@ -96,21 +104,14 @@ module.exports = {
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Array} - return the calls path to @args index
*/
function buildCallsPath (index, rootCall) {
function buildCallPath (index, rootCall) {
var ret = []
findCallInternal(index, rootCall, ret)
return ret
}
/**
* Find the call from @args rootCall which contains @args index (recursive)
*
* @param {Int} index - index of the vmtrace
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Object} - return the call which include the @args index
*/
function findCall (index, rootCall) {
var ret = buildCallsPath(index, rootCall)
var ret = buildCallPath(index, rootCall)
return ret[ret.length - 1]
}
......
......@@ -114,12 +114,12 @@ TraceManager.prototype.getCallDataAt = function (stepIndex, callback) {
callback(null, [this.traceCache.callsData[callDataChange]])
}
TraceManager.prototype.buildCallsPath = function (stepIndex, callback) {
TraceManager.prototype.buildCallPath = function (stepIndex, callback) {
var check = this.checkRequestedStep(stepIndex)
if (check) {
return callback(check, null)
}
var callsPath = util.buildCallsPath(stepIndex, this.traceCache.callsTree.call)
var callsPath = util.buildCallPath(stepIndex, this.traceCache.callsTree.call)
if (callsPath === null) return callback('no call path built', null)
callback(null, callsPath)
}
......
......@@ -21,7 +21,7 @@ function ButtonNavigator (_parent, _traceManager) {
if (index < 0) return
if (_parent.currentStepIndex !== index) return
this.traceManager.buildCallsPath(index, (error, callsPath) => {
this.traceManager.buildCallPath(index, (error, callsPath) => {
if (error) {
console.log(error)
resetWarning(this)
......@@ -66,7 +66,7 @@ ButtonNavigator.prototype.render = function () {
<button id='intoforward' title='step into forward' class='fa fa-angle-right' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('stepIntoForward') }} disabled=${this.intoForwardDisabled} >
</button>
<button id='overforward' title='step over forward' class='fa fa-angle-double-right' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('stepOverForward') }} disabled=${this.overForwardDisabled} >
</button>
</button>
<button id='nextcall' title='step next call' class='fa fa-chevron-right' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpNextCall') }} disabled=${this.nextCallDisabled} >
</button>
<button id='jumpout' title='jump out' class='fa fa-share' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} >
......
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