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

Issue 20275: POSIX: Clean up DescriptorSet (Closed)

Created:
11 years, 10 months ago by agl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

POSIX: Clean up DescriptorSet In general, the IPC Message objects are const and the iterator state is a void* kept by the code which is doing the deserialisation. However, now that we have an array of file descriptors, the index of the next file descriptor is part of the iteration state and is kept /inside/ the Message (in the DescriptorSet). This means that it's a mutable member, which is never too nice and also, since the logging functions want to parse a message multiple times, we've had to turn off returning an error when one runs off the end of the array. Also, the Message copy constructor and assignment function alters the /source/ Message, by stealing all of its descriptors This patch encodes the index of each file descriptor on the wire. So the state is moved from inside the DescriptorSet into the serialised data. Additionally, the DescriptorSet is made into a lazyily created scoped_refptr, solving the problems with copying messages.

Patch Set 1 #

Total comments: 6

Patch Set 2 : ... #

Total comments: 2

Patch Set 3 : typo fix #

Patch Set 4 : Addressing darin's comments #

Total comments: 4

Patch Set 5 : ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -63 lines) Patch
M chrome/common/descriptor_set_posix.h View 1 3 chunks +18 lines, -19 lines 0 comments Download
M chrome/common/descriptor_set_posix.cc View 1 2 3 5 chunks +38 lines, -20 lines 0 comments Download
M chrome/common/ipc_channel_posix.cc View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download
M chrome/common/ipc_message.h View 1 2 3 4 3 chunks +27 lines, -3 lines 0 comments Download
M chrome/common/ipc_message.cc View 1 2 3 4 4 chunks +41 lines, -2 lines 0 comments Download
M chrome/common/ipc_message_utils.h View 1 2 3 4 1 chunk +5 lines, -17 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
agl
(Renaming DescriptorSet will be in a future review. I didn't want to rename and change ...
11 years, 10 months ago (2009-02-11 21:48:28 UTC) #1
darin (slow to review)
http://codereview.chromium.org/20275/diff/1/2 File chrome/common/descriptor_set_posix.cc (right): http://codereview.chromium.org/20275/diff/1/2#newcode60 Line 60: // We should always walk the descriptors in ...
11 years, 10 months ago (2009-02-11 22:40:34 UTC) #2
agl
http://codereview.chromium.org/20275/diff/1/2 File chrome/common/descriptor_set_posix.cc (right): http://codereview.chromium.org/20275/diff/1/2#newcode60 Line 60: // We should always walk the descriptors in ...
11 years, 10 months ago (2009-02-11 23:01:08 UTC) #3
jeremy
http://codereview.chromium.org/20275/diff/14/1002 File chrome/common/descriptor_set_posix.cc (right): http://codereview.chromium.org/20275/diff/14/1002#newcode23 Line 23: // (which could a DOS against the browser ...
11 years, 10 months ago (2009-02-11 23:13:33 UTC) #4
agl
http://codereview.chromium.org/20275/diff/14/1002 File chrome/common/descriptor_set_posix.cc (right): http://codereview.chromium.org/20275/diff/14/1002#newcode23 Line 23: // (which could a DOS against the browser ...
11 years, 10 months ago (2009-02-11 23:25:53 UTC) #5
agl
Have addresses Darin's comments from IM conversation.
11 years, 10 months ago (2009-02-12 00:35:21 UTC) #6
darin (slow to review)
LGTM w/ these two issues addressed: http://codereview.chromium.org/20275/diff/15/20 File chrome/common/ipc_message.h (right): http://codereview.chromium.org/20275/diff/15/20#newcode171 Line 171: // On ...
11 years, 10 months ago (2009-02-12 00:43:15 UTC) #7
agl
http://codereview.chromium.org/20275/diff/15/20 File chrome/common/ipc_message.h (right): http://codereview.chromium.org/20275/diff/15/20#newcode171 Line 171: // On POSIX, a message may have an ...
11 years, 10 months ago (2009-02-12 03:33:14 UTC) #8
darin (slow to review)
11 years, 10 months ago (2009-02-12 04:03:39 UTC) #9
LGTM

Powered by Google App Engine
This is Rietveld 408576698