Index: ppapi/native_client/src/trusted/plugin/service_runtime.cc |
diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
index ea4736d31c48144777a2843ef3d0c1e3cc13bab2..fb0ac00753ec8035b0828002be3553a6a42118b2 100644 |
--- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
+++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
@@ -527,6 +527,11 @@ bool ServiceRuntime::SetupCommandChannel() { |
NaClLog(4, "ServiceRuntime::SetupCommand (this=%p, subprocess=%p)\n", |
static_cast<void*>(this), |
static_cast<void*>(subprocess_.get())); |
+ if (uses_nonsfi_mode_) { |
+ // In non-SFI mode, no SRPC is used. Just skips and returns success. |
+ return true; |
+ } |
+ |
if (!subprocess_->SetupCommand(&command_channel_)) { |
if (main_service_runtime_) { |
ErrorInfo error_info; |
@@ -541,6 +546,12 @@ bool ServiceRuntime::SetupCommandChannel() { |
void ServiceRuntime::LoadModule(PP_NaClFileInfo file_info, |
pp::CompletionCallback callback) { |
+ if (uses_nonsfi_mode_) { |
+ // In non-SFI mode, loading is done a part of LaunchSelLdr. |
+ DidLoadModule(callback, PP_OK); |
+ return; |
+ } |
+ |
NaClFileInfo nacl_file_info; |
nacl_file_info.desc = ConvertFileDescriptor(file_info.handle, true); |
nacl_file_info.file_token.lo = file_info.token_lo; |
@@ -700,6 +711,7 @@ void ServiceRuntime::StartSelLdr(const SelLdrStartParams& params, |
tmp_subprocess->Start(plugin_->pp_instance(), |
main_service_runtime_, |
params.url.c_str(), |
+ ¶ms.file_info, |
params.uses_irt, |
params.uses_ppapi, |
uses_nonsfi_mode_, |