http://codereview.chromium.org/3538005/diff/1/2 File src/compiler.cc (right):
http://codereview.chromium.org/3538005/diff/1/2#newcode409 src/compiler.cc:409: Handle<String>(String::cast(shared->name())), On 2010/09/30 09:11:41, Lasse Reichstein wrote:
Not your code, but how do we know that shared->name() isn't undefined? Could there be another function to call than shared->name() for the
case where
the result might be a non-string, so that ->name() always returns a
String? I actually think name should *be* a string so that name() always returns a string. JS is untyped, but there's no reason that our internal data structures (SharedFunctionInfo, FunctionTemplateInfo, etc) should be. As far as I know, name is either a non-empty string or undefined. That seems like too much cuteness. It ought to work to represent the absence of a name by an empty string. http://codereview.chromium.org/3538005/show -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
