| OLD | NEW |
| 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" |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/location.h" | 11 #include "base/location.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" |
| 14 #include "base/move.h" | 14 #include "base/move.h" |
| 15 | 15 |
| 16 // TODO(rvargas): remove this with the rest of the verifier. | 16 // TODO(rvargas): remove this with the rest of the verifier. |
| 17 #if defined(COMPILER_MSVC) | 17 #if defined(COMPILER_MSVC) |
| 18 #include <intrin.h> | 18 #include <intrin.h> |
| 19 #define BASE_WIN_GET_CALLER _ReturnAddress() | 19 #define BASE_WIN_GET_CALLER _ReturnAddress() |
| 20 #elif defined(COMPILER_GCC) | 20 #elif defined(COMPILER_GCC) |
| 21 #define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\ | 21 #define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\ |
| 22 __builtin_return_address(0)) | 22 __builtin_return_address(0)) |
| 23 #endif | 23 #endif |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // This should be called whenever the OS is closing a handle, if extended | 173 // This should be called whenever the OS is closing a handle, if extended |
| 174 // verification of improper handle closing is desired. If |handle| is being | 174 // verification of improper handle closing is desired. If |handle| is being |
| 175 // tracked by the handle verifier and ScopedHandle is not the one closing it, | 175 // tracked by the handle verifier and ScopedHandle is not the one closing it, |
| 176 // a CHECK is generated. | 176 // a CHECK is generated. |
| 177 void BASE_EXPORT OnHandleBeingClosed(HANDLE handle); | 177 void BASE_EXPORT OnHandleBeingClosed(HANDLE handle); |
| 178 | 178 |
| 179 } // namespace win | 179 } // namespace win |
| 180 } // namespace base | 180 } // namespace base |
| 181 | 181 |
| 182 #endif // BASE_WIN_SCOPED_HANDLE_H_ | 182 #endif // BASE_WIN_SCOPED_HANDLE_H_ |
| OLD | NEW |