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

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed)

Created:
6 years, 2 months ago by Yusuke Sato
Modified:
5 years, 9 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, tzik, binji+watch_chromium.org, raymes+watch_chromium.org, mkwst+moarreviews-ipc_chromium.org, teravest+watch_chromium.org, nfullagar1, piman+watch_chromium.org, noelallen1, ihf+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Non-SFI NaCl: Batch-open resource files * Let the renderer pass URLs and manifest keys of the resource files when it asks the browser to start a new plugin process. * The browser opens all the URLs and passes file handlers to the plugin process if the process is for non-SFI mode. * Modify the non-SFI loader so that it can return a pre-opened handle without doing a renderer IPC when open_resource IRT is called. This CL does not change the current behavior of SFI NaCl. SFI NaCl support will be added in a separate CL: https://codereview.chromium.org/728113002/ Note that this CL is primarily for ARC (App Runtime for Chrome) which has 70+ DSO files. With this CL, the loading time of arc.nexe gets ~40% shorter. This CL should not affect NaCl applications other than ARC because most of them do not have that many DSO files, and even if they have some, opening one DSO file in the browser process takes only about 0.4ms (on Z620) which is usually negligible. TEST=PackagedAppTest.SuccessfulLoad TEST=manually checked that SFI-NaCl and PNaCl are still working. BUG=nativeclient:3802 BUG=348232 Committed: https://crrev.com/67e8acdac9e043dd710058ef2e01ca7ad2b29825 Cr-Commit-Position: refs/heads/master@{#319931}

Patch Set 1 : try #

Patch Set 2 : code review #

Total comments: 19

Patch Set 3 : address comments #

Patch Set 4 : add ipc/ #

Patch Set 5 : rebase #

Patch Set 6 : fix win x64 #

Total comments: 16

Patch Set 7 : address review comments #

Total comments: 2

Patch Set 8 : address comment #

Patch Set 9 : rebase #

Patch Set 10 : Remove ipc/ and mojo/ changes following Mark's suggestion #

Total comments: 71

Patch Set 11 : address all review comments except one #

Patch Set 12 : WIP: rebased, but not ready for review. two comments from Mark haven't been addressed. #

Patch Set 13 : still WIP #

Patch Set 14 : code review #

Total comments: 34

Patch Set 15 : code review #

Total comments: 38

Patch Set 16 : WIP #

Patch Set 17 : code review #

Total comments: 30

Patch Set 18 : address comments #

Total comments: 18

Patch Set 19 : address comments #

Patch Set 20 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -69 lines) Patch
M components/nacl/browser/nacl_host_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +13 lines, -1 line 0 comments Download
M components/nacl/browser/nacl_host_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +101 lines, -6 lines 0 comments Download
M components/nacl/browser/nacl_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +17 lines, -10 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +59 lines, -31 lines 0 comments Download
M components/nacl/common/nacl_host_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/common/nacl_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -0 lines 0 comments Download
M components/nacl/common/nacl_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +29 lines, -8 lines 0 comments Download
M components/nacl/common/nacl_types.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +17 lines, -0 lines 0 comments Download
M components/nacl/loader/nacl_listener.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M components/nacl/loader/nonsfi/nonsfi_listener.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +11 lines, -0 lines 0 comments Download
M components/nacl/renderer/json_manifest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
M components/nacl/renderer/json_manifest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +18 lines, -0 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +41 lines, -13 lines 0 comments Download
M ppapi/nacl_irt/irt_manifest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -0 lines 0 comments Download
M ppapi/nacl_irt/manifest_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (12 generated)
Yusuke Sato
Mark, Justin, Please take a look.
6 years, 2 months ago (2014-10-23 19:10:50 UTC) #5
teravest
https://codereview.chromium.org/649603004/diff/80001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/80001/components/nacl/browser/nacl_file_host.cc#newcode92 components/nacl/browser/nacl_file_host.cc:92: std::vector<std::pair<uint64, uint64> > resource_file_tokens; Why are you using a ...
6 years, 2 months ago (2014-10-24 16:18:06 UTC) #6
teravest
6 years, 2 months ago (2014-10-24 16:18:08 UTC) #7
Yusuke Sato
https://codereview.chromium.org/649603004/diff/80001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/80001/components/nacl/browser/nacl_file_host.cc#newcode92 components/nacl/browser/nacl_file_host.cc:92: std::vector<std::pair<uint64, uint64> > resource_file_tokens; On 2014/10/24 16:18:06, teravest wrote: ...
6 years, 1 month ago (2014-11-04 22:50:22 UTC) #8
Yusuke Sato
Please take another look. (and sorry for the delay. I was busy doing other ARC ...
6 years, 1 month ago (2014-11-04 22:51:12 UTC) #9
Yusuke Sato
https://codereview.chromium.org/649603004/diff/80001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/649603004/diff/80001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode1307 components/nacl/renderer/ppb_nacl_private_impl.cc:1307: if (resource_file_urls.size() > 2) { It turned out that ...
6 years, 1 month ago (2014-11-05 07:03:23 UTC) #10
Yusuke Sato
Justin: As talked offline, I've rebased the CL onto master (so I can land this ...
6 years, 1 month ago (2014-11-08 00:11:14 UTC) #11
teravest
https://codereview.chromium.org/649603004/diff/160001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/160001/components/nacl/browser/nacl_file_host.cc#newcode63 components/nacl/browser/nacl_file_host.cc:63: write_reply_message(reply_msg, file_desc, file_token_lo, file_token_hi); Why is write_reply_message passed as ...
6 years, 1 month ago (2014-11-10 20:36:12 UTC) #12
Yusuke Sato
https://codereview.chromium.org/649603004/diff/160001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/160001/components/nacl/browser/nacl_file_host.cc#newcode63 components/nacl/browser/nacl_file_host.cc:63: write_reply_message(reply_msg, file_desc, file_token_lo, file_token_hi); On 2014/11/10 20:36:11, teravest wrote: ...
6 years, 1 month ago (2014-11-11 00:58:35 UTC) #13
Yusuke Sato
Please take another look.
6 years, 1 month ago (2014-11-11 00:59:14 UTC) #14
teravest
Almost there. Just one last thing. https://codereview.chromium.org/649603004/diff/180001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/649603004/diff/180001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode86 components/nacl/renderer/ppb_nacl_private_impl.cc:86: // the browser ...
6 years, 1 month ago (2014-11-12 20:33:01 UTC) #15
Yusuke Sato
https://codereview.chromium.org/649603004/diff/180001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/649603004/diff/180001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode86 components/nacl/renderer/ppb_nacl_private_impl.cc:86: // the browser process may use up to 7 ...
6 years, 1 month ago (2014-11-12 23:09:11 UTC) #16
Yusuke Sato
PTAL
6 years, 1 month ago (2014-11-12 23:09:35 UTC) #17
teravest
lgtm
6 years, 1 month ago (2014-11-13 03:03:06 UTC) #18
Yusuke Sato
Mark: Please take a look
6 years, 1 month ago (2014-11-13 20:36:06 UTC) #19
Yusuke Sato
ping?
6 years, 1 month ago (2014-11-18 20:26:45 UTC) #20
Yusuke Sato
Mark, following your request, I'm adding open_resource test: https://codereview.chromium.org/758383002/ . Since it turned out that ...
6 years ago (2014-11-26 17:22:47 UTC) #21
Yusuke Sato
Mark, as chatted yesterday, I've removed ipc/ and mojo/ changes from this CL. Please take ...
6 years ago (2014-12-03 18:11:03 UTC) #25
Yusuke Sato
I've shared a short design doc for this (which you requested on Friday) with you. ...
6 years ago (2014-12-10 20:49:24 UTC) #26
Yusuke Sato
ping?
6 years ago (2014-12-19 23:38:14 UTC) #27
hidehiko
FYI. https://codereview.chromium.org/649603004/diff/300001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/300001/components/nacl/browser/nacl_file_host.cc#newcode164 components/nacl/browser/nacl_file_host.cc:164: if (!nacl::NaClBrowser::GetDelegate()->MapUrlToLocalFilePath( Looks very similar to L186-L199. Can ...
5 years, 10 months ago (2015-01-28 09:05:20 UTC) #29
Mark Seaborn
https://codereview.chromium.org/649603004/diff/300001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/300001/components/nacl/browser/nacl_file_host.cc#newcode41 components/nacl/browser/nacl_file_host.cc:41: void DoRegisterOpenedNaClExecutableFilePnacl( Isn't this the same as DoRegisterOpenedNaClExecutableFile() but ...
5 years, 10 months ago (2015-02-02 23:21:51 UTC) #30
Yusuke Sato
Please do not review the new patchset yet. I've addressed most of your comments, but ...
5 years, 10 months ago (2015-02-04 02:00:29 UTC) #31
Mark Seaborn
https://codereview.chromium.org/649603004/diff/300001/components/nacl/loader/nonsfi/irt_resource_open.cc File components/nacl/loader/nonsfi/irt_resource_open.cc (right): https://codereview.chromium.org/649603004/diff/300001/components/nacl/loader/nonsfi/irt_resource_open.cc#newcode20 components/nacl/loader/nonsfi/irt_resource_open.cc:20: pthread_mutex_t g_mu = PTHREAD_MUTEX_INITIALIZER; On 2015/02/04 02:00:28, Yusuke Sato ...
5 years, 10 months ago (2015-02-04 18:52:16 UTC) #32
Yusuke Sato
https://codereview.chromium.org/649603004/diff/300001/components/nacl/loader/nonsfi/nonsfi_listener.cc File components/nacl/loader/nonsfi/nonsfi_listener.cc (right): https://codereview.chromium.org/649603004/diff/300001/components/nacl/loader/nonsfi/nonsfi_listener.cc#newcode163 components/nacl/loader/nonsfi/nonsfi_listener.cc:163: std::vector<std::pair<std::string, int> > key_fd_pairs; On 2015/02/04 18:52:16, Mark Seaborn ...
5 years, 10 months ago (2015-02-05 07:21:13 UTC) #34
Yusuke Sato
Please take another look at the diff between patchset #10 and #11, and patchset #12 ...
5 years, 10 months ago (2015-02-05 07:55:41 UTC) #35
Mark Seaborn
https://codereview.chromium.org/649603004/diff/400001/components/nacl/browser/nacl_file_host.cc File components/nacl/browser/nacl_file_host.cc (right): https://codereview.chromium.org/649603004/diff/400001/components/nacl/browser/nacl_file_host.cc#newcode41 components/nacl/browser/nacl_file_host.cc:41: Nit: remove empty line (only 1 between top-level decls) ...
5 years, 10 months ago (2015-02-09 04:48:35 UTC) #36
Yusuke Sato
Please take another look. Re trybots, they seem broken right now. I tried 'git cl ...
5 years, 10 months ago (2015-02-11 05:54:21 UTC) #37
Mark Seaborn
https://codereview.chromium.org/649603004/diff/400001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/649603004/diff/400001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode79 components/nacl/renderer/ppb_nacl_private_impl.cc:79: const size_t kMaxPreOpenResourceFiles = 2; On 2015/02/11 05:54:21, Yusuke ...
5 years, 10 months ago (2015-02-12 03:57:35 UTC) #38
Mark Seaborn
On 11 February 2015 at 19:57, <mseaborn@chromium.org> wrote: > https://codereview.chromium.org/649603004/diff/420001/ > components/nacl/browser/nacl_process_host.cc#newcode242 > components/nacl/browser/nacl_process_host.cc:242: const ...
5 years, 10 months ago (2015-02-12 16:12:10 UTC) #39
Yusuke Sato
Please take another look. Fixed all except the NaClProcessMsg_Start one below: > When the browser ...
5 years, 10 months ago (2015-02-13 23:01:17 UTC) #40
Yusuke Sato
Mark: ping?
5 years, 10 months ago (2015-02-20 23:09:13 UTC) #41
Mark Seaborn
This is a lot simpler now, thanks. My remaining comments are for smaller issues... https://codereview.chromium.org/649603004/diff/460001/components/nacl/browser/nacl_host_message_filter.cc ...
5 years, 10 months ago (2015-02-25 20:01:24 UTC) #42
Yusuke Sato
Please take another look. https://codereview.chromium.org/649603004/diff/460001/components/nacl/browser/nacl_host_message_filter.cc File components/nacl/browser/nacl_host_message_filter.cc (right): https://codereview.chromium.org/649603004/diff/460001/components/nacl/browser/nacl_host_message_filter.cc#newcode157 components/nacl/browser/nacl_host_message_filter.cc:157: content::RenderViewHost* rvh = content::RenderViewHost::FromID( On ...
5 years, 9 months ago (2015-03-01 06:59:38 UTC) #43
Mark Seaborn
You didn't have trybot runs for the change, so I kicked some off. There are ...
5 years, 9 months ago (2015-03-03 18:25:56 UTC) #44
Mark Seaborn
LGTM with the changes below, and please check that the trybot runs' test failures aren't ...
5 years, 9 months ago (2015-03-04 05:07:31 UTC) #45
Yusuke Sato
Thanks. I've confirmed all try bots are green. https://codereview.chromium.org/649603004/diff/480001/components/nacl/browser/nacl_process_host.h File components/nacl/browser/nacl_process_host.h (right): https://codereview.chromium.org/649603004/diff/480001/components/nacl/browser/nacl_process_host.h#newcode54 components/nacl/browser/nacl_process_host.h:54: // ...
5 years, 9 months ago (2015-03-04 18:45:50 UTC) #46
Yusuke Sato
Julien, could you take a look at this CL? This is for ARC, and adds ...
5 years, 9 months ago (2015-03-04 19:24:47 UTC) #48
Mark Seaborn
LGTM
5 years, 9 months ago (2015-03-05 19:37:49 UTC) #49
Yusuke Sato
Julien: ping?
5 years, 9 months ago (2015-03-09 17:28:30 UTC) #50
jln (very slow on Chromium)
*_messages.h lgtm, mostly based on Mark's review.
5 years, 9 months ago (2015-03-10 16:46:49 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/649603004/520001
5 years, 9 months ago (2015-03-10 17:16:39 UTC) #54
commit-bot: I haz the power
Committed patchset #20 (id:520001)
5 years, 9 months ago (2015-03-10 18:51:54 UTC) #55
commit-bot: I haz the power
5 years, 9 months ago (2015-03-10 18:53:10 UTC) #56
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/67e8acdac9e043dd710058ef2e01ca7ad2b29825
Cr-Commit-Position: refs/heads/master@{#319931}

Powered by Google App Engine
This is Rietveld 408576698