| Index: base/debug/close_handle_hook_win.cc
|
| diff --git a/base/debug/close_handle_hook_win.cc b/base/debug/close_handle_hook_win.cc
|
| index 6ff6fa2d815f49aa8bed83ed4c0a9f57993a676f..0d617b5af62ca7b8c592967cb3d207957cf01bae 100644
|
| --- a/base/debug/close_handle_hook_win.cc
|
| +++ b/base/debug/close_handle_hook_win.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/win/iat_patch_function.h"
|
| #include "base/win/pe_image.h"
|
| #include "base/win/scoped_handle.h"
|
| +#include "base/win/windows_version.h"
|
| #include "build/build_config.h"
|
|
|
| namespace {
|
| @@ -259,12 +260,19 @@ void PatchLoadedModules(HandleHooks* hooks) {
|
| } // namespace
|
|
|
| void InstallHandleHooks() {
|
| +#if !defined(DISABLE_HANDLE_VERIFIER_HOOKS)
|
| +#if defined(_DEBUG)
|
| + // Handle hooks cause shutdown asserts in Debug on Windows 7. crbug.com/571304
|
| + if (base::win::GetVersion() < base::win::VERSION_WIN8)
|
| + return;
|
| +#endif
|
| HandleHooks* hooks = g_hooks.Pointer();
|
|
|
| // Performing EAT interception first is safer in the presence of other
|
| // threads attempting to call CloseHandle.
|
| hooks->AddEATPatch();
|
| PatchLoadedModules(hooks);
|
| +#endif
|
| }
|
|
|
| void RemoveHandleHooks() {
|
|
|