Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 20b71391bad31a8bb8a83ad3a86dad814b102ea4..9876a61935d2a98588c9b22561e078c4701a1189 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -6859,6 +6859,12 @@ Object* Dictionary::TransformPropertiesToFastFor(JSObject* obj, |
void Script::InitLineEnds() { |
if (!line_ends()->IsUndefined()) return; |
+ if (source()->IsUndefined()) { |
+ set_line_ends(*(Factory::NewArrayLiteral(0))); |
Søren Thygesen Gjesse
2009/02/24 13:23:52
Please use NewJSArray.
Mikhail Naganov
2009/02/24 13:41:01
Um, but 'NewArrayLiteral' uses NewJSArrayWithEleme
|
+ ASSERT(line_ends()->IsJSArray()); |
+ return; |
+ } |
+ |
Handle<String> src(String::cast(source())); |
const int src_len = src->length(); |
Handle<String> new_line = Factory::NewStringFromAscii(CStrVector("\n")); |