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
abc2b356
Commit
abc2b356
authored
Jan 19, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not update the treeview if error
parent
a4a00480
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
localDecoder.js
src/solidity/localDecoder.js
+2
-1
SolidityLocals.js
src/ui/SolidityLocals.js
+17
-5
SolidityState.js
src/ui/SolidityState.js
+11
-3
No files found.
src/solidity/localDecoder.js
View file @
abc2b356
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
function
solidityLocals
(
vmtraceIndex
,
internalTreeCall
,
stack
,
memory
)
{
function
solidityLocals
(
vmtraceIndex
,
internalTreeCall
,
stack
,
memory
)
{
var
scope
=
internalTreeCall
.
findScope
(
vmtraceIndex
)
var
scope
=
internalTreeCall
.
findScope
(
vmtraceIndex
)
if
(
!
scope
)
{
if
(
!
scope
)
{
return
{
'error'
:
'Can
\'
t display locals. reason: compilation result might not have been provided'
}
var
error
=
{
'message'
:
'Can
\'
t display locals. reason: compilation result might not have been provided'
}
throw
error
}
}
var
locals
=
{}
var
locals
=
{}
memory
=
formatMemory
(
memory
)
memory
=
formatMemory
(
memory
)
...
...
src/ui/SolidityLocals.js
View file @
abc2b356
...
@@ -16,20 +16,28 @@ class SolidityLocals {
...
@@ -16,20 +16,28 @@ class SolidityLocals {
extractData
:
solidityTypeFormatter
.
extractData
extractData
:
solidityTypeFormatter
.
extractData
})
})
this
.
init
()
this
.
init
()
this
.
view
}
}
render
()
{
render
()
{
return
yo
`<div id='soliditylocals' >
${
this
.
basicPanel
.
render
()}
</div>`
this
.
view
=
yo
`<div id='soliditylocals' >
<div id='warning'></div>
${
this
.
basicPanel
.
render
()}
</div>`
return
this
.
view
}
}
init
()
{
init
()
{
this
.
parent
.
event
.
register
(
'indexChanged'
,
this
,
(
index
)
=>
{
this
.
parent
.
event
.
register
(
'indexChanged'
,
this
,
(
index
)
=>
{
var
warningDiv
=
this
.
view
.
querySelector
(
'#warning'
)
warningDiv
.
innerHTML
=
''
if
(
index
<
0
)
{
if
(
index
<
0
)
{
this
.
basicPanel
.
update
({
info
:
'invalid step index'
})
warningDiv
.
innerHTML
=
'invalid step index'
return
return
}
}
if
(
this
.
parent
.
currentStepIndex
!==
index
)
return
if
(
this
.
parent
.
currentStepIndex
!==
index
)
return
this
.
traceManager
.
waterfall
([
this
.
traceManager
.
waterfall
([
this
.
traceManager
.
getStackAt
,
this
.
traceManager
.
getStackAt
,
this
.
traceManager
.
getMemoryAt
],
this
.
traceManager
.
getMemoryAt
],
...
@@ -38,8 +46,12 @@ class SolidityLocals {
...
@@ -38,8 +46,12 @@ class SolidityLocals {
if
(
!
error
)
{
if
(
!
error
)
{
var
stack
=
result
[
0
].
value
var
stack
=
result
[
0
].
value
var
memory
=
result
[
1
].
value
var
memory
=
result
[
1
].
value
var
locals
=
localDecoder
.
solidityLocals
(
index
,
this
.
internalTreeCall
,
stack
,
memory
)
try
{
this
.
basicPanel
.
update
(
locals
)
var
locals
=
localDecoder
.
solidityLocals
(
index
,
this
.
internalTreeCall
,
stack
,
memory
)
this
.
basicPanel
.
update
(
locals
)
}
catch
(
e
)
{
warningDiv
.
innerHTML
=
e
.
message
}
}
}
})
})
})
})
...
...
src/ui/SolidityState.js
View file @
abc2b356
...
@@ -15,22 +15,30 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
...
@@ -15,22 +15,30 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
extractData
:
solidityTypeFormatter
.
extractData
extractData
:
solidityTypeFormatter
.
extractData
})
})
this
.
init
()
this
.
init
()
this
.
view
}
}
SolidityState
.
prototype
.
render
=
function
()
{
SolidityState
.
prototype
.
render
=
function
()
{
return
yo
`<div id='soliditystate' >
${
this
.
basicPanel
.
render
()}
</div>`
this
.
view
=
yo
`<div id='soliditystate' >
<div id='warning'></div>
${
this
.
basicPanel
.
render
()}
</div>`
return
this
.
view
}
}
SolidityState
.
prototype
.
init
=
function
()
{
SolidityState
.
prototype
.
init
=
function
()
{
var
self
=
this
var
self
=
this
this
.
parent
.
event
.
register
(
'indexChanged'
,
this
,
function
(
index
)
{
this
.
parent
.
event
.
register
(
'indexChanged'
,
this
,
function
(
index
)
{
var
warningDiv
=
this
.
view
.
querySelector
(
'#warning'
)
warningDiv
.
innerHTML
=
''
if
(
index
<
0
)
{
if
(
index
<
0
)
{
self
.
basicPanel
.
update
({
info
:
'invalid step index'
})
warningDiv
.
innerHTML
=
'invalid step index'
return
return
}
}
if
(
self
.
parent
.
currentStepIndex
!==
index
)
return
if
(
self
.
parent
.
currentStepIndex
!==
index
)
return
if
(
!
this
.
solidityProxy
.
loaded
())
{
if
(
!
this
.
solidityProxy
.
loaded
())
{
self
.
basicPanel
.
update
({
info
:
'no source has been specified'
})
warningDiv
.
innerHTML
=
'no source has been specified'
return
return
}
}
...
...
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