Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: src/serialize.cc

Issue 757983002: Reset code age on the cloned code when serializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index e502c9559fce70b186d4a911936bf042239e8c71..c2dd338b7ec5c3151a4f9e7606a324f72d9aa8d2 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -1874,6 +1874,8 @@ int Serializer::ObjectSerializer::OutputRawData(
// To make snapshots reproducible, we need to wipe out all pointers in code.
if (code_object_) {
Code* code = CloneCodeObject(object_);
+ // Code age headers are not serializable.
+ code->MakeYoung(serializer_->isolate());
WipeOutRelocations(code);
// We need to wipe out the header fields *after* wiping out the
// relocations, because some of these fields are needed for the latter.
@@ -2049,7 +2051,6 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
if (code_object != main_code_ && !FLAG_serialize_inner) {
SerializeBuiltin(Builtins::kCompileLazy, how_to_code, where_to_point);
} else {
- code_object->MakeYoung();
SerializeGeneric(code_object, how_to_code, where_to_point);
}
return;
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698