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
98494c3d
Commit
98494c3d
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 buildCallPath
parent
a2056a49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
stepManager.js
libs/remix-debug/src/debugger/stepManager.js
+4
-5
traceManager.js
libs/remix-lib/src/trace/traceManager.js
+4
-4
No files found.
libs/remix-debug/src/debugger/stepManager.js
View file @
98494c3d
...
@@ -41,11 +41,7 @@ class DebuggerStepManager {
...
@@ -41,11 +41,7 @@ class DebuggerStepManager {
if
(
index
<
0
)
return
if
(
index
<
0
)
return
if
(
this
.
currentStepIndex
!==
index
)
return
if
(
this
.
currentStepIndex
!==
index
)
return
this
.
traceManager
.
buildCallPath
(
index
,
(
error
,
callsPath
)
=>
{
this
.
traceManager
.
buildCallPath
(
index
).
then
((
callsPath
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
return
this
.
event
.
trigger
(
'revertWarning'
,
[
''
])
}
this
.
currentCall
=
callsPath
[
callsPath
.
length
-
1
]
this
.
currentCall
=
callsPath
[
callsPath
.
length
-
1
]
if
(
this
.
currentCall
.
reverted
)
{
if
(
this
.
currentCall
.
reverted
)
{
let
revertedReason
=
this
.
currentCall
.
outofgas
?
'outofgas'
:
''
let
revertedReason
=
this
.
currentCall
.
outofgas
?
'outofgas'
:
''
...
@@ -59,6 +55,9 @@ class DebuggerStepManager {
...
@@ -59,6 +55,9 @@ class DebuggerStepManager {
this
.
event
.
trigger
(
'revertWarning'
,
[
'parenthasthrown'
])
this
.
event
.
trigger
(
'revertWarning'
,
[
'parenthasthrown'
])
}
}
this
.
event
.
trigger
(
'revertWarning'
,
[
''
])
this
.
event
.
trigger
(
'revertWarning'
,
[
''
])
}).
catch
((
error
)
=>
{
console
.
log
(
error
)
this
.
event
.
trigger
(
'revertWarning'
,
[
''
])
})
})
})
})
}
}
...
...
libs/remix-lib/src/trace/traceManager.js
View file @
98494c3d
...
@@ -101,15 +101,15 @@ TraceManager.prototype.getCallDataAt = function (stepIndex) {
...
@@ -101,15 +101,15 @@ TraceManager.prototype.getCallDataAt = function (stepIndex) {
return
[
this
.
traceCache
.
callsData
[
callDataChange
]]
return
[
this
.
traceCache
.
callsData
[
callDataChange
]]
}
}
TraceManager
.
prototype
.
buildCallPath
=
function
(
stepIndex
,
callback
)
{
TraceManager
.
prototype
.
buildCallPath
=
function
(
stepIndex
)
{
try
{
try
{
this
.
checkRequestedStep
(
stepIndex
)
this
.
checkRequestedStep
(
stepIndex
)
}
catch
(
check
)
{
}
catch
(
check
)
{
return
callback
(
check
,
null
)
throw
new
Error
(
check
)
}
}
const
callsPath
=
util
.
buildCallPath
(
stepIndex
,
this
.
traceCache
.
callsTree
.
call
)
const
callsPath
=
util
.
buildCallPath
(
stepIndex
,
this
.
traceCache
.
callsTree
.
call
)
if
(
callsPath
===
null
)
return
callback
(
'no call path built'
,
null
)
if
(
callsPath
===
null
)
throw
new
Error
(
'no call path built'
)
callback
(
null
,
callsPath
)
return
callsPath
}
}
TraceManager
.
prototype
.
getCallStackAt
=
function
(
stepIndex
)
{
TraceManager
.
prototype
.
getCallStackAt
=
function
(
stepIndex
)
{
...
...
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