Chromium Code Reviews| Index: src/v8natives.js |
| =================================================================== |
| --- src/v8natives.js (revision 6877) |
| +++ src/v8natives.js (working copy) |
| @@ -92,7 +92,7 @@ |
| // ECMA-262 - 15.1.2.2 |
| function GlobalParseInt(string, radix) { |
| - if (IS_UNDEFINED(radix)) { |
| + if (IS_UNDEFINED(radix) || radix == 10 || radix == 0) { |
|
Erik Corry
2011/02/22 08:53:05
I think you want === here.
Mads Ager (chromium)
2011/02/22 08:53:55
Erik suggests using === here. I agree with that an
sandholm
2011/02/22 08:59:57
Done.
sandholm
2011/02/22 08:59:57
Done.
|
| // Some people use parseInt instead of Math.floor. This |
| // optimization makes parseInt on a Smi 12 times faster (60ns |
| // vs 800ns). The following optimization makes parseInt on a |