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) {
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);
}
}
......
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