Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index fc3106e34783fc978c1cc55b735711291dbf1f9d..dbecdc907c49b40868f1e2a4b1faebc0928c3e86 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -6953,8 +6953,9 @@ Object* Dictionary::TransformPropertiesToFastFor(JSObject* obj, |
void Script::InitLineEnds() { |
if (!line_ends()->IsUndefined()) return; |
- if (source()->IsUndefined()) { |
- set_line_ends(*(Factory::NewArrayLiteral(0))); |
+ if (!source()->IsString()) { |
+ ASSERT(source()->IsUndefined()); |
+ set_line_ends(*(Factory::NewJSArray(0))); |
ASSERT(line_ends()->IsJSArray()); |
return; |
} |