Chromium Code Reviews| Index: src/v8natives.js |
| diff --git a/src/v8natives.js b/src/v8natives.js |
| index db9213215f7514fd78f767dc60a660e260c63170..43d72cd59c634be2fe464cf86c6f43bd3f650be3 100644 |
| --- a/src/v8natives.js |
| +++ b/src/v8natives.js |
| @@ -1767,7 +1767,8 @@ function NewFunction(arg1) { // length == 1 |
| // If the formal parameters string include ) - an illegal |
| // character - it may make the combined function expression |
| // compile. We avoid this problem by checking for this early on. |
| - if (p.indexOf(')') != -1) throw MakeSyntaxError('paren_in_arg_string',[]); |
| + if (%_CallFunction(p, ')', StringIndexOf) != -1) |
| + throw MakeSyntaxError('paren_in_arg_string',[]); |
|
Michael Starzinger
2013/05/15 10:41:18
nit: Either add curly braces around the body or in
|
| // If the formal parameters include an unbalanced block comment, the |
| // function must be rejected. Since JavaScript does not allow nested |
| // comments we can include a trailing block comment to catch this. |