mirror of https://github.com/lukechilds/node.git
Browse Source
In REPL, if we evaluate the `RegExp` object's predefined properties, and if they happen to have the same expression, for example, > RegExp.$1 'RegExp.$1' then doing `eval(RegExp.$1)` would evaluate `RegExp.$1` recursively and eventually throw `RangeError: Maximum call stack size exceeded`. This patch stores the old values of `RegExp`'s predefined proprties in an array and restores them just before the current expression entered by user is evaluated. Fixes: https://github.com/nodejs/io.js/issues/597 PR-URL: https://github.com/nodejs/io.js/pull/2137 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>v4.0.0-rc
Sakthipriyan Vairamani
10 years ago
2 changed files with 26 additions and 0 deletions
Loading…
Reference in new issue