> + if (source()->IsUndefined()) {
> + set_line_ends(*(Factory::NewArrayLiteral(0)));
> + ASSERT(line_ends()->IsJSArray());
> + return;
> + }
> +
It might be slightly safer to check !source()->IsString() here - and
maybe assert that if we aren't dealing with a string, then we have an
undefined value on our hands:
if (!source()->IsString()) {
ASSERT(source()->IsUndefined());
...
}
Cheers,
Kasper
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---