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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 2799573003: Migrate WTF::HashCountedSet::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after
2956 weakCountedSet->insert(two); 2956 weakCountedSet->insert(two);
2957 weakCountedSet->insert(two); 2957 weakCountedSet->insert(two);
2958 weakCountedSet->insert(keepNumbersAlive[0]); 2958 weakCountedSet->insert(keepNumbersAlive[0]);
2959 weakCountedSet->insert(keepNumbersAlive[1]); 2959 weakCountedSet->insert(keepNumbersAlive[1]);
2960 EXPECT_EQ(1u, weakStrong->size()); 2960 EXPECT_EQ(1u, weakStrong->size());
2961 EXPECT_EQ(1u, strongWeak->size()); 2961 EXPECT_EQ(1u, strongWeak->size());
2962 EXPECT_EQ(2u, weakWeak->size()); 2962 EXPECT_EQ(2u, weakWeak->size());
2963 EXPECT_EQ(4u, weakSet->size()); 2963 EXPECT_EQ(4u, weakSet->size());
2964 EXPECT_EQ(4u, weakCountedSet->size()); 2964 EXPECT_EQ(4u, weakCountedSet->size());
2965 EXPECT_EQ(3u, weakCountedSet->find(two)->value); 2965 EXPECT_EQ(3u, weakCountedSet->find(two)->value);
2966 weakCountedSet->remove(two); 2966 weakCountedSet->erase(two);
2967 EXPECT_EQ(2u, weakCountedSet->find(two)->value); 2967 EXPECT_EQ(2u, weakCountedSet->find(two)->value);
2968 } 2968 }
2969 2969
2970 keepNumbersAlive[0] = nullptr; 2970 keepNumbersAlive[0] = nullptr;
2971 2971
2972 preciselyCollectGarbage(); 2972 preciselyCollectGarbage();
2973 2973
2974 EXPECT_EQ(0u, weakStrong->size()); 2974 EXPECT_EQ(0u, weakStrong->size());
2975 EXPECT_EQ(0u, strongWeak->size()); 2975 EXPECT_EQ(0u, strongWeak->size());
2976 EXPECT_EQ(0u, weakWeak->size()); 2976 EXPECT_EQ(0u, weakWeak->size());
(...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after
6345 "HeapVector"); 6345 "HeapVector");
6346 static_assert( 6346 static_assert(
6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6348 "HeapDeque"); 6348 "HeapDeque");
6349 static_assert(WTF::IsGarbageCollectedType< 6349 static_assert(WTF::IsGarbageCollectedType<
6350 HeapTerminatedArray<Member<IntWrapper>>>::value, 6350 HeapTerminatedArray<Member<IntWrapper>>>::value,
6351 "HeapTerminatedArray"); 6351 "HeapTerminatedArray");
6352 } 6352 }
6353 6353
6354 } // namespace blink 6354 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698