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

Unified Diff: src/serialize.h

Issue 803063002: Add a CHECK to make sure we don't accidentally 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/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index bd0c423a6aa8281838806e682afdabd7723b641e..aa9fc8073e7776498c23f2603c92783b2a53c14e 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -593,7 +593,8 @@ class CodeAddressMap;
// There can be only one serializer per V8 process.
class Serializer : public SerializerDeserializer {
public:
- Serializer(Isolate* isolate, SnapshotByteSink* sink);
+ Serializer(Isolate* isolate, SnapshotByteSink* sink,
+ bool allow_type_feedback);
~Serializer();
void VisitPointers(Object** start, Object** end) OVERRIDE;
@@ -725,6 +726,7 @@ class Serializer : public SerializerDeserializer {
// We map serialized large objects to indexes for back-referencing.
uint32_t large_objects_total_size_;
uint32_t seen_large_objects_index_;
+ bool allow_type_feedback_;
DISALLOW_COPY_AND_ASSIGN(Serializer);
};
@@ -732,11 +734,10 @@ class Serializer : public SerializerDeserializer {
class PartialSerializer : public Serializer {
public:
- PartialSerializer(Isolate* isolate,
- Serializer* startup_snapshot_serializer,
+ PartialSerializer(Isolate* isolate, Serializer* startup_snapshot_serializer,
SnapshotByteSink* sink)
- : Serializer(isolate, sink),
- startup_serializer_(startup_snapshot_serializer) {
+ : Serializer(isolate, sink, true),
+ startup_serializer_(startup_snapshot_serializer) {
InitializeCodeAddressMap();
}
@@ -769,7 +770,7 @@ class PartialSerializer : public Serializer {
class StartupSerializer : public Serializer {
public:
StartupSerializer(Isolate* isolate, SnapshotByteSink* sink)
- : Serializer(isolate, sink), root_index_wave_front_(0) {
+ : Serializer(isolate, sink, true), root_index_wave_front_(0) {
// Clear the cache of objects used by the partial snapshot. After the
// strong roots have been serialized we can create a partial snapshot
// which will repopulate the cache with objects needed by that partial
@@ -827,7 +828,7 @@ class CodeSerializer : public Serializer {
private:
CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source,
Code* main_code)
- : Serializer(isolate, sink),
+ : Serializer(isolate, sink, false),
source_(source),
main_code_(main_code),
num_internalized_strings_(0) {
« no previous file with comments | « no previous file | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698