| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 5 #ifndef BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| 6 #define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 6 #define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 10 #include "base/template_util.h" | 9 #include "base/template_util.h" |
| 11 #include "base/tuple.h" | 10 #include "base/tuple.h" |
| 12 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 13 | 12 |
| 14 // It is dangerous to post a task with a T* argument where T is a subtype of | 13 // It is dangerous to post a task with a T* argument where T is a subtype of |
| 15 // RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the | 14 // RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the |
| 16 // object may already have been deleted since it was not held with a | 15 // object may already have been deleted since it was not held with a |
| 17 // scoped_refptr. Example: http://crbug.com/27191 | 16 // scoped_refptr. Example: http://crbug.com/27191 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 NeedsScopedRefptrButGetsRawPtr<F>::value || | 120 NeedsScopedRefptrButGetsRawPtr<F>::value || |
| 122 NeedsScopedRefptrButGetsRawPtr<G>::value || | 121 NeedsScopedRefptrButGetsRawPtr<G>::value || |
| 123 NeedsScopedRefptrButGetsRawPtr<H>::value) }; | 122 NeedsScopedRefptrButGetsRawPtr<H>::value) }; |
| 124 }; | 123 }; |
| 125 | 124 |
| 126 } // namespace internal | 125 } // namespace internal |
| 127 | 126 |
| 128 } // namespace base | 127 } // namespace base |
| 129 | 128 |
| 130 #endif // BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 129 #endif // BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| OLD | NEW |