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

Issue 3076010: IMC: Remove ReturnCreatedDesc() method from effector object (Closed)

Created:
10 years, 4 months ago by Mark Seaborn
Modified:
9 years, 5 months ago
Reviewers:
Mark Schneckloth
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

IMC: Remove ReturnCreatedDesc() method from effector object Change the ConnectAddr() and AcceptConn() methods to return a NaClDesc rather than a descriptor number. This means the syscall function is now responsible for adding the descriptor into the FD table with NaClSetAvail(), which is consistent with the other syscall functions. This means we can remove NaClNrdXferEffectorDtor(), which was a workaround for cases where a NaClDesc was what the caller wanted from ConnectAddr()/AcceptConn(). This removes the need to create effector objects in some cases. BUG=http://code.google.com/p/nativeclient/issues/detail?id=727 TEST=existing tests Committed: http://code.google.com/p/nativeclient/source/detail?r=2827

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -250 lines) Patch
M src/native_client/src/trusted/desc/nacl_desc_base.h View 2 chunks +13 lines, -9 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_base.c View 2 chunks +6 lines, -6 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_conn_cap.c View 3 chunks +7 lines, -11 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_effector.h View 1 chunk +0 lines, -26 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_effector_cleanup.c View 2 chunks +0 lines, -9 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_effector_trusted_mem.c View 2 chunks +0 lines, -10 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_imc_bound_desc.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_imc_bound_desc.c View 3 chunks +5 lines, -10 lines 0 comments Download
M src/native_client/src/trusted/desc/nacl_desc_wrapper.cc View 2 chunks +4 lines, -17 lines 0 comments Download
M src/native_client/src/trusted/desc/nrd_xfer_effector.h View 1 chunk +0 lines, -8 lines 0 comments Download
M src/native_client/src/trusted/desc/nrd_xfer_effector.c View 2 chunks +1 line, -41 lines 1 comment Download
M src/native_client/src/trusted/desc/posix/nacl_desc_conn_cap.c View 2 chunks +7 lines, -14 lines 0 comments Download
M src/native_client/src/trusted/desc/posix/nacl_desc_imc_bound_desc.c View 2 chunks +4 lines, -6 lines 0 comments Download
M src/native_client/src/trusted/handle_pass/browser_handle.cc View 1 chunk +3 lines, -20 lines 0 comments Download
M src/native_client/src/trusted/handle_pass/ldr_handle.cc View 1 chunk +7 lines, -27 lines 0 comments Download
M src/native_client/src/trusted/service_runtime/nacl_desc_effector_ldr.c View 2 chunks +0 lines, -16 lines 0 comments Download
M src/native_client/src/trusted/service_runtime/nacl_syscall_common.c View 2 chunks +10 lines, -2 lines 0 comments Download
M src/native_client/src/trusted/service_runtime/nacl_text.c View 2 chunks +0 lines, -11 lines 0 comments Download
M src/native_client/src/trusted/service_runtime/sel_ldr.c View 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mark Seaborn
10 years, 4 months ago (2010-07-28 15:40:33 UTC) #1
Mark Schneckloth
LGTM http://codereview.chromium.org/3076010/diff/1/11 File src/native_client/src/trusted/desc/nrd_xfer_effector.c (right): http://codereview.chromium.org/3076010/diff/1/11#newcode56 src/native_client/src/trusted/desc/nrd_xfer_effector.c:56: }; It doesn't look like this "class" (NaClNrdXferEffector) ...
10 years, 4 months ago (2010-07-28 16:39:59 UTC) #2
Mark Seaborn
10 years, 4 months ago (2010-07-29 12:58:16 UTC) #3
On 2010/07/28 16:39:59, Mark Schneckloth wrote:
> LGTM
> 
> http://codereview.chromium.org/3076010/diff/1/11
> File src/native_client/src/trusted/desc/nrd_xfer_effector.c (right):
> 
> http://codereview.chromium.org/3076010/diff/1/11#newcode56
> src/native_client/src/trusted/desc/nrd_xfer_effector.c:56: };
> It doesn't look like this "class" (NaClNrdXferEffector) does much
> anymore.  Will it be deleted in another round of clean up?

I think it might be possible to do that, yes.  It is still used as a
dummy effector but it should be possible to reduce the need for dummy
effectors.

Powered by Google App Engine
This is Rietveld 408576698