Chromium Code Reviews| Index: src/v8natives.js |
| diff --git a/src/v8natives.js b/src/v8natives.js |
| index 6ad4a0c75bdb1648492c56ced8170c61faa7749c..4710dc799b095c206dbcae4a11145af3494c86c3 100644 |
| --- a/src/v8natives.js |
| +++ b/src/v8natives.js |
| @@ -106,11 +106,12 @@ function GlobalParseInt(string, radix) { |
| // Truncate number. |
| return string | 0; |
| } |
| - if (IS_UNDEFINED(radix)) radix = 0; |
| + radix = radix || 0; |
| } else { |
| radix = TO_INT32(radix); |
| - if (!(radix == 0 || (2 <= radix && radix <= 36))) |
| + if (!(radix == 0 || (2 <= radix && radix <= 36))) { |
| return $NaN; |
| + } |
| } |
| string = TO_STRING_INLINE(string); |
| if (%_HasCachedArrayIndex(string) && |