remove debugger UI dependency out of solidityLocals

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 77b8aa4076
commit 1cd738d889
  1. 7
      src/app/debugger/debugger/SolidityLocals.js
  2. 5
      src/app/debugger/debugger/VmDebugger.js

@ -6,9 +6,8 @@ var StorageViewer = remixDebug.storage.StorageViewer
class DebuggerSolidityLocals {
constructor (_parent, tx, _stepManager, _traceManager, _internalTreeCall) {
constructor (tx, _stepManager, _traceManager, _internalTreeCall) {
this.event = new EventManager()
this.parent = _parent
this.stepManager = _stepManager
this.internalTreeCall = _internalTreeCall
this.storageResolver = null
@ -16,10 +15,9 @@ class DebuggerSolidityLocals {
this.tx = tx
}
init () {
init (sourceLocation) {
const self = this
var decodeTimeout = null
this.parent.event.register('sourceLocationChanged', this, (sourceLocation) => {
if (!this.storageResolver) {
return self.event.trigger('solidityLocalsMessage', ['storage not ready'])
}
@ -30,7 +28,6 @@ class DebuggerSolidityLocals {
decodeTimeout = setTimeout(function () {
self.decode(sourceLocation)
}, 500)
})
}
decode (sourceLocation) {

@ -23,7 +23,7 @@ class VmDebuggerLogic {
this.tx = tx
this.debuggerSolidityState = new DebuggerSolidityState(tx, _stepManager, _traceManager, _codeManager, _solidityProxy)
this.debuggerSolidityLocals = new DebuggerSolidityLocals(_parentUI, tx, _stepManager, _traceManager, _callTree)
this.debuggerSolidityLocals = new DebuggerSolidityLocals(tx, _stepManager, _traceManager, _callTree)
}
start () {
@ -35,7 +35,6 @@ class VmDebuggerLogic {
this.listenToSolidityStateEvents()
this.debuggerSolidityLocals.init()
this.listenToSolidityLocalsEvents()
}
@ -235,7 +234,7 @@ class VmDebuggerLogic {
listenToSolidityLocalsEvents () {
const self = this
this._parentUI.event.register('sourceLocationChanged', this.debuggerSolidityLocals.init.bind(this.debuggerSolidityLocals))
this.debuggerSolidityLocals.event.register('solidityLocals', function (state) {
self.event.trigger('solidityLocals', [state])
})

Loading…
Cancel
Save