Commit 07ac7a40 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fix test failures on nosnap builder.

Review URL: https://chromiumcodereview.appspot.com/10915277

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ad4746c8
......@@ -1618,7 +1618,7 @@ void Serializer::Pad() {
bool SnapshotByteSource::AtEOF() {
if (0u + length_ - position_ > sizeof(uint32_t)) return false;
if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
for (int x = position_; x < length_; x++) {
if (data_[x] != SerializerDeserializer::nop()) return false;
}
......
......@@ -86,10 +86,13 @@ bool Snapshot::Initialize(const char* snapshot_file) {
int len;
byte* str = ReadBytes(snapshot_file, &len);
if (!str) return false;
SnapshotByteSource source(str, len);
Deserializer deserializer(&source);
ReserveSpaceForSnapshot(&deserializer, snapshot_file);
bool success = V8::Initialize(&deserializer);
bool success;
{
SnapshotByteSource source(str, len);
Deserializer deserializer(&source);
ReserveSpaceForSnapshot(&deserializer, snapshot_file);
success = V8::Initialize(&deserializer);
}
DeleteArray(str);
return success;
} else if (size_ > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment