Chromium Code Reviews| Index: mojo/shell/in_process_dynamic_service_runner.cc |
| diff --git a/mojo/shell/in_process_dynamic_service_runner.cc b/mojo/shell/in_process_dynamic_service_runner.cc |
| index 9030d59927604cc4c33d5795f78e63f661217603..01f859df92784a670753d25433483373066059d9 100644 |
| --- a/mojo/shell/in_process_dynamic_service_runner.cc |
| +++ b/mojo/shell/in_process_dynamic_service_runner.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/logging.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "base/scoped_native_library.h" |
| +#include "mojo/public/platform/native/system_thunks.h" |
| namespace mojo { |
| namespace shell { |
| @@ -63,6 +64,21 @@ void InProcessDynamicServiceRunner::Run() { |
| break; |
| } |
| + MojoSetSystemThunksFn mojo_set_system_thunks_fn = |
| + reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( |
| + "MojoSetSystemThunks")); |
| + if (!mojo_set_system_thunks_fn) { |
| + LOG(ERROR) << "Entrypoint MojoSetSystemThunks not found"; |
| + break; |
| + } |
| + MojoSystemThunks system_thunks = MojoMakeSystemThunks(); |
| + size_t exported_size = mojo_set_system_thunks_fn(&system_thunks); |
| + if (exported_size > sizeof(MojoSystemThunks)) { |
| + LOG(ERROR) |
| + << "Invalid DSO. Expected MojoSystemThunks size: " |
| + << exported_size; |
| + } |
|
viettrungluu
2014/04/09 23:06:44
break;
DaveMoore
2014/04/10 18:58:58
Done.
|
| + |
| typedef MojoResult (*MojoMainFunction)(MojoHandle); |
| MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>( |
| app_library.GetFunctionPointer("MojoMain")); |