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

Unified Diff: mojo/runner/child_process.cc

Issue 1429263005: Revert of mandoline: Fix ICU initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/BUILD.gn ('k') | mojo/runner/context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/child_process.cc
diff --git a/mojo/runner/child_process.cc b/mojo/runner/child_process.cc
index ebce4dbb30f230151417fd322332476699818d15..33ac3cdb46fd9f4915853835674a1f0e29fa1321 100644
--- a/mojo/runner/child_process.cc
+++ b/mojo/runner/child_process.cc
@@ -9,7 +9,6 @@
#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"
@@ -25,7 +24,6 @@
#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"
@@ -294,16 +292,21 @@
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 in the copy of base in the mojo runner.
+ // Warm parts of base.
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
« no previous file with comments | « mojo/runner/BUILD.gn ('k') | mojo/runner/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698