mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
add simple stack depth limit mechanism
This commit is contained in:
4
otto.go
4
otto.go
@@ -367,6 +367,10 @@ func (self Otto) SetRandomSource(fn func() float64) {
|
||||
self.runtime.random = fn
|
||||
}
|
||||
|
||||
func (self Otto) SetStackDepthLimit(limit int) {
|
||||
self.runtime.stackLimit = limit
|
||||
}
|
||||
|
||||
// Context is a structure that contains information about the current execution
|
||||
// context.
|
||||
type Context struct {
|
||||
|
||||
Reference in New Issue
Block a user