Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/plugin.cc |
| diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc |
| index 2dffec6928d3d49a4332b71c774a189bdcaee6d1..bf2c662aa3d759d3efab7cedf5a86273634a04fa 100644 |
| --- a/ppapi/native_client/src/trusted/plugin/plugin.cc |
| +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc |
| @@ -111,17 +111,15 @@ bool Plugin::LoadNaClModuleFromBackgroundThread( |
| // We can't use pp::BlockUntilComplete() inside an in-process plugin, so we |
| // have to roll our own blocking logic, similar to WaitForSelLdrStart() |
| // above, except without timeout logic. |
| - bool nexe_started = false; |
| - pp::CompletionCallback nexe_started_callback = callback_factory_.NewCallback( |
| - &Plugin::SignalNexeStarted, &nexe_started, service_runtime); |
| pp::Module::Get()->core()->CallOnMainThread( |
| 0, |
| callback_factory_.NewCallback( |
| &Plugin::LoadNexeAndStart, |
| - service_runtime, info, nexe_started_callback)); |
| - service_runtime->WaitForNexeStart(); |
| - |
| - return nexe_started; |
| + service_runtime, |
| + info |
|
hidehiko
2014/06/18 05:07:04
nit: )); should be in this line.
There is no speci
Nick Bray (chromium)
2014/06/18 18:29:44
Done.
|
| + ) |
| + ); |
| + return service_runtime->WaitForNexeStart(); |
| } |
| void Plugin::StartSelLdrOnMainThread(int32_t pp_error, |
| @@ -144,13 +142,6 @@ void Plugin::SignalStartSelLdrDone(int32_t pp_error, |
| service_runtime->SignalStartSelLdrDone(); |
| } |
| -void Plugin::SignalNexeStarted(int32_t pp_error, |
| - bool* started, |
| - ServiceRuntime* service_runtime) { |
| - *started = (pp_error == PP_OK); |
| - service_runtime->SignalNexeStarted(); |
| -} |
| - |
| void Plugin::LoadNaClModule(PP_NaClFileInfo file_info, |
| bool uses_nonsfi_mode, |
| bool enable_dyncode_syscalls, |
| @@ -192,20 +183,18 @@ void Plugin::LoadNaClModule(PP_NaClFileInfo file_info, |
| // We don't take any action once nexe loading has completed, so pass an empty |
| // callback here for |callback|. |
| pp::CompletionCallback callback = callback_factory_.NewCallback( |
| - &Plugin::LoadNexeAndStart, |
| - service_runtime, file_info, pp::CompletionCallback()); |
| + &Plugin::LoadNexeAndStart, service_runtime, file_info); |
| StartSelLdrOnMainThread( |
| static_cast<int32_t>(PP_OK), service_runtime, params, callback); |
| } |
| void Plugin::LoadNexeAndStart(int32_t pp_error, |
| ServiceRuntime* service_runtime, |
| - PP_NaClFileInfo file_info, |
| - const pp::CompletionCallback& callback) { |
| + PP_NaClFileInfo file_info) { |
| CHECK(pp::Module::Get()->core()->IsMainThread()); |
| if (pp_error != PP_OK) |
| return; |
| - service_runtime->LoadNexeAndStart(file_info, callback); |
| + service_runtime->LoadNexeAndStart(file_info); |
| } |
| bool Plugin::LoadNaClModuleContinuationIntern() { |