| OLD | NEW |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 void AsanRuntime::AddThreadId(uint32_t thread_id) { | 1067 void AsanRuntime::AddThreadId(uint32_t thread_id) { |
| 1068 DCHECK_NE(0u, thread_id); | 1068 DCHECK_NE(0u, thread_id); |
| 1069 base::AutoLock lock(thread_ids_lock_); | 1069 base::AutoLock lock(thread_ids_lock_); |
| 1070 thread_ids_.insert(thread_id); | 1070 thread_ids_.insert(thread_id); |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 bool AsanRuntime::ThreadIdIsValid(uint32_t thread_id) { | 1073 bool AsanRuntime::ThreadIdIsValid(uint32_t thread_id) { |
| 1074 base::AutoLock lock(thread_ids_lock_); | 1074 base::AutoLock lock(thread_ids_lock_); |
| 1075 return thread_ids_.count(thread_id) > 0; | 1075 return thread_ids_.find(thread_id) != thread_ids_.end(); |
| 1076 } | 1076 } |
| 1077 | 1077 |
| 1078 bool AsanRuntime::HeapIdIsValid(HeapManagerInterface::HeapId heap_id) { | 1078 bool AsanRuntime::HeapIdIsValid(HeapManagerInterface::HeapId heap_id) { |
| 1079 // Consider dying heaps in this query, as they are still valid from the | 1079 // Consider dying heaps in this query, as they are still valid from the |
| 1080 // point of view of an error report. | 1080 // point of view of an error report. |
| 1081 return heap_manager_->IsValidHeapIdUnlocked(heap_id, true); | 1081 return heap_manager_->IsValidHeapIdUnlocked(heap_id, true); |
| 1082 } | 1082 } |
| 1083 | 1083 |
| 1084 HeapType AsanRuntime::GetHeapType(HeapManagerInterface::HeapId heap_id) { | 1084 HeapType AsanRuntime::GetHeapType(HeapManagerInterface::HeapId heap_id) { |
| 1085 return heap_manager_->GetHeapTypeUnlocked(heap_id); | 1085 return heap_manager_->GetHeapTypeUnlocked(heap_id); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 if (crash_reporter_.get() != nullptr && | 1264 if (crash_reporter_.get() != nullptr && |
| 1265 crash_reporter_->GetName() == reporters::CrashpadReporter::kName) { | 1265 crash_reporter_->GetName() == reporters::CrashpadReporter::kName) { |
| 1266 enabled_features |= ASAN_FEATURE_ENABLE_CRASHPAD; | 1266 enabled_features |= ASAN_FEATURE_ENABLE_CRASHPAD; |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 return enabled_features; | 1269 return enabled_features; |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 } // namespace asan | 1272 } // namespace asan |
| 1273 } // namespace agent | 1273 } // namespace agent |
| OLD | NEW |