base: Fix an inefficiency in base::Pickle that caused extraneous allocations.
commitf9ca8f5f0656036f8062be85a38b0f243bb0df34
authorerikchen <erikchen@chromium.org>
Tue, 8 Sep 2015 23:36:29 +0000 (8 16:36 -0700)
committererikchen <erikchen@chromium.org>
Tue, 8 Sep 2015 23:38:42 +0000 (8 23:38 +0000)
tree8a4cc4fd492a5522f5e20f39d9df9d3c991b80eb
parent207ddf4c6885c8165363b4f75485665530ab1fbb
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

Review URL: https://codereview.chromium.org/1327523006 .

Cr-Commit-Position: refs/heads/master@{#347826}
base/pickle.cc
base/pickle.h
base/pickle_unittest.cc