| Index: src/snapshot/serialize.cc
|
| diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
|
| index fe33c3e8b2d71e86aa6322ab5ff69700baa7b298..c65bae0dd658321cf4034e5361d03c4bf22e094a 100644
|
| --- a/src/snapshot/serialize.cc
|
| +++ b/src/snapshot/serialize.cc
|
| @@ -1871,6 +1871,10 @@ void Serializer::ObjectSerializer::Serialize() {
|
| // Clear cached line ends.
|
| Object* undefined = serializer_->isolate()->heap()->undefined_value();
|
| Script::cast(object_)->set_line_ends(undefined);
|
| + Object* shared_list = Script::cast(object_)->shared_function_infos();
|
| + if (shared_list->IsWeakFixedArray()) {
|
| + WeakFixedArray::cast(shared_list)->Compact();
|
| + }
|
| }
|
|
|
| if (object_->IsExternalString()) {
|
| @@ -2291,7 +2295,7 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
|
| DCHECK(code_object->has_reloc_info_for_serialization());
|
| // Only serialize the code for the toplevel function unless specified
|
| // by flag. Replace code of inner functions by the lazy compile builtin.
|
| - // This is safe, as checked in Compiler::BuildFunctionInfo.
|
| + // This is safe, as checked in Compiler::GetSharedFunctionInfo.
|
| if (code_object != main_code_ && !FLAG_serialize_inner) {
|
| SerializeBuiltin(Builtins::kCompileLazy, how_to_code, where_to_point);
|
| } else {
|
|
|