Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index 7d033c920415d5490daf25eaba53bafab9cb0943..8222ff66d85cfb11cc542ff6c0b6e850303ccdff 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -1747,6 +1747,12 @@ void Serializer::ObjectSerializer::Serialize() { |
PrintF("\n"); |
} |
+ if (object_->IsScript()) { |
+ // Clear cached line ends. |
+ Object* undefined = serializer_->isolate()->heap()->undefined_value(); |
+ Script::cast(object_)->set_line_ends(undefined); |
+ } |
+ |
if (object_->IsExternalString()) { |
Heap* heap = serializer_->isolate()->heap(); |
if (object_->map() != heap->native_source_string_map()) { |