Merge from Chromium at DEPS revision 288042
This commit was generated by merge_to_master.py.
Change-Id: I583602ff16d735199f1810565c9296e970ce2854
diff --git a/sandbox/win/src/handle_closer_agent.cc b/sandbox/win/src/handle_closer_agent.cc
index be0ffc1..07c6a09 100644
--- a/sandbox/win/src/handle_closer_agent.cc
+++ b/sandbox/win/src/handle_closer_agent.cc
@@ -78,7 +78,7 @@
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;
diff --git a/sandbox/win/src/handle_closer_test.cc b/sandbox/win/src/handle_closer_test.cc
index 8e821ce..2082baa 100644
--- a/sandbox/win/src/handle_closer_test.cc
+++ b/sandbox/win/src/handle_closer_test.cc
@@ -73,7 +73,7 @@
// Brute force the handle table to find what we're looking for.
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.
HANDLE handle = NULL;
int invalid_count = 0;
base::string16 handle_name;
diff --git a/sandbox/win/src/registry_dispatcher.cc b/sandbox/win/src/registry_dispatcher.cc
index 2a92497..f98d1d3 100644
--- a/sandbox/win/src/registry_dispatcher.cc
+++ b/sandbox/win/src/registry_dispatcher.cc
@@ -63,7 +63,10 @@
if (IPC_NTOPENKEY_TAG == service) {
bool result = INTERCEPT_NT(manager, NtOpenKey, OPEN_KEY_ID, 16);
- if (base::win::GetVersion() >= base::win::VERSION_WIN7)
+ if (base::win::GetVersion() >= base::win::VERSION_WIN7 ||
+ (base::win::GetVersion() == base::win::VERSION_VISTA &&
+ base::win::OSInfo::GetInstance()->version_type() ==
+ base::win::SUITE_SERVER))
result &= INTERCEPT_NT(manager, NtOpenKeyEx, OPEN_KEY_EX_ID, 20);
return result;
}