Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: base/win/scoped_handle.h

Issue 1779333003: Add test for multithreaded ActiveVerifier behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@handlecreate
Patch Set: change to loadable_module Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/test_suite.cc ('k') | base/win/scoped_handle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_WIN_SCOPED_HANDLE_H_ 5 #ifndef BASE_WIN_SCOPED_HANDLE_H_
6 #define BASE_WIN_SCOPED_HANDLE_H_ 6 #define BASE_WIN_SCOPED_HANDLE_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 private: 165 private:
166 DISALLOW_IMPLICIT_CONSTRUCTORS(VerifierTraits); 166 DISALLOW_IMPLICIT_CONSTRUCTORS(VerifierTraits);
167 }; 167 };
168 168
169 typedef GenericScopedHandle<HandleTraits, VerifierTraits> ScopedHandle; 169 typedef GenericScopedHandle<HandleTraits, VerifierTraits> ScopedHandle;
170 170
171 // This function may be called by the embedder to disable the use of 171 // This function may be called by the embedder to disable the use of
172 // VerifierTraits at runtime. It has no effect if DummyVerifierTraits is used 172 // VerifierTraits at runtime. It has no effect if DummyVerifierTraits is used
173 // for ScopedHandle. 173 // for ScopedHandle.
174 void BASE_EXPORT DisableHandleVerifier(); 174 BASE_EXPORT void DisableHandleVerifier();
175 175
176 // This should be called whenever the OS is closing a handle, if extended 176 // This should be called whenever the OS is closing a handle, if extended
177 // verification of improper handle closing is desired. If |handle| is being 177 // verification of improper handle closing is desired. If |handle| is being
178 // tracked by the handle verifier and ScopedHandle is not the one closing it, 178 // tracked by the handle verifier and ScopedHandle is not the one closing it,
179 // a CHECK is generated. 179 // a CHECK is generated.
180 void BASE_EXPORT OnHandleBeingClosed(HANDLE handle); 180 BASE_EXPORT void OnHandleBeingClosed(HANDLE handle);
181
182 // This testing function returns the module that the ActiveVerifier concrete
183 // implementation was instantiated in.
184 BASE_EXPORT HMODULE GetHandleVerifierModuleForTesting();
181 185
182 } // namespace win 186 } // namespace win
183 } // namespace base 187 } // namespace base
184 188
185 #endif // BASE_WIN_SCOPED_HANDLE_H_ 189 #endif // BASE_WIN_SCOPED_HANDLE_H_
OLDNEW
« no previous file with comments | « base/test/test_suite.cc ('k') | base/win/scoped_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698