Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1610)

Unified Diff: src/v8natives.js

Issue 8271028: Port r9116 to the 3.5 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.5
Patch Set: Upped version Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 035fd2e2be11bc11679e936031377cb2699c82f4..982e18e4d5564cc6874e215eaf86b6d94bf699ec 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -106,13 +106,16 @@ function GlobalParseInt(string, radix) {
// Truncate number.
return string | 0;
}
+ string = TO_STRING_INLINE(string);
radix = radix | 0;
} else {
+ // The spec says ToString should be evaluated before ToInt32.
+ string = TO_STRING_INLINE(string);
radix = TO_INT32(radix);
if (!(radix == 0 || (2 <= radix && radix <= 36)))
return $NaN;
}
- string = TO_STRING_INLINE(string);
+
if (%_HasCachedArrayIndex(string) &&
(radix == 0 || radix == 10)) {
return %_GetCachedArrayIndex(string);
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698