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

Issue 261683002: Make a NaClDesc ctor for creating descs from NaClFileInfo. (Closed)

Created:
6 years, 7 months ago by jvoung (off chromium)
Modified:
6 years, 7 months ago
CC:
native-client-reviews_googlegroups.com, teravest
Visibility:
Public.

Description

Make a NaClDesc ctor for creating descs from NaClFileInfo. Could make ownership transfer more direct without accidentally dropping the file tokens: https://codereview.chromium.org/263683002/diff/1/ppapi/native_client/src/trusted/plugin/plugin.cc#newcode499 Moves NaClFileInfo into src/public/ instead of being under validator, so that src/trusted/desc doesn't import headers from validator since src/trusted/validator already imports from src/trusted/desc. I'm leaving a redirector under the old location to avoid making the Chrome DEPS roll complicated. Once it rolls into Chrome and the references are fixed, we can delete the old copy/redirector. Put the token validity checks into the ctor, so that the caller can just say: NaClDescIoFromFileToken...(info.Release(), RD_ONLY) instead of checking validity before the call to Release(). BUG= https://code.google.com/p/nativeclient/issues/detail?id=3421 R=mseaborn@chromium.org Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=13198

Patch Set 1 #

Patch Set 2 : keep old copy #

Patch Set 3 : use or #

Total comments: 4

Patch Set 4 : make a helper and reuse set method #

Patch Set 5 : missing files #

Patch Set 6 : sync copies before deleting #

Total comments: 4

Patch Set 7 : include instead of dupe #

Patch Set 8 : move most of wrapper construction to a ctor #

Patch Set 9 : c vs cxx #

Patch Set 10 : win #

Total comments: 10

Patch Set 11 : review #

Total comments: 7

Patch Set 12 : revert more #

Patch Set 13 : more cleanup #

Patch Set 14 : make it posix file descriptor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -105 lines) Patch
A src/public/nacl_file_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +50 lines, -0 lines 0 comments Download
M src/trusted/desc/build.scons View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M src/trusted/desc/desc.gyp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A src/trusted/desc/nacl_desc_file_info.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +38 lines, -0 lines 0 comments Download
A src/trusted/desc/nacl_desc_file_info.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +72 lines, -0 lines 0 comments Download
M src/trusted/desc_cacheability/desc_cacheability.h View 1 2 3 1 chunk +0 lines, -18 lines 0 comments Download
M src/trusted/desc_cacheability/desc_cacheability.c View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -43 lines 0 comments Download
M src/trusted/manifest_name_service_proxy/manifest_proxy.c View 2 chunks +1 line, -1 line 0 comments Download
M src/trusted/reverse_service/reverse_service.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/trusted/reverse_service/reverse_service_c.c View 2 chunks +2 lines, -1 line 0 comments Download
M src/trusted/sel_universal/reverse_emulate.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
D src/trusted/validator/nacl_file_info.h View 1 2 3 4 5 6 1 chunk +8 lines, -22 lines 0 comments Download
M tests/sel_main_chrome/sel_main_chrome_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +12 lines, -18 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jvoung (off chromium)
6 years, 7 months ago (2014-04-30 23:17:45 UTC) #1
Nick Bray (chromium)
https://codereview.chromium.org/261683002/diff/40001/src/trusted/desc/nacl_desc_wrapper.cc File src/trusted/desc/nacl_desc_wrapper.cc (right): https://codereview.chromium.org/261683002/diff/40001/src/trusted/desc/nacl_desc_wrapper.cc#newcode325 src/trusted/desc/nacl_desc_wrapper.cc:325: if (info.file_token.lo != 0 || info.file_token.hi != 0) { ...
6 years, 7 months ago (2014-05-02 19:44:35 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/261683002/diff/40001/src/trusted/desc/nacl_desc_wrapper.cc File src/trusted/desc/nacl_desc_wrapper.cc (right): https://codereview.chromium.org/261683002/diff/40001/src/trusted/desc/nacl_desc_wrapper.cc#newcode325 src/trusted/desc/nacl_desc_wrapper.cc:325: if (info.file_token.lo != 0 || info.file_token.hi != 0) { ...
6 years, 7 months ago (2014-05-02 20:38:22 UTC) #3
Mark Seaborn
https://codereview.chromium.org/261683002/diff/100001/src/trusted/desc/nacl_desc_wrapper.h File src/trusted/desc/nacl_desc_wrapper.h (right): https://codereview.chromium.org/261683002/diff/100001/src/trusted/desc/nacl_desc_wrapper.h#newcode34 src/trusted/desc/nacl_desc_wrapper.h:34: DescWrapper* MakeFileDescMetadata(struct NaClFileInfo file_info, Is it your intention to ...
6 years, 7 months ago (2014-05-02 20:50:40 UTC) #4
jvoung (off chromium)
https://codereview.chromium.org/261683002/diff/100001/src/trusted/desc/nacl_desc_wrapper.h File src/trusted/desc/nacl_desc_wrapper.h (right): https://codereview.chromium.org/261683002/diff/100001/src/trusted/desc/nacl_desc_wrapper.h#newcode34 src/trusted/desc/nacl_desc_wrapper.h:34: DescWrapper* MakeFileDescMetadata(struct NaClFileInfo file_info, On 2014/05/02 20:50:40, Mark Seaborn ...
6 years, 7 months ago (2014-05-14 23:42:46 UTC) #5
Mark Seaborn
https://codereview.chromium.org/261683002/diff/200002/src/public/nacl_file_info.h File src/public/nacl_file_info.h (right): https://codereview.chromium.org/261683002/diff/200002/src/public/nacl_file_info.h#newcode16 src/public/nacl_file_info.h:16: * NaClFileToken is a single-use nonce that the NaCl ...
6 years, 7 months ago (2014-05-15 00:36:10 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/261683002/diff/200002/src/public/nacl_file_info.h File src/public/nacl_file_info.h (right): https://codereview.chromium.org/261683002/diff/200002/src/public/nacl_file_info.h#newcode16 src/public/nacl_file_info.h:16: * NaClFileToken is a single-use nonce that the NaCl ...
6 years, 7 months ago (2014-05-16 18:02:05 UTC) #7
Mark Seaborn
To answer your question... https://codereview.chromium.org/261683002/diff/250001/src/public/nacl_file_info.h File src/public/nacl_file_info.h (right): https://codereview.chromium.org/261683002/diff/250001/src/public/nacl_file_info.h#newcode36 src/public/nacl_file_info.h:36: int32_t desc; On 2014/05/16 18:02:05, ...
6 years, 7 months ago (2014-05-16 18:23:29 UTC) #8
Mark Seaborn
"I'm leaving a copy under the old location" -- maybe s/copy/redirector/? LGTM, thanks https://codereview.chromium.org/261683002/diff/250001/src/trusted/desc/nacl_desc_wrapper.cc File ...
6 years, 7 months ago (2014-05-16 18:30:23 UTC) #9
jvoung (off chromium)
https://codereview.chromium.org/261683002/diff/250001/src/public/nacl_file_info.h File src/public/nacl_file_info.h (right): https://codereview.chromium.org/261683002/diff/250001/src/public/nacl_file_info.h#newcode36 src/public/nacl_file_info.h:36: int32_t desc; On 2014/05/16 18:23:29, Mark Seaborn wrote: > ...
6 years, 7 months ago (2014-05-16 20:58:42 UTC) #10
jvoung (off chromium)
6 years, 7 months ago (2014-05-16 23:10:25 UTC) #11
Message was sent while issue was closed.
Committed patchset #14 manually as r13198 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698