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

Unified Diff: components/nacl/renderer/plugin/pnacl_coordinator.h

Issue 1128943003: Move PNaCl process startup back to the main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/renderer/plugin/plugin.cc ('k') | components/nacl/renderer/plugin/pnacl_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/plugin/pnacl_coordinator.h
diff --git a/components/nacl/renderer/plugin/pnacl_coordinator.h b/components/nacl/renderer/plugin/pnacl_coordinator.h
index 73744903d85badb22518dd1771b2912ef4caa762..8c9f4a53d2bd7b2cd0f02f3bc52e828087a212c6 100644
--- a/components/nacl/renderer/plugin/pnacl_coordinator.h
+++ b/components/nacl/renderer/plugin/pnacl_coordinator.h
@@ -32,13 +32,13 @@ class TempFile;
// PnaclCoordinator* coord = BitcodeToNative(plugin,
// "http://foo.com/my.pexe",
// pnacl_options,
-// TranslateNotifyCallback);
-// (2) TranslateNotifyCallback gets invoked when translation is complete.
+// translate_notify_callback);
+// (2) translate_notify_callback gets invoked when translation is complete.
// If the translation was successful, the pp_error argument is PP_OK.
// Other values indicate errors.
// (3) After finish_callback runs, get the file descriptor of the translated
// nexe, e.g.,
-// fd = coord->ReleaseTranslatedFD();
+// fd = coord->TakeTranslatedFileHandle();
// (4) Load the nexe from "fd".
// (5) delete coord.
//
@@ -106,7 +106,10 @@ class PnaclCoordinator {
// Once llc and ld nexes have been loaded and the two temporary files have
// been created, this starts the translation. Translation starts two
// subprocesses, one for llc and one for ld.
- void RunTranslate(int32_t pp_error);
+ void LoadCompiler();
+ void RunCompile(int32_t pp_error, int64_t compile_load_start_time);
+ void LoadLinker(int32_t pp_error);
+ void RunLink(int32_t pp_error, int64_t ld_load_start_time);
// Invoked when translation is finished.
void TranslateFinished(int32_t pp_error);
@@ -148,6 +151,8 @@ class PnaclCoordinator {
// An auxiliary class that manages downloaded resources (llc and ld nexes).
nacl::scoped_ptr<PnaclResources> resources_;
+ NaClSubprocess compiler_subprocess_;
+ NaClSubprocess ld_subprocess_;
// The URL for the pexe file.
std::string pexe_url_;
« no previous file with comments | « components/nacl/renderer/plugin/plugin.cc ('k') | components/nacl/renderer/plugin/pnacl_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698