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

Unified Diff: src/array.js

Issue 5516013: Fix sputnik regression introduced in r5943. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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
===================================================================
--- src/array.js (revision 5943)
+++ src/array.js (working copy)
@@ -168,14 +168,18 @@
function ConvertToLocaleString(e) {
- // e_obj's toLocaleString might be overwritten, check if it is a function.
- // Call ConvertToString if toLocaleString is not a function.
- // See issue 877615.
- var e_obj = ToObject(e);
- if (IS_FUNCTION(e_obj.toLocaleString))
- return ToString(e_obj.toLocaleString());
- else
- return ConvertToString(e);
+ if (e == null) {
+ return '';
+ } else {
+ // e_obj's toLocaleString might be overwritten, check if it is a function.
+ // Call ToString if toLocaleString is not a function.
+ // See issue 877615.
+ var e_obj = ToObject(e);
+ if (IS_FUNCTION(e_obj.toLocaleString))
+ return ToString(e_obj.toLocaleString());
+ else
+ return ToString(e);
+ }
}
« 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