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

Issue 2700433004: Update BitWriter buffer position on flush. (Closed)

Created:
3 years, 10 months ago by martijnc
Modified:
3 years, 10 months ago
Reviewers:
Ryan Sleevi
CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update BitWriter buffer position on flush. When a BitWriter is flushed (through BitWriter::Flush()) the buffer position is not updated even though additional bits are written. When the BitWriter is used after the flush, BitWriter::position() would return incorrect positions. This CL fixes the behavior by updating |position_| in BitWriter::Flush() to account for the padding bits (8 - |used_|). Also removes BitWriter::BitLength() which is unused. BUG=595493 Review-Url: https://codereview.chromium.org/2700433004 Cr-Commit-Position: refs/heads/master@{#450923} Committed: https://chromium.googlesource.com/chromium/src/+/39a7d963f56666f34a337c87c4ddc8d432b1c39c

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -12 lines) Patch
M net/tools/transport_security_state_generator/bit_writer.h View 3 chunks +4 lines, -3 lines 0 comments Download
M net/tools/transport_security_state_generator/bit_writer.cc View 1 chunk +1 line, -9 lines 0 comments Download

Messages

Total messages: 13 (9 generated)
martijnc
This is split off from https://codereview.chromium.org/2681733008.
3 years, 10 months ago (2017-02-15 22:09:26 UTC) #6
Ryan Sleevi
LGTM Thanks for making super digestable and easy to review :)
3 years, 10 months ago (2017-02-16 01:40:56 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2700433004/40001
3 years, 10 months ago (2017-02-16 08:43:28 UTC) #10
commit-bot: I haz the power
3 years, 10 months ago (2017-02-16 10:13:47 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/39a7d963f56666f34a337c87c4dd...

Powered by Google App Engine
This is Rietveld 408576698