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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (Closed)
Patch Set: Fix the other simulators Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-hashmap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index c03df6b72fc190dbd54fdb363e685e493a92174a..17893b3b48b9ab16d027b99cd92973286105051c 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -62,12 +62,8 @@ class NamedEntriesDetector {
if (strcmp(entry->name(), "C2") == 0) has_C2 = true;
}
- static bool AddressesMatch(void* key1, void* key2) {
- return key1 == key2;
- }
-
void CheckAllReachables(i::HeapEntry* root) {
- v8::base::HashMap visited(AddressesMatch);
+ v8::base::HashMap visited;
i::List<i::HeapEntry*> list(10);
list.Add(root);
CheckEntry(root);
@@ -135,17 +131,12 @@ static bool HasString(const v8::HeapGraphNode* node, const char* contents) {
}
-static bool AddressesMatch(void* key1, void* key2) {
- return key1 == key2;
-}
-
-
// Check that snapshot has no unretained entries except root.
static bool ValidateSnapshot(const v8::HeapSnapshot* snapshot, int depth = 3) {
i::HeapSnapshot* heap_snapshot = const_cast<i::HeapSnapshot*>(
reinterpret_cast<const i::HeapSnapshot*>(snapshot));
- v8::base::HashMap visited(AddressesMatch);
+ v8::base::HashMap visited;
i::List<i::HeapGraphEdge>& edges = heap_snapshot->edges();
for (int i = 0; i < edges.length(); ++i) {
v8::base::HashMap::Entry* entry = visited.LookupOrInsert(
« no previous file with comments | « test/cctest/test-hashmap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698