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
This commit is contained in:
parent
ad4746c8a3
commit
07ac7a4032
@ -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;
|
||||
bool success;
|
||||
{
|
||||
SnapshotByteSource source(str, len);
|
||||
Deserializer deserializer(&source);
|
||||
ReserveSpaceForSnapshot(&deserializer, snapshot_file);
|
||||
bool success = V8::Initialize(&deserializer);
|
||||
success = V8::Initialize(&deserializer);
|
||||
}
|
||||
DeleteArray(str);
|
||||
return success;
|
||||
} else if (size_ > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user