Index: src/handles.cc |
diff --git a/src/handles.cc b/src/handles.cc |
index 7a46bc3ea251fc6232b769ee0c4232c279306ae2..1364951b714ceb2c87731312f77ff1427ad98f5f 100644 |
--- a/src/handles.cc |
+++ b/src/handles.cc |
@@ -499,6 +499,10 @@ void InitScriptLineEnds(Handle<Script> script) { |
Handle<FixedArray> array = CalculateLineEnds(src, true); |
+ if (*array != Heap::empty_fixed_array()) { |
+ array->set_map(Heap::fixed_cow_array_map()); |
+ } |
+ |
script->set_line_ends(*array); |
ASSERT(script->line_ends()->IsFixedArray()); |
} |