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
b9acaa55
Commit
b9acaa55
authored
Jun 23, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address code review: guard against infinite recursion; fix array inside array
parent
1bcbfe6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
internalCallTree.js
remix-debug/src/solidity-decoder/internalCallTree.js
+4
-1
No files found.
remix-debug/src/solidity-decoder/internalCallTree.js
View file @
b9acaa55
...
@@ -108,7 +108,10 @@ class InternalCallTree {
...
@@ -108,7 +108,10 @@ class InternalCallTree {
let
scopeId
=
this
.
scopeStarts
[
scope
.
firstStep
]
let
scopeId
=
this
.
scopeStarts
[
scope
.
firstStep
]
let
functions
=
[]
let
functions
=
[]
if
(
!
scopeId
)
return
functions
if
(
!
scopeId
)
return
functions
let
i
=
0
while
(
true
)
{
while
(
true
)
{
i
+=
1
if
(
i
>
1000
)
throw
new
Error
(
'retrieFunctionStack: recursion too deep'
)
let
functionDefinition
=
this
.
functionDefinitionsByScope
[
scopeId
]
let
functionDefinition
=
this
.
functionDefinitionsByScope
[
scopeId
]
if
(
functionDefinition
!==
undefined
)
{
if
(
functionDefinition
!==
undefined
)
{
functions
.
push
(
functionDefinition
)
functions
.
push
(
functionDefinition
)
...
@@ -268,7 +271,7 @@ function includeVariableDeclaration (tree, step, sourceLocation, scopeId, newLoc
...
@@ -268,7 +271,7 @@ function includeVariableDeclaration (tree, step, sourceLocation, scopeId, newLoc
}
}
// input params
// input params
if
(
inputs
)
{
if
(
inputs
)
{
functionDefinitionAndInputs
.
inputs
.
push
(
addParams
(
inputs
,
tree
,
scopeId
,
states
,
contractName
,
previousSourceLocation
,
stack
.
length
,
inputs
.
children
.
length
,
-
1
)
)
functionDefinitionAndInputs
.
inputs
=
addParams
(
inputs
,
tree
,
scopeId
,
states
,
contractName
,
previousSourceLocation
,
stack
.
length
,
inputs
.
children
.
length
,
-
1
)
}
}
// output params
// output params
if
(
outputs
)
addParams
(
outputs
,
tree
,
scopeId
,
states
,
contractName
,
previousSourceLocation
,
stack
.
length
,
0
,
1
)
if
(
outputs
)
addParams
(
outputs
,
tree
,
scopeId
,
states
,
contractName
,
previousSourceLocation
,
stack
.
length
,
0
,
1
)
...
...
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