diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-12 16:48:25 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-12 16:48:25 +0000 |
commit | b40d59ad80efe5c10ef15ed7a5fd3544f627ba7b (patch) | |
tree | c0aba5fbf598d721e5df7920acde5814c463d52a /content | |
parent | f7cde89d8315749390552b298c14bc4f96612e60 (diff) | |
download | chromium_src-b40d59ad80efe5c10ef15ed7a5fd3544f627ba7b.zip chromium_src-b40d59ad80efe5c10ef15ed7a5fd3544f627ba7b.tar.gz chromium_src-b40d59ad80efe5c10ef15ed7a5fd3544f627ba7b.tar.bz2 |
Warm up locale and KsecDD in renderer sandbox
I did this in the other sandboxed processes, but missed the renderer because these susbsystems get warmed up implicitly by other initialization. However, changing initialization order (or dependency changes in the underlying libraries) could introduce random crashes. So, for consistency explicit warmup is best, and will be needed for a later patch that closes the LPC ports.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7629015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/renderer/renderer_main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc index 2c1937b..61f10f5 100644 --- a/content/renderer/renderer_main.cc +++ b/content/renderer/renderer_main.cc @@ -208,6 +208,12 @@ int RendererMain(const MainFunctionParams& parameters) { #endif bool run_loop = true; if (!no_sandbox) { + // Cause advapi32 to load before the sandbox is turned on. + unsigned int dummy_rand; + rand_s(&dummy_rand); + // Warm up language subsystems before the sandbox is turned on. + ::GetUserDefaultLangID(); + ::GetUserDefaultLCID(); run_loop = platform.EnableSandbox(); } else { LOG(ERROR) << "Running without renderer sandbox"; |