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

Issue 7605029: Extend IRT with nacl_irt_resource_open interface (Closed)

Created:
9 years, 4 months ago by halyavin
Modified:
9 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Extend IRT with nacl_irt_resource_open interface. We need to solve the problem that we need to provide pointers to PPP_Initialize and PPP_GetInterface in the program before manifest file loading is working and so this program can be loaded. In this CL, we split PpapiPluginMain in two parts so that ld.so can call the first part, load program, and then call the second part to provide pointers to these functions. This way is preferable since it make code in ld.so simplier. New IRT interface provides a single function that returns a file descriptor by file name. The name service and manifest service channels are initialized at first use of this function. If an error happens during initialization, the function returns EIO. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2127 TEST= run_irt_manifest_file_chrome_browser_test Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=6453

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : remove empty lines #

Patch Set 6 : remove empty lines #

Total comments: 6

Patch Set 7 : implementing khim suggestion #

Patch Set 8 : removing unneeded changes #

Patch Set 9 : caching name service srpc channel #

Patch Set 10 : I forgot to add irt_entry.c #

Patch Set 11 : I forgot to add irt_entry.c #

Patch Set 12 : gcl is buggy #

Patch Set 13 : fix link problems #

Patch Set 14 : '' #

Patch Set 15 : test simplification and comments #

Patch Set 16 : remove unused #includes #

Patch Set 17 : lint warnings #

Patch Set 18 : more lint warnings #

Total comments: 27

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : lint warnings #

Patch Set 23 : fix link error #

Patch Set 24 : '' #

Total comments: 24

Patch Set 25 : '' #

Patch Set 26 : '' #

Patch Set 27 : '' #

Patch Set 28 : '' #

Total comments: 16

Patch Set 29 : sync #

Patch Set 30 : remove debug print #

Total comments: 1

Patch Set 31 : '' #

Patch Set 32 : fixed link problem #

Patch Set 33 : fixed license #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -21 lines) Patch
M src/shared/ppapi_proxy/plugin_globals.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +12 lines, -18 lines 0 comments Download
M src/shared/ppapi_proxy/ppruntime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +10 lines, -3 lines 0 comments Download
M src/untrusted/irt/irt.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +5 lines, -0 lines 0 comments Download
A src/untrusted/irt/irt_entry_ppapi.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +16 lines, -0 lines 0 comments Download
M src/untrusted/irt/irt_interfaces.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +1 line, -0 lines 0 comments Download
M src/untrusted/irt/irt_interfaces.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +2 lines, -0 lines 0 comments Download
A src/untrusted/irt/irt_manifest.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +163 lines, -0 lines 0 comments Download
M src/untrusted/irt/nacl.scons View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +2 lines, -0 lines 0 comments Download
A tests/manifest_file/irt_manifest_file.nmf View 1 chunk +18 lines, -0 lines 0 comments Download
A tests/manifest_file/irt_manifest_file_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +122 lines, -0 lines 0 comments Download
A tests/manifest_file/irt_manifest_file_test.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +50 lines, -0 lines 0 comments Download
M tests/manifest_file/nacl.scons View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
halyavin
9 years, 4 months ago (2011-08-10 14:06:33 UTC) #1
halyavin
Roland, please take a look. This is a preferable way for loading shared libraries. If ...
9 years, 4 months ago (2011-08-10 15:20:27 UTC) #2
khim
Just got an idea: we don't really need ppapi_pre_start. We can call PpapiPluginPreInit in IRT ...
9 years, 4 months ago (2011-08-10 20:07:34 UTC) #3
Roland McGrath
Sorry, I don't understand the rationale for this organization at all. The intent of Bennet's ...
9 years, 4 months ago (2011-08-10 20:15:44 UTC) #4
khim
Manifest-loading interfaces don't need PPAPI, but they still need SRPC. Currently SRPC is initialized in ...
9 years, 4 months ago (2011-08-10 20:22:50 UTC) #5
pasko-google - do not use
On Thu, Aug 11, 2011 at 12:07 AM, <khim@chromium.org> wrote: > Just got an idea: ...
9 years, 4 months ago (2011-08-10 21:15:31 UTC) #6
pasko-google - do not use
there are many aspects that need fixing for readability, but before jumping in with them ...
9 years, 4 months ago (2011-08-10 21:16:33 UTC) #7
Use chromium.org instead
We should discuss this in more detail with David and/or Bennet in the loop. The ...
9 years, 4 months ago (2011-08-10 21:38:44 UTC) #8
sehr (please use chromium)
Adding bsy explicitly. I haven't had a chance to look at the change yet. David ...
9 years, 4 months ago (2011-08-10 22:24:53 UTC) #9
bsy
am confused. why can't +khim's suggestion of initializing srpc and opening the srpc channels before ...
9 years, 4 months ago (2011-08-11 02:32:28 UTC) #10
bsy
http://codereview.chromium.org/7605029/diff/4010/src/untrusted/irt/irt_manifest.c File src/untrusted/irt/irt_manifest.c (right): http://codereview.chromium.org/7605029/diff/4010/src/untrusted/irt/irt_manifest.c#newcode72 src/untrusted/irt/irt_manifest.c:72: NaClSrpcDtor(&manifest_channel); the irt should be able to cache these ...
9 years, 4 months ago (2011-08-11 02:32:43 UTC) #11
halyavin
I implemented solution with initialization in irt_entry. It passes the bots now.
9 years, 4 months ago (2011-08-11 15:13:06 UTC) #12
halyavin
http://codereview.chromium.org/7605029/diff/4010/src/untrusted/irt/irt_manifest.c File src/untrusted/irt/irt_manifest.c (right): http://codereview.chromium.org/7605029/diff/4010/src/untrusted/irt/irt_manifest.c#newcode72 src/untrusted/irt/irt_manifest.c:72: NaClSrpcDtor(&manifest_channel); On 2011/08/11 02:32:43, bsy wrote: > the irt ...
9 years, 4 months ago (2011-08-12 08:52:07 UTC) #13
Roland McGrath
http://codereview.chromium.org/7605029/diff/30004/src/shared/ppapi_proxy/plugin_globals.cc File src/shared/ppapi_proxy/plugin_globals.cc (right): http://codereview.chromium.org/7605029/diff/30004/src/shared/ppapi_proxy/plugin_globals.cc#newcode167 src/shared/ppapi_proxy/plugin_globals.cc:167: PpapiPluginRegisterDefaultThreadCreator(); This and MarkMainThread are only needed for PPAPI. ...
9 years, 4 months ago (2011-08-12 16:44:56 UTC) #14
pasko-google - do not use
please, also fix the commit description. It should say that we enable a new interface ...
9 years, 4 months ago (2011-08-15 10:35:08 UTC) #15
halyavin
http://codereview.chromium.org/7605029/diff/30004/src/shared/ppapi_proxy/plugin_globals.cc File src/shared/ppapi_proxy/plugin_globals.cc (right): http://codereview.chromium.org/7605029/diff/30004/src/shared/ppapi_proxy/plugin_globals.cc#newcode167 src/shared/ppapi_proxy/plugin_globals.cc:167: PpapiPluginRegisterDefaultThreadCreator(); On 2011/08/12 16:44:56, Roland McGrath wrote: > This ...
9 years, 4 months ago (2011-08-15 10:35:52 UTC) #16
halyavin
http://codereview.chromium.org/7605029/diff/30004/src/untrusted/irt/irt_manifest.c File src/untrusted/irt/irt_manifest.c (right): http://codereview.chromium.org/7605029/diff/30004/src/untrusted/irt/irt_manifest.c#newcode63 src/untrusted/irt/irt_manifest.c:63: * Returns file descriptor or -1 if some error ...
9 years, 4 months ago (2011-08-15 10:46:03 UTC) #17
halyavin
http://codereview.chromium.org/7605029/diff/30004/tests/manifest_file/irt_manifest_file_test.html File tests/manifest_file/irt_manifest_file_test.html (right): http://codereview.chromium.org/7605029/diff/30004/tests/manifest_file/irt_manifest_file_test.html#newcode17 tests/manifest_file/irt_manifest_file_test.html:17: <h1>Native Client Post Message Manifest File Test</h1> On 2011/08/15 ...
9 years, 4 months ago (2011-08-15 14:04:22 UTC) #18
pasko-google - do not use
please, remove the link to the "1st way" from the description http://codereview.chromium.org/7605029/diff/34006/src/shared/ppapi_proxy/ppruntime.h File src/shared/ppapi_proxy/ppruntime.h (right): ...
9 years, 4 months ago (2011-08-15 16:23:03 UTC) #19
Roland McGrath
On 2011/08/15 10:35:52, halyavin wrote: > > IMHO the simplest thing to do would be ...
9 years, 4 months ago (2011-08-15 16:30:49 UTC) #20
pasko-google - do not use
On 2011/08/15 16:30:49, Roland McGrath wrote: > > I implemented this as a constructor. > ...
9 years, 4 months ago (2011-08-15 16:59:42 UTC) #21
Use chromium.org instead
On Mon, Aug 15, 2011 at 9:59 AM, <pasko@google.com> wrote: > On 2011/08/15 16:30:49, Roland ...
9 years, 4 months ago (2011-08-15 19:42:56 UTC) #22
halyavin
> Doing it lazily on demand seems preferable. Why not do that? Lazy initialization is ...
9 years, 4 months ago (2011-08-16 08:50:52 UTC) #23
halyavin
http://codereview.chromium.org/7605029/diff/34006/src/shared/ppapi_proxy/ppruntime.h File src/shared/ppapi_proxy/ppruntime.h (right): http://codereview.chromium.org/7605029/diff/34006/src/shared/ppapi_proxy/ppruntime.h#newcode16 src/shared/ppapi_proxy/ppruntime.h:16: int IRTInit(); On 2011/08/15 16:23:04, pasko wrote: > google ...
9 years, 4 months ago (2011-08-16 09:05:36 UTC) #24
Roland McGrath
On 2011/08/16 08:50:52, halyavin wrote: > > Doing it lazily on demand seems preferable. Why ...
9 years, 4 months ago (2011-08-16 16:25:38 UTC) #25
Roland McGrath
Most are nits, but the locking issue needs to be resolved before commit. http://codereview.chromium.org/7605029/diff/41005/src/shared/ppapi_proxy/plugin_globals.cc File ...
9 years, 4 months ago (2011-08-16 17:32:50 UTC) #26
halyavin
http://codereview.chromium.org/7605029/diff/41005/src/shared/ppapi_proxy/plugin_globals.cc File src/shared/ppapi_proxy/plugin_globals.cc (right): http://codereview.chromium.org/7605029/diff/41005/src/shared/ppapi_proxy/plugin_globals.cc#newcode159 src/shared/ppapi_proxy/plugin_globals.cc:159: // in irt_entry.c where PpapiPluginPreInit is called. On 2011/08/16 ...
9 years, 4 months ago (2011-08-16 18:06:25 UTC) #27
Roland McGrath
9 years, 4 months ago (2011-08-16 18:12:53 UTC) #28
We definitely want more cleanup of this later.
But for the moment, LGTM if all tests pass.

I think this breaks the browser_dynamic_library test.  That test should go
away now that we have cleaner ways of doing this stuff.  But if it's still
enabled now, it should be disabled or removed in this commit to avoid
breaking the bots.

Powered by Google App Engine
This is Rietveld 408576698