| Index: src/snapshot/startup-serializer.cc
|
| diff --git a/src/snapshot/startup-serializer.cc b/src/snapshot/startup-serializer.cc
|
| index c71c16b1fdbae8b4eb60fc93fc48f145a596e763..9a38ceb2be32f881639f2787249431ccc6689054 100644
|
| --- a/src/snapshot/startup-serializer.cc
|
| +++ b/src/snapshot/startup-serializer.cc
|
| @@ -12,9 +12,10 @@ namespace internal {
|
|
|
| StartupSerializer::StartupSerializer(
|
| Isolate* isolate, SnapshotByteSink* sink,
|
| - FunctionCodeHandling function_code_handling)
|
| + v8::SnapshotCreator::FunctionCodeHandling function_code_handling)
|
| : Serializer(isolate, sink),
|
| - function_code_handling_(function_code_handling),
|
| + clear_function_code_(function_code_handling ==
|
| + v8::SnapshotCreator::FunctionCodeHandling::kClear),
|
| serializing_builtins_(false) {
|
| InitializeCodeAddressMap();
|
| }
|
| @@ -27,7 +28,7 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
|
| WhereToPoint where_to_point, int skip) {
|
| DCHECK(!obj->IsJSFunction());
|
|
|
| - if (function_code_handling_ == CLEAR_FUNCTION_CODE) {
|
| + if (clear_function_code_) {
|
| if (obj->IsCode()) {
|
| Code* code = Code::cast(obj);
|
| // If the function code is compiled (either as native code or bytecode),
|
| @@ -42,7 +43,6 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
|
| obj = isolate()->heap()->undefined_value();
|
| }
|
| } else if (obj->IsCode()) {
|
| - DCHECK_EQ(KEEP_FUNCTION_CODE, function_code_handling_);
|
| Code* code = Code::cast(obj);
|
| if (code->kind() == Code::FUNCTION) {
|
| code->ClearInlineCaches();
|
|
|