summaryrefslogtreecommitdiffstats
path: root/sandbox/src
diff options
context:
space:
mode:
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;