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

Unified Diff: src/snapshot-source-sink.cc

Issue 671633004: Make block writes in the serializer more efficient. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
Index: src/snapshot-source-sink.cc
diff --git a/src/snapshot-source-sink.cc b/src/snapshot-source-sink.cc
index 8e3b8a9d4436a88680fde5f8ee7ef4a964ead227..9935ff73963c7e157b40b33c3e4c2da6dbe5b380 100644
--- a/src/snapshot-source-sink.cc
+++ b/src/snapshot-source-sink.cc
@@ -54,9 +54,7 @@ void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
void SnapshotByteSink::PutRaw(byte* data, int number_of_bytes,
const char* description) {
- for (int i = 0; i < number_of_bytes; ++i) {
- Put(data[i], description);
- }
+ data_.AddAll(Vector<byte>(data, number_of_bytes));
}
void SnapshotByteSink::PutBlob(byte* data, int number_of_bytes,

Powered by Google App Engine
This is Rietveld 408576698