diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-15 03:14:25 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-15 03:14:25 +0000 |
commit | 3a73473578cabeda52d8573ca2f07bfced69c003 (patch) | |
tree | 1f983e43fca3dc3cbeb89097392a9844abcdbaaa /mojo/shell | |
parent | 6916f5a8409a4b7acbbd8df297bbb96846f63743 (diff) | |
download | chromium_src-3a73473578cabeda52d8573ca2f07bfced69c003.zip chromium_src-3a73473578cabeda52d8573ca2f07bfced69c003.tar.gz chromium_src-3a73473578cabeda52d8573ca2f07bfced69c003.tar.bz2 |
Make mojo_system static and mojo_system_impl a component, never use both
Try #2, after https://codereview.chromium.org/231353002/
broke build.
BUG=
TBR=vtl
Review URL: https://codereview.chromium.org/237763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r-- | mojo/shell/in_process_dynamic_service_runner.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mojo/shell/in_process_dynamic_service_runner.cc b/mojo/shell/in_process_dynamic_service_runner.cc index 9030d59..6604180 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,20 @@ void InProcessDynamicServiceRunner::Run() { break; } + MojoSetSystemThunksFn mojo_set_system_thunks_fn = + reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( + "MojoSetSystemThunks")); + if (mojo_set_system_thunks_fn) { + MojoSystemThunks system_thunks = MojoMakeSystemThunks(); + size_t expected_size = mojo_set_system_thunks_fn(&system_thunks); + if (expected_size > sizeof(MojoSystemThunks)) { + LOG(ERROR) + << "Invalid DSO. Expected MojoSystemThunks size: " + << expected_size; + break; + } + } + typedef MojoResult (*MojoMainFunction)(MojoHandle); MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>( app_library.GetFunctionPointer("MojoMain")); |