summaryrefslogtreecommitdiffstats
path: root/sandbox/src
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 21:30:34 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 21:30:34 +0000
commit5051fa9af913d462ac26a05a113e4f1699b6fcb9 (patch)
treeebc1d695cab19acd49571ae267b46074ab11a5a6 /sandbox/src
parent9db68e0b33f3eb62b15f13fd22481e4c49558211 (diff)
downloadchromium_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.cc7
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;