Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: mojo/shell/in_process_dynamic_service_runner.cc

Issue 231353002: Make mojo_system static and mojo_system_impl a component, never use both (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix accidental change to .gitmodules Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"));

Powered by Google App Engine
This is Rietveld 408576698