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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h

Issue 10843009: Better handling of surfaway/reload in PNaCl translation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h
index 0f7f592165ba87f4621d3f129a462492f61c2ab4..d2c5bf9802a2ed9485bbab138bebfc461065f2f1 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h
@@ -11,6 +11,7 @@
#include "native_client/src/shared/platform/nacl_threads.h"
#include "native_client/src/shared/platform/nacl_sync_checked.h"
#include "native_client/src/trusted/plugin/plugin_error.h"
+#include "native_client/src/trusted/plugin/service_runtime.h"
#include "ppapi/cpp/completion_callback.h"
@@ -64,6 +65,15 @@ class PnaclTranslateThread {
const nacl::string& soname,
const nacl::string& lib_dependencies);
+ // Register a reverse service interface which will be shutdown if the
+ // plugin is shutdown. The reverse service pointer must be available on the
jvoung (off chromium) 2012/07/31 18:51:45 extra spaces: "pointer must be"
Derek Schuff 2012/07/31 18:57:50 Done.
+ // main thread because the translation thread could be blocked on SRPC
jvoung (off chromium) 2012/07/31 18:51:45 for a future CL: would it be possible to make it m
Derek Schuff 2012/07/31 18:57:50 Yeah, actually i think all the code is main thread
+ // waiting for the translator, which could be waiting on a reverse
+ // service call.
+ // (see also the comments in Plugin::~Plugin about ShutdownSubprocesses,
+ // but that only handles the main nexe and not the translator nexes.)
+ void RegisterReverseInterface(PluginReverseInterface *interface);
+
// Callback to run when tasks are completed or an error has occurred.
pp::CompletionCallback report_translate_finished_;
// True if the translation thread and related subprocesses should exit.
@@ -73,6 +83,9 @@ class PnaclTranslateThread {
nacl::scoped_ptr<NaClThread> translate_thread_;
+ // Reverse interface to shutdown on SetSubprocessesShouldDie
+ PluginReverseInterface* current_rev_interface_;
+
// Data about the translation files, owned by the coordinator
const Manifest* manifest_;
const Manifest* ld_manifest_;

Powered by Google App Engine
This is Rietveld 408576698