summaryrefslogtreecommitdiffstats
path: root/mojo/shell
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 20:21:40 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 20:21:40 +0000
commitcf28cd1ed8bc378ba1260a94897ab8c9aecbc894 (patch)
treee288c75db8a5ff448240913eee0839ef630dd1f9 /mojo/shell
parentd2202e2a3ea471caeab836e7f215bfdc20f23f2f (diff)
downloadchromium_src-cf28cd1ed8bc378ba1260a94897ab8c9aecbc894.zip
chromium_src-cf28cd1ed8bc378ba1260a94897ab8c9aecbc894.tar.gz
chromium_src-cf28cd1ed8bc378ba1260a94897ab8c9aecbc894.tar.bz2
Make mojo_system static and mojo_system_impl a component, never use both
BUG= R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/231353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r--mojo/shell/in_process_dynamic_service_runner.cc15
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"));