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

Issue 290173008: Refactor PickleIterator. (Closed)

Created:
6 years, 7 months ago by halyavin
Modified:
6 years, 6 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Refactor PickleIterator. Remove undefined behaviors by using offsets instead of pointers and by checking that offset never exceeds the size of the data. Update Native Messaging test to use Native Messaging format instead of Pickle format which accidentally coincided before. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274367

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 18

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -29 lines) Patch
M base/pickle.h View 1 2 3 4 5 4 chunks +17 lines, -10 lines 0 comments Download
M base/pickle.cc View 1 2 3 4 3 chunks +27 lines, -14 lines 0 comments Download
M base/pickle_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc View 1 2 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
halyavin
6 years, 7 months ago (2014-05-21 11:00:02 UTC) #1
jar (doing other things)
https://codereview.chromium.org/290173008/diff/60001/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc File chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc (right): https://codereview.chromium.org/290173008/diff/60001/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc#newcode146 chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:146: return std::string(reinterpret_cast<char*>(&length), 4).append(message); The original code is confusing for ...
6 years, 7 months ago (2014-05-22 02:51:00 UTC) #2
halyavin
https://codereview.chromium.org/290173008/diff/60001/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc File chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc (right): https://codereview.chromium.org/290173008/diff/60001/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc#newcode146 chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:146: return std::string(reinterpret_cast<char*>(&length), 4).append(message); On 2014/05/22 02:51:00, jar wrote: > ...
6 years, 7 months ago (2014-05-22 04:05:25 UTC) #3
halyavin
ping
6 years, 7 months ago (2014-05-23 18:00:02 UTC) #4
jar (doing other things)
https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc#newcode39 base/pickle.cc:39: inline void PickleIterator::Advance(size_t size) { I *think* all (both?) ...
6 years, 7 months ago (2014-05-23 21:22:03 UTC) #5
halyavin
https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc#newcode39 base/pickle.cc:39: inline void PickleIterator::Advance(size_t size) { On 2014/05/23 21:22:04, jar ...
6 years, 7 months ago (2014-05-26 07:43:01 UTC) #6
jar (doing other things)
https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc#newcode342 base/pickle.cc:342: header_->payload_size = static_cast<uint32>(new_size); On 2014/05/26 07:43:02, halyavin wrote: > ...
6 years, 6 months ago (2014-05-27 23:29:33 UTC) #7
halyavin
https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/60001/base/pickle.cc#newcode342 base/pickle.cc:342: header_->payload_size = static_cast<uint32>(new_size); > Isn't this the side that ...
6 years, 6 months ago (2014-05-28 07:45:12 UTC) #8
jar (doing other things)
+cc Carlos, so we have extra eyes on this most critical code. LGTM... with nit ...
6 years, 6 months ago (2014-05-29 01:51:16 UTC) #9
halyavin
https://codereview.chromium.org/290173008/diff/80001/base/pickle.h File base/pickle.h (right): https://codereview.chromium.org/290173008/diff/80001/base/pickle.h#newcode85 base/pickle.h:85: const char* payload_ptr_; On 2014/05/29 01:51:16, jar wrote: > ...
6 years, 6 months ago (2014-05-29 07:34:55 UTC) #10
halyavin
Brett, I need your LGTM as an owner of base/. Sergey Ulanov, I need your ...
6 years, 6 months ago (2014-05-29 07:38:21 UTC) #11
cpu_(ooo_6.6-7.5)
Adding justin for security review. https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc File base/pickle.cc (left): https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc#oldcode45 base/pickle.cc:45: else the two versions ...
6 years, 6 months ago (2014-05-29 17:14:58 UTC) #12
halyavin
https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc File base/pickle.cc (left): https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc#oldcode45 base/pickle.cc:45: else On 2014/05/29 17:14:58, cpu wrote: > the two ...
6 years, 6 months ago (2014-05-29 17:20:26 UTC) #13
brettw
owbers lgtm rubberstamp based on jar's review and pending security review.
6 years, 6 months ago (2014-05-30 01:20:31 UTC) #14
Sergey Ulanov
lgtm
6 years, 6 months ago (2014-05-30 05:52:19 UTC) #15
jschuh
Security lgtm with one nit/question. https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc#newcode70 base/pickle.cc:70: inline const char* PickleIterator::GetReadPointerAndAdvance( ...
6 years, 6 months ago (2014-05-30 13:50:31 UTC) #16
halyavin
https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc File base/pickle.cc (right): https://codereview.chromium.org/290173008/diff/100001/base/pickle.cc#newcode70 base/pickle.cc:70: inline const char* PickleIterator::GetReadPointerAndAdvance( On 2014/05/30 13:50:31, Justin Schuh ...
6 years, 6 months ago (2014-05-30 15:20:23 UTC) #17
cpu_(ooo_6.6-7.5)
lgtm
6 years, 6 months ago (2014-05-31 01:21:19 UTC) #18
halyavin
The CQ bit was checked by halyavin@google.com
6 years, 6 months ago (2014-06-02 13:25:46 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/halyavin@google.com/290173008/120001
6 years, 6 months ago (2014-06-02 13:27:31 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 6 months ago (2014-06-02 22:04:38 UTC) #21
commit-bot: I haz the power
6 years, 6 months ago (2014-06-02 23:23:52 UTC) #22
Message was sent while issue was closed.
Change committed as 274367

Powered by Google App Engine
This is Rietveld 408576698