diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 20:13:26 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 20:13:26 +0000 |
commit | 89b2312b5aca51da726b93e966842ffd5f642402 (patch) | |
tree | 1d971d0c9005452ac115e37f831e8aa5c67ac0a6 /content/ppapi_plugin | |
parent | 9208de7ee3590c34a135ca0298c2618779064f69 (diff) | |
download | chromium_src-89b2312b5aca51da726b93e966842ffd5f642402.zip chromium_src-89b2312b5aca51da726b93e966842ffd5f642402.tar.gz chromium_src-89b2312b5aca51da726b93e966842ffd5f642402.tar.bz2 |
Hook GetUserDefaultLCID () to prevent crashes on attempting to connect to CSRSS after lockdown.
BUG=91216
TEST=None.
Review URL: http://codereview.chromium.org/7541034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 72a6d71..10d95d9 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -140,8 +140,16 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { // Once we lower the token the sandbox is locked down and no new modules // can be loaded. TODO(cpu): consider changing to the loading style of // regular plugins. - if (g_target_services) + if (g_target_services) { + // 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(); + g_target_services->LowerToken(); + } #endif if (!library.is_valid()) { |