diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 21:30:34 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 21:30:34 +0000 |
commit | 5051fa9af913d462ac26a05a113e4f1699b6fcb9 (patch) | |
tree | ebc1d695cab19acd49571ae267b46074ab11a5a6 /sandbox/src | |
parent | 9db68e0b33f3eb62b15f13fd22481e4c49558211 (diff) | |
download | chromium_src-5051fa9af913d462ac26a05a113e4f1699b6fcb9.zip chromium_src-5051fa9af913d462ac26a05a113e4f1699b6fcb9.tar.gz chromium_src-5051fa9af913d462ac26a05a113e4f1699b6fcb9.tar.bz2 |
Warm up GetUserDefaultLangID before closing client ALPC connections.
BUG=90492
TEST=Run Chrome on 32-bit Windows 7 or Vista
Review URL: http://codereview.chromium.org/7461092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src')
-rw-r--r-- | sandbox/src/handle_closer_agent.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sandbox/src/handle_closer_agent.cc b/sandbox/src/handle_closer_agent.cc index b640c08..4e946f2 100644 --- a/sandbox/src/handle_closer_agent.cc +++ b/sandbox/src/handle_closer_agent.cc @@ -56,6 +56,13 @@ bool HandleCloserAgent::CloseHandles() { const int kInvalidHandleThreshold = 100; const size_t kHandleOffset = sizeof(HANDLE); + // Need to warm up GetUserDefaultLangID first if we're closing ALPC clients. + HandleMap::iterator names = handles_to_close_.find(L"ALPC Port"); + if (names != handles_to_close_.end() && + (names->second.empty() || names->second.size() == 0)) { + ::GetUserDefaultLangID(); + } + if (!::GetProcessHandleCount(::GetCurrentProcess(), &handle_count)) return false; |