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

Side by Side Diff: src/serialize.cc

Issue 10915277: Fix test failures on nosnap builder. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/snapshot-common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 void Serializer::Pad() { 1611 void Serializer::Pad() {
1612 // The non-branching GetInt will read up to 3 bytes too far, so we need 1612 // The non-branching GetInt will read up to 3 bytes too far, so we need
1613 // to pad the snapshot to make sure we don't read over the end. 1613 // to pad the snapshot to make sure we don't read over the end.
1614 for (unsigned i = 0; i < sizeof(int32_t) - 1; i++) { 1614 for (unsigned i = 0; i < sizeof(int32_t) - 1; i++) {
1615 sink_->Put(kNop, "Padding"); 1615 sink_->Put(kNop, "Padding");
1616 } 1616 }
1617 } 1617 }
1618 1618
1619 1619
1620 bool SnapshotByteSource::AtEOF() { 1620 bool SnapshotByteSource::AtEOF() {
1621 if (0u + length_ - position_ > sizeof(uint32_t)) return false; 1621 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1622 for (int x = position_; x < length_; x++) { 1622 for (int x = position_; x < length_; x++) {
1623 if (data_[x] != SerializerDeserializer::nop()) return false; 1623 if (data_[x] != SerializerDeserializer::nop()) return false;
1624 } 1624 }
1625 return true; 1625 return true;
1626 } 1626 }
1627 1627
1628 } } // namespace v8::internal 1628 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698