| Index: base/win/scoped_handle.h
|
| diff --git a/base/win/scoped_handle.h b/base/win/scoped_handle.h
|
| index 6603e681109d6b0d1c342f7e42898d04a4a712fd..782f55dd706bf159942f4e401a584f1e14160949 100644
|
| --- a/base/win/scoped_handle.h
|
| +++ b/base/win/scoped_handle.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/move.h"
|
| +#include "base/win/base_features.h"
|
|
|
| // TODO(rvargas): remove this with the rest of the verifier.
|
| #if defined(COMPILER_MSVC)
|
| @@ -152,6 +153,7 @@ class DummyVerifierTraits {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(DummyVerifierTraits);
|
| };
|
|
|
| +#if BUILDFLAG(ENABLE_HANDLE_VERIFIER)
|
| // Performs actual run-time tracking.
|
| class BASE_EXPORT VerifierTraits {
|
| public:
|
| @@ -168,6 +170,19 @@ class BASE_EXPORT VerifierTraits {
|
|
|
| typedef GenericScopedHandle<HandleTraits, VerifierTraits> ScopedHandle;
|
|
|
| +// This testing function returns the module that the ActiveVerifier concrete
|
| +// implementation was instantiated in.
|
| +BASE_EXPORT HMODULE GetHandleVerifierModuleForTesting();
|
| +#else
|
| +typedef GenericScopedHandle<HandleTraits, DummyVerifierTraits> ScopedHandle;
|
| +#endif // BUILDFLAG(ENABLE_HANDLE_VERIFIER)
|
| +
|
| +// This should be called whenever the OS is closing a handle, if extended
|
| +// verification of improper handle closing is desired. If |handle| is being
|
| +// tracked by the handle verifier and ScopedHandle is not the one closing it,
|
| +// a CHECK is generated.
|
| +BASE_EXPORT void OnHandleBeingClosed(HANDLE handle);
|
| +
|
| // This function may be called by the embedder to disable the use of
|
| // VerifierTraits at runtime. It has no effect if DummyVerifierTraits is used
|
| // for ScopedHandle.
|
| @@ -179,10 +194,6 @@ BASE_EXPORT void DisableHandleVerifier();
|
| // a CHECK is generated.
|
| BASE_EXPORT void OnHandleBeingClosed(HANDLE handle);
|
|
|
| -// This testing function returns the module that the ActiveVerifier concrete
|
| -// implementation was instantiated in.
|
| -BASE_EXPORT HMODULE GetHandleVerifierModuleForTesting();
|
| -
|
| } // namespace win
|
| } // namespace base
|
|
|
|
|