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

Unified Diff: src/serialize.cc

Issue 804933002: Make sure we don't accidentially serialize type feedback (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | src/type-feedback-vector.h » ('j') | 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 01c55a1226efedc5cca0d8bc1f80ad99dede6ba4..af8b3d012a384716b43d9dc77bfa9a6dd4d4b27c 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -2075,6 +2075,12 @@ ScriptData* CodeSerializer::Serialize(Isolate* isolate,
PrintF("]\n");
}
+ // The type feedback vector of this function must be clear.
+ if (info->feedback_vector()->IsCleared()) {
+ UNREACHABLE();
+ info->ClearTypeFeedbackInfo();
+ }
+
// Serialize code object.
SnapshotByteSink sink(info->code()->CodeSize() * 2);
CodeSerializer cs(isolate, &sink, *source, info->code());
« no previous file with comments | « no previous file | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698