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

Unified Diff: mojo/runner/host/child_process.cc

Issue 1431133003: mandoline: Reland "Fix ICU initialization". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT and then fix compile. Created 5 years, 1 month 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
« no previous file with comments | « mojo/runner/host/BUILD.gn ('k') | mojo/runner/host/in_process_native_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/host/child_process.cc
diff --git a/mojo/runner/host/child_process.cc b/mojo/runner/host/child_process.cc
index 0bb20b1be2bfe23a7ecd780ee535115475ae1790..88d3a182fd9244fc8baef504a698a3b10df1c207 100644
--- a/mojo/runner/host/child_process.cc
+++ b/mojo/runner/host/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/runner/child/child_controller.mojom.h"
#include "mojo/runner/host/native_application_support.h"
#include "mojo/runner/host/switches.h"
+#include "mojo/runner/init.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
#include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h"
@@ -292,22 +294,17 @@ int ChildProcessMain() {
app_library = mojo::runner::LoadNativeApplication(
command_line.GetSwitchValuePath(switches::kChildProcess));
+ base::i18n::InitializeICU();
+ 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
« no previous file with comments | « mojo/runner/host/BUILD.gn ('k') | mojo/runner/host/in_process_native_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698