Commit 23c07cd4 authored by sandholm@chromium.org's avatar sandholm@chromium.org

Fix sputnik regression introduced in r5943.

Review URL: http://codereview.chromium.org/5516013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b36e346a
...@@ -168,14 +168,18 @@ function ConvertToString(x) { ...@@ -168,14 +168,18 @@ function ConvertToString(x) {
function ConvertToLocaleString(e) { function ConvertToLocaleString(e) {
// e_obj's toLocaleString might be overwritten, check if it is a function. if (e == null) {
// Call ConvertToString if toLocaleString is not a function. return '';
// See issue 877615. } else {
var e_obj = ToObject(e); // e_obj's toLocaleString might be overwritten, check if it is a function.
if (IS_FUNCTION(e_obj.toLocaleString)) // Call ToString if toLocaleString is not a function.
return ToString(e_obj.toLocaleString()); // See issue 877615.
else var e_obj = ToObject(e);
return ConvertToString(e); if (IS_FUNCTION(e_obj.toLocaleString))
return ToString(e_obj.toLocaleString());
else
return ToString(e);
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment