You can set the client.jsi.maxBranches parameter, in the default.cfg file to specify the maximum number of JavaScript branches for each JavaScript evaluation. This parameter is used to interrupt infinite loops from possibly malicious scripts.
The default value for this parameter is 100000, and it accepts only integer values.