Index: src/snapshot/serialize.cc |
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc |
index b1bca7bbd88b4e645ccb227fefb5ceb59e918ff9..d66a397b180a9ac5c8c121ef2702baa84980d340 100644 |
--- a/src/snapshot/serialize.cc |
+++ b/src/snapshot/serialize.cc |
@@ -776,7 +776,8 @@ void Deserializer::CommitPostProcessedObjects(Isolate* isolate) { |
// Assign a new script id to avoid collision. |
script->set_id(isolate_->heap()->NextScriptId()); |
// Add script to list. |
- heap->set_script_list(*WeakFixedArray::Add(factory->script_list(), script)); |
+ Handle<Object> list = WeakFixedArray::Add(factory->script_list(), script); |
+ heap->SetRootScriptList(*list); |
} |
} |