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 168de67bcc066f2f73452185296beeacb6aa4795..2f82674541b8df5caf11f583e7ddafa5850869b7 100644 |
--- a/base/debug/close_handle_hook_win.cc |
+++ b/base/debug/close_handle_hook_win.cc |
@@ -12,7 +12,6 @@ |
#include <memory> |
#include <vector> |
-#include "base/lazy_instance.h" |
#include "base/macros.h" |
#include "base/win/iat_patch_function.h" |
#include "base/win/pe_image.h" |
@@ -203,7 +202,6 @@ class HandleHooks { |
std::vector<base::win::IATPatchFunction*> hooks_; |
DISALLOW_COPY_AND_ASSIGN(HandleHooks); |
}; |
-base::LazyInstance<HandleHooks> g_hooks = LAZY_INSTANCE_INITIALIZER; |
void HandleHooks::AddIATPatch(HMODULE module) { |
if (!module) |
@@ -259,7 +257,7 @@ void PatchLoadedModules(HandleHooks* hooks) { |
} // namespace |
void InstallHandleHooks() { |
- HandleHooks* hooks = g_hooks.Pointer(); |
+ static HandleHooks* hooks = new HandleHooks(); |
// Performing EAT interception first is safer in the presence of other |
// threads attempting to call CloseHandle. |