Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b87ae778
Commit
b87ae778
authored
Jul 22, 2020
by
Iuri Matias
Committed by
aniket-engg
Aug 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor getCurrentStep
parent
68b4b822
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
VmDebugger.js
libs/remix-debug/src/debugger/VmDebugger.js
+6
-3
traceManager.js
libs/remix-lib/src/trace/traceManager.js
+3
-3
traceManager.js
libs/remix-lib/test/traceManager.js
+7
-8
No files found.
libs/remix-debug/src/debugger/VmDebugger.js
View file @
b87ae778
...
...
@@ -113,9 +113,12 @@ class VmDebuggerLogic {
}
catch
(
error
)
{
}
this
.
_traceManager
.
getCurrentStep
(
index
,
(
error
,
step
)
=>
{
this
.
event
.
trigger
(
'traceCurrentStepUpdate'
,
[
error
,
step
])
})
try
{
const
step
=
this
.
_traceManager
.
getCurrentStep
(
index
)
this
.
event
.
trigger
(
'traceCurrentStepUpdate'
,
[
null
,
step
])
}
catch
(
error
)
{
this
.
event
.
trigger
(
'traceCurrentStepUpdate'
,
[
error
])
}
try
{
const
addmem
=
this
.
_traceManager
.
getMemExpand
(
index
)
...
...
libs/remix-lib/src/trace/traceManager.js
View file @
b87ae778
...
...
@@ -200,13 +200,13 @@ TraceManager.prototype.getReturnValue = function (stepIndex) {
return
this
.
traceCache
.
returnValues
[
stepIndex
]
}
TraceManager
.
prototype
.
getCurrentStep
=
function
(
stepIndex
,
callback
)
{
TraceManager
.
prototype
.
getCurrentStep
=
function
(
stepIndex
)
{
try
{
this
.
checkRequestedStep
(
stepIndex
)
}
catch
(
check
)
{
return
callback
(
check
,
null
)
throw
new
Error
(
check
)
}
callback
(
null
,
this
.
traceCache
.
steps
[
stepIndex
])
return
this
.
traceCache
.
steps
[
stepIndex
]
}
TraceManager
.
prototype
.
getMemExpand
=
function
(
stepIndex
)
{
...
...
libs/remix-lib/test/traceManager.js
View file @
b87ae778
...
...
@@ -209,15 +209,14 @@ tape('TraceManager', function (t) {
})
t
.
test
(
'TraceManager.getCurrentStep'
,
function
(
st
)
{
traceManager
.
getCurrentStep
(
66
,
function
(
error
,
result
)
{
try
{
const
result
=
traceManager
.
getCurrentStep
(
66
)
console
.
log
(
result
)
if
(
error
)
{
st
.
fail
(
error
)
}
else
{
st
.
ok
(
result
===
2
)
st
.
end
()
}
})
st
.
ok
(
result
===
2
)
st
.
end
()
}
catch
(
error
)
{
st
.
fail
(
error
)
}
})
t
.
test
(
'TraceManager.getMemExpand'
,
function
(
st
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment