decrease max clone depth
This commit is contained in:
parent
1da603d7cb
commit
6c390f5f68
|
|
@ -93,8 +93,9 @@ var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos
|
|||
var AST_Node = DEFNODE("Node", "start end", {
|
||||
_clone: function(deep, depth) {
|
||||
if (typeof depth == "undefined") depth = 0;
|
||||
if (depth++ > 1000) {
|
||||
throw new Error("clone depth exceeded (" + this.start.line + ", " + this.start.col + ")");
|
||||
if (depth++ > 500) {
|
||||
throw new Error("maximum clone depth exceeded (" +
|
||||
this.start.file + ":" + this.start.line + ":" + this.start.col + ")");
|
||||
}
|
||||
if (deep) {
|
||||
var self = this.clone(false, depth);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user