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

Unified Diff: src/serialize.h

Issue 909493002: Add DCHECKs to back reference deserialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: moved to debug mode Created 5 years, 10 months 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 444e881e25b23b596b595a3f8504e55087724b31..0686048efbad7242367166414faf6fd8b9a4f00f 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -225,6 +225,12 @@ class BackReference {
return ChunkOffsetBits::decode(bitfield_) << kObjectAlignmentBits;
}
+ uint32_t large_object_index() const {
+ DCHECK(is_valid());
+ DCHECK(chunk_index() == 0);
+ return ChunkOffsetBits::decode(bitfield_);
+ }
+
uint32_t chunk_index() const {
DCHECK(is_valid());
return ChunkIndexBits::decode(bitfield_);
@@ -699,7 +705,8 @@ class Serializer : public SerializerDeserializer {
}
}
- void InitializeAllocators();
+ bool BackReferenceIsAlreadyAllocated(BackReference back_reference);
+
// This will return the space for an object.
static AllocationSpace SpaceOfObject(HeapObject* object);
BackReference AllocateLargeObject(int size);
« 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