summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper
diff options
context:
space:
mode:
authorjvoung@chromium.org <jvoung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-13 04:44:35 +0000
committerjvoung@chromium.org <jvoung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-13 04:44:35 +0000
commitc24446204bae34ccfb24f554b61fdba836b180f9 (patch)
tree10507b021440697c9aba727dbbc5fd5b29fa1a79 /chrome/renderer/pepper
parentbc63a8ecee1ab18fceb0f32304b5d3740dffe10c (diff)
downloadchromium_src-c24446204bae34ccfb24f554b61fdba836b180f9.zip
chromium_src-c24446204bae34ccfb24f554b61fdba836b180f9.tar.gz
chromium_src-c24446204bae34ccfb24f554b61fdba836b180f9.tar.bz2
PNaCl: Have plugin's LoadNaClModuleCommon start sel_ldr from the main thread.
Down stream ppb_nacl_private's LaunchSelLdr expects to run on the main thread to be thread safe. PNaCl currently violates that, using arbitrary helper threads to run LaunchSelLdr. This changes the plugin to bounce the request to the main thread and block until complete before launching sel_ldr. We only do the sel_ldr process creation on the main thread, and the blocking load/validate of the nexe is split off and done on the background thread. TODO: Remove the EnableBackgroundSelLdrLaunch(), since we are no longer doing the actual work off the main thread. BUG=https://code.google.com/p/chromium/issues/detail?id=259010 Review URL: https://chromiumcodereview.appspot.com/19092004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper')
-rw-r--r--chrome/renderer/pepper/ppb_nacl_private_impl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/renderer/pepper/ppb_nacl_private_impl.cc b/chrome/renderer/pepper/ppb_nacl_private_impl.cc
index 52de35e..1483838 100644
--- a/chrome/renderer/pepper/ppb_nacl_private_impl.cc
+++ b/chrome/renderer/pepper/ppb_nacl_private_impl.cc
@@ -42,6 +42,8 @@ namespace {
// This allows us to send requests from background threads.
// E.g., to do LaunchSelLdr for helper nexes (which is done synchronously),
// in a background thread, to avoid jank.
+// TODO(jvoung): remove this since we are no longer launching from background
+// threads (or rename this if others are using it).
base::LazyInstance<scoped_refptr<IPC::SyncMessageFilter> >
g_background_thread_sender = LAZY_INSTANCE_INITIALIZER;
@@ -95,9 +97,7 @@ PP_NaClResult LaunchSelLdr(PP_Instance instance,
void* imc_handle) {
nacl::FileDescriptor result_socket;
IPC::Sender* sender = content::RenderThread::Get();
- if (sender == NULL)
- sender = g_background_thread_sender.Pointer()->get();
-
+ DCHECK(sender);
int routing_id = 0;
// If the nexe uses ppapi APIs, we need a routing ID.
// To get the routing ID, we must be on the main thread.