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

Unified Diff: src/array.js

Issue 1390893003: Remove ToObject on elements from Array.prototype.toLocaleString() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index 7e7ad2f88758e632c74e085009a6b888105e291b..462e5281374689929ff2fadb8e241ff6a38ba114 100644
--- a/src/array.js
+++ b/src/array.js
@@ -217,11 +217,7 @@ function ConvertToLocaleString(e) {
if (IS_NULL_OR_UNDEFINED(e)) {
return '';
} else {
- // According to ES5, section 15.4.4.3, the toLocaleString conversion
- // must throw a TypeError if ToObject(e).toLocaleString isn't
- // callable.
- var e_obj = TO_OBJECT(e);
- return TO_STRING(e_obj.toLocaleString());
+ return TO_STRING(e.toLocaleString());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698