Chromium Code Reviews| 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 12ab43122bf1e9397aa92f1b9ef88a0796489aa5..a5035f50938258d98da3e354c04251b76adcc946 100644 |
| --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| @@ -459,14 +459,8 @@ void ServiceRuntime::SignalNexeStarted(bool ok) { |
| NaClXCondVarSignal(&cond_); |
| } |
| -void ServiceRuntime::LoadNexeAndStart(PP_NaClFileInfo file_info) { |
| - NaClLog(4, "ServiceRuntime::LoadNexeAndStart (handle_valid=%d " |
| - "token_lo=%" NACL_PRIu64 " token_hi=%" NACL_PRIu64 ")\n", |
| - file_info.handle != PP_kInvalidFileHandle, |
| - file_info.token_lo, |
| - file_info.token_hi); |
| - |
| - bool ok = LoadNexeAndStartInternal(file_info); |
| +void ServiceRuntime::LoadNexeAndStart() { |
|
Mark Seaborn
2014/06/30 20:01:04
Since LoadNexeAndStart() no longer loads the nexe,
teravest
2014/06/30 22:04:57
Done.
|
| + bool ok = LoadNexeAndStartInternal(); |
| if (ok) { |
| NaClLog(4, "ServiceRuntime::LoadNexeAndStart (success)\n"); |
| } else { |
| @@ -477,47 +471,14 @@ void ServiceRuntime::LoadNexeAndStart(PP_NaClFileInfo file_info) { |
| SignalNexeStarted(ok); |
| } |
| -bool ServiceRuntime::LoadNexeAndStartInternal( |
| - const PP_NaClFileInfo& file_info) { |
| +bool ServiceRuntime::LoadNexeAndStartInternal() { |
| if(!SetupCommandChannel()) { |
| return false; |
| } |
| if (!InitReverseService()) { |
| return false; |
| } |
| - if (!LoadModule(file_info)) { |
| - ErrorInfo error_info; |
| - error_info.SetReport(PP_NACL_ERROR_SEL_LDR_COMMUNICATION_CMD_CHANNEL, |
| - "ServiceRuntime: load module failed"); |
| - ReportLoadError(error_info); |
| - return false; |
| - } |
| - if (!StartModule()) { |
| - return false; |
| - } |
| - return true; |
| -} |
| - |
| -bool ServiceRuntime::LoadModule(const PP_NaClFileInfo& file_info) { |
| - if (uses_nonsfi_mode_) { |
| - // In non-SFI mode, loading is done a part of LaunchSelLdr. |
| - return true; |
| - } |
| - |
| - NaClFileInfo nacl_file_info; |
| - nacl_file_info.desc = ConvertFileDescriptor(file_info.handle, true); |
| - nacl_file_info.file_token.lo = file_info.token_lo; |
| - nacl_file_info.file_token.hi = file_info.token_hi; |
| - NaClDesc* desc = NaClDescIoFromFileInfo(nacl_file_info, O_RDONLY); |
| - if (desc == NULL) { |
| - return false; |
| - } |
| - // We don't use a scoped_ptr here since we would immediately release the |
| - // DescWrapper to LoadModule(). |
| - nacl::DescWrapper* wrapper = |
| - plugin_->wrapper_factory()->MakeGenericCleanup(desc); |
| - // TODO(teravest, hidehiko): Replace this by Chrome IPC. |
| - return subprocess_->LoadModule(&command_channel_, wrapper); |
| + return StartModule(); |
| } |
| void ServiceRuntime::ReapLogs() { |