boa
boa copied to clipboard
Bug on set_loop_iteration_limit on ''.repeat
Describe the bug When I call set_loop_iteration_limit and then evaluate code with ''.repeat, the repeat functionality does not respect the set loop iteration limit. The code below gets stuck in a loop.
To Reproduce
let arr = [];
while (true) {
arr.push(' '.repeat(1024 * 1024));
}
Expected behavior The .repeat function should stop iterating when set_loop_iteration_limit is set, similar to how it works with normal loops.
Build environment:
- OS: macOS
- Version: 14.4.1 (23E224)
- Rustc version: rustc 1.77.2 (25ef9e3d8 2024-04-09)