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

Unified Diff: pickle.cc

Issue 2050803003: Update to Chromium //base at Chromium commit e3a753f17bac62738b0dbf0b36510f767b081e4b. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « pickle.h ('k') | pickle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pickle.cc
diff --git a/pickle.cc b/pickle.cc
index d4487d45b24d61238309d3db48b1f17f4f2e0cca..7c8ffed4a266c270bf4256402312d353536157bf 100644
--- a/pickle.cc
+++ b/pickle.cc
@@ -254,9 +254,8 @@ Pickle::Pickle(const Pickle& other)
header_size_(other.header_size_),
capacity_after_header_(0),
write_offset_(other.write_offset_) {
- size_t payload_size = header_size_ + other.header_->payload_size;
- Resize(payload_size);
- memcpy(header_, other.header_, payload_size);
+ Resize(other.header_->payload_size);
+ memcpy(header_, other.header_, header_size_ + other.header_->payload_size);
}
Pickle::~Pickle() {
« no previous file with comments | « pickle.h ('k') | pickle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698