make sourceLocationFromInstructionIndex a promise

refactor_remix_debug4
Iuri Matias 5 years ago
parent 0a9aa84aa3
commit 8f6b5100cb
  1. 6
      libs/remix-debug/src/Ethdebugger.js

@ -61,10 +61,8 @@ Ethdebugger.prototype.sourceLocationFromVMTraceIndex = async function (address,
return this.callTree.sourceLocationTracker.getSourceLocationFromVMTraceIndex(address, stepIndex, this.solidityProxy.contracts)
}
Ethdebugger.prototype.sourceLocationFromInstructionIndex = function (address, instIndex, callback) {
this.callTree.sourceLocationTracker.getSourceLocationFromInstructionIndex(address, instIndex, this.solidityProxy.contracts).then((rawLocation) => {
callback(null, rawLocation)
}).catch(callback)
Ethdebugger.prototype.sourceLocationFromInstructionIndex = async function (address, instIndex, callback) {
return this.callTree.sourceLocationTracker.getSourceLocationFromInstructionIndex(address, instIndex, this.solidityProxy.contracts)
}
/* breakpoint */

Loading…
Cancel
Save