Clear cached line ends array when serializing script object.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/790433002

Cr-Commit-Position: refs/heads/master@{#25703}
This commit is contained in:
yangguo 2014-12-08 02:23:03 -08:00 committed by Commit bot
parent 7a21cf2f77
commit 58fe6e732e

View File

@ -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()) {