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

Unified Diff: ppapi/native_client/src/trusted/plugin/service_runtime.cc

Issue 337463002: Remove LoadModule SRPC for non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/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 3d7323e2dd2efcae6629ecb6f00436d1125d7c6d..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,9 +711,10 @@ void ServiceRuntime::StartSelLdr(const SelLdrStartParams& params,
tmp_subprocess->Start(plugin_->pp_instance(),
main_service_runtime_,
params.url.c_str(),
+ &params.file_info,
params.uses_irt,
params.uses_ppapi,
- params.uses_nonsfi_mode,
+ uses_nonsfi_mode_,
enable_dev_interfaces,
params.enable_dyncode_syscalls,
params.enable_exception_handling,

Powered by Google App Engine
This is Rietveld 408576698