mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
internal/jsre: remove unused timer arguments allocation
This commit is contained in:
parent
ef815c59a2
commit
1efbfce660
1 changed files with 0 additions and 11 deletions
|
|
@ -186,17 +186,6 @@ loop:
|
||||||
select {
|
select {
|
||||||
case timer := <-ready:
|
case timer := <-ready:
|
||||||
// execute callback, remove/reschedule the timer
|
// execute callback, remove/reschedule the timer
|
||||||
var arguments []interface{}
|
|
||||||
if len(timer.call.Arguments) > 2 {
|
|
||||||
tmp := timer.call.Arguments[2:]
|
|
||||||
arguments = make([]interface{}, 2+len(tmp))
|
|
||||||
for i, value := range tmp {
|
|
||||||
arguments[i+2] = value
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
arguments = make([]interface{}, 1)
|
|
||||||
}
|
|
||||||
arguments[0] = timer.call.Arguments[0]
|
|
||||||
call, isFunc := goja.AssertFunction(timer.call.Arguments[0])
|
call, isFunc := goja.AssertFunction(timer.call.Arguments[0])
|
||||||
if !isFunc {
|
if !isFunc {
|
||||||
panic(re.vm.ToValue("js error: timer/timeout callback is not a function"))
|
panic(re.vm.ToValue("js error: timer/timeout callback is not a function"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue