Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index 86bbfce3c78bf051b1c6067189aa8021d2763cb2..3a3a94144730e2c3c3c51ae3846242e74b7c114e 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -1532,6 +1532,10 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, |
return; |
} |
+ if (obj->IsCode() && Code::cast(obj)->kind() == Code::FUNCTION) { |
+ obj = isolate()->builtins()->builtin(Builtins::kCompileLazy); |
+ } |
+ |
if (SerializeKnownObject(obj, how_to_code, where_to_point, skip)) return; |
FlushSkip(skip); |