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

Issue 1327523006: base: Fix an inefficiency in base::Pickle that caused extraneous allocations. (Closed)

Created:
5 years, 3 months ago by erikchen
Modified:
5 years, 3 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Fix an inefficiency in base::Pickle that caused extraneous allocations. The Resize() method is supposed to be passed the size of the payload, not including the header. In the copy constructor, it was being passed the size of the payload plus the header. BUG= R=mark@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/f9ca8f5f0656036f8062be85a38b0f243bb0df34

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comments from mark. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -3 lines) Patch
M base/pickle.h View 1 chunk +1 line, -0 lines 0 comments Download
M base/pickle.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M base/pickle_unittest.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
erikchen
mark: Please review.
5 years, 3 months ago (2015-09-08 22:04:14 UTC) #2
Mark Mentovai
LGTM https://codereview.chromium.org/1327523006/diff/1/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/1327523006/diff/1/base/pickle.cc#newcode258 base/pickle.cc:258: size_t payload_size = header_size_ + other.header_->payload_size; This isn’t ...
5 years, 3 months ago (2015-09-08 23:25:17 UTC) #3
erikchen
https://codereview.chromium.org/1327523006/diff/1/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/1327523006/diff/1/base/pickle.cc#newcode258 base/pickle.cc:258: size_t payload_size = header_size_ + other.header_->payload_size; On 2015/09/08 23:25:17, ...
5 years, 3 months ago (2015-09-08 23:33:39 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1327523006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1327523006/20001
5 years, 3 months ago (2015-09-08 23:33:56 UTC) #7
erikchen
5 years, 3 months ago (2015-09-08 23:39:15 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
f9ca8f5f0656036f8062be85a38b0f243bb0df34 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698