Chromium Code Reviews| Index: mojo/runner/child_process.cc |
| diff --git a/mojo/runner/child_process.cc b/mojo/runner/child_process.cc |
| index 33ac3cdb46fd9f4915853835674a1f0e29fa1321..a01a894235fd49ce3ac2fad64044c1458f2f6bce 100644 |
| --- a/mojo/runner/child_process.cc |
| +++ b/mojo/runner/child_process.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/callback_helpers.h" |
| #include "base/command_line.h" |
| #include "base/files/file_path.h" |
| +#include "base/i18n/icu_util.h" |
| #include "base/location.h" |
| #include "base/logging.h" |
| #include "base/macros.h" |
| @@ -24,6 +25,7 @@ |
| #include "mojo/public/cpp/bindings/binding.h" |
| #include "mojo/public/cpp/system/core.h" |
| #include "mojo/runner/child/child_controller.mojom.h" |
| +#include "mojo/runner/init.h" |
| #include "mojo/runner/native_application_support.h" |
| #include "mojo/runner/switches.h" |
| #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" |
| @@ -292,22 +294,19 @@ int ChildProcessMain() { |
| app_library = mojo::runner::LoadNativeApplication( |
| command_line.GetSwitchValuePath(switches::kChildProcess)); |
| + // ICU data is a thing every part of the system needs. This here warms |
| + // up the copy of ICU in the mojo runner. |
| + base::i18n::InitializeICU(); |
|
sky
2015/11/05 03:40:17
Is there a way this could be optional? Seems sad t
|
| + CallLibraryEarlyInitialization(app_library); |
| + |
| #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| if (command_line.HasSwitch(switches::kEnableSandbox)) { |
| - // Warm parts of base. |
| + // Warm parts of base in the copy of base in the mojo runner. |
| base::RandUint64(); |
| base::SysInfo::AmountOfPhysicalMemory(); |
| base::SysInfo::MaxSharedMemorySize(); |
| base::SysInfo::NumberOfProcessors(); |
| - // Do whatever warming that the mojo application wants. |
| - typedef void (*SandboxWarmFunction)(); |
| - SandboxWarmFunction sandbox_warm = reinterpret_cast<SandboxWarmFunction>( |
| - base::GetFunctionPointerFromNativeLibrary(app_library, |
| - "MojoSandboxWarm")); |
| - if (sandbox_warm) |
| - sandbox_warm(); |
| - |
| // TODO(erg,jln): Allowing access to all of /dev/shm/ makes it easy to |
| // spy on other shared memory using processes. This is a temporary hack |
| // so that we have some sandbox until we have proper shared memory |