http://codereview.chromium.org/1985004/diff/2002/9002 File src/top.cc (right):
http://codereview.chromium.org/1985004/diff/2002/9002#newcode422 src/top.cc:422: if (fun_name->ToBoolean()->IsFalse()) { On 2010/05/07 07:57:06, Søren Gjesse wrote:
Any reason for changing this?
I just looked at the code, and we have at least three ways of checking
this
if (!fun_name->IsString()) if (fun_name->IsUndefined()) if (fun_name->ToBoolean()->IsFalse())
I think we should be consistent, so I suggest adding a function called
something
likeGetNameOrInferredName/GetDisplayName/GetFriendlyName to JSFunction
and use
that in all places where the inferred name is returned if no actual
name is
found.
I can do this as a separate change. But I'm too not quite understanding, why use such extravagant "ToBoolean()->IsFalse()" check. Using "shared->name()->IsUndefined()" is more straightforward. http://codereview.chromium.org/1985004/show -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
