summaryrefslogtreecommitdiffstats
path: root/chromium/sandbox/win/src/handle_closer_agent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/sandbox/win/src/handle_closer_agent.cc')
-rw-r--r--chromium/sandbox/win/src/handle_closer_agent.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chromium/sandbox/win/src/handle_closer_agent.cc b/chromium/sandbox/win/src/handle_closer_agent.cc
index bc75e7322b2..07c6a09854d 100644
--- a/chromium/sandbox/win/src/handle_closer_agent.cc
+++ b/chromium/sandbox/win/src/handle_closer_agent.cc
@@ -49,9 +49,9 @@ void HandleCloserAgent::InitializeHandlesToClose() {
HandleListEntry* entry = g_handles_to_close->handle_entries;
for (size_t i = 0; i < g_handles_to_close->num_handle_types; ++i) {
// Set the type name.
- char16* input = entry->handle_type;
+ base::char16* input = entry->handle_type;
HandleMap::mapped_type& handle_names = handles_to_close_[input];
- input = reinterpret_cast<char16*>(reinterpret_cast<char*>(entry)
+ input = reinterpret_cast<base::char16*>(reinterpret_cast<char*>(entry)
+ entry->offset_to_names);
// Grab all the handle names.
for (size_t j = 0; j < entry->name_count; ++j) {
@@ -65,9 +65,9 @@ void HandleCloserAgent::InitializeHandlesToClose() {
entry = reinterpret_cast<HandleListEntry*>(reinterpret_cast<char*>(entry)
+ entry->record_bytes);
- DCHECK(reinterpret_cast<char16*>(entry) >= input);
- DCHECK(reinterpret_cast<char16*>(entry) - input <
- sizeof(size_t) / sizeof(char16));
+ DCHECK(reinterpret_cast<base::char16*>(entry) >= input);
+ DCHECK(reinterpret_cast<base::char16*>(entry) - input <
+ sizeof(size_t) / sizeof(base::char16));
}
// Clean up the memory we copied over.
@@ -78,7 +78,7 @@ void HandleCloserAgent::InitializeHandlesToClose() {
bool HandleCloserAgent::CloseHandles() {
DWORD handle_count = UINT_MAX;
const int kInvalidHandleThreshold = 100;
- const size_t kHandleOffset = sizeof(HANDLE);
+ const size_t kHandleOffset = 4; // Handles are always a multiple of 4.
if (!::GetProcessHandleCount(::GetCurrentProcess(), &handle_count))
return false;
@@ -88,7 +88,7 @@ bool HandleCloserAgent::CloseHandles() {
32 * sizeof(wchar_t));
OBJECT_TYPE_INFORMATION* type_info =
reinterpret_cast<OBJECT_TYPE_INFORMATION*>(&(type_info_buffer[0]));
- string16 handle_name;
+ base::string16 handle_name;
HANDLE handle = NULL;
int invalid_count = 0;