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

Unified Diff: src/serialize.h

Issue 907013002: Add payload checksum to code cache data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments 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..ef23e2dd71c7448e749f349022e70759fa5a2700 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -946,9 +946,9 @@ class SerializedCodeData : public SerializedData {
explicit SerializedCodeData(ScriptData* data)
: SerializedData(const_cast<byte*>(data->data()), data->length()) {}
- bool IsSane(String* source);
+ bool IsSane(String* source) const;
- uint32_t SourceHash(String* source) { return source->length(); }
+ uint32_t SourceHash(String* source) const { return source->length(); }
// The data header consists of int-sized entries:
// [0] version hash
@@ -967,7 +967,10 @@ class SerializedCodeData : public SerializedData {
static const int kReservationsOffset = 5;
static const int kNumCodeStubKeysOffset = 6;
static const int kPayloadLengthOffset = 7;
- static const int kHeaderSize = (kPayloadLengthOffset + 1) * kIntSize;
+ static const int kChecksum1Offset = 8;
+ static const int kChecksum2Offset = 9;
+ static const int kHeaderSize =
+ POINTER_SIZE_ALIGN((kChecksum2Offset + 1) * kIntSize);
};
} } // namespace v8::internal
« 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