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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 1884113002: Remove RawPtr.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix HeapTest.Bind expectation Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/HeapTest.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
index 9d11b2e505f8dc1d06db6a761c62331fbeb1c464..66e9220f27561f0d36387cb1317592a45d316076 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -4314,13 +4314,6 @@ void rawPtrInHashHelper()
}
}
-TEST(HeapTest, RawPtrInHash)
-{
- rawPtrInHashHelper<HashSet<RawPtr<int>>>();
- rawPtrInHashHelper<ListHashSet<RawPtr<int>>>();
- rawPtrInHashHelper<LinkedHashSet<RawPtr<int>>>();
-}
-
TEST(HeapTest, HeapTerminatedArray)
{
clearOutOldGarbage();
@@ -4982,17 +4975,12 @@ TEST(HeapTest, RegressNullIsStrongified)
TEST(HeapTest, Bind)
{
OwnPtr<SameThreadClosure> closure = bind(static_cast<void (Bar::*)(Visitor*)>(&Bar::trace), Bar::create(), static_cast<Visitor*>(0));
+ // OffHeapInt* should not make Persistent.
+ OwnPtr<SameThreadClosure> closure2 = bind(&OffHeapInt::voidFunction, OffHeapInt::create(1));
preciselyCollectGarbage();
// The closure should have a persistent handle to the Bar.
EXPECT_EQ(1u, Bar::s_live);
- OwnPtr<SameThreadClosure> closure2 = bind(static_cast<void (Bar::*)(Visitor*)>(&Bar::trace), RawPtr<Bar>(Bar::create()), static_cast<Visitor*>(0));
- preciselyCollectGarbage();
- // The closure should have a persistent handle to the Bar.
- EXPECT_EQ(2u, Bar::s_live);
- // RawPtr<OffHeapInt> should not make Persistent.
- OwnPtr<SameThreadClosure> closure3 = bind(&OffHeapInt::voidFunction, RawPtr<OffHeapInt>(OffHeapInt::create(1).get()));
-
UseMixin::s_traceCount = 0;
Mixin* mixin = UseMixin::create();
OwnPtr<SameThreadClosure> mixinClosure = bind(static_cast<void (Mixin::*)(Visitor*)>(&Mixin::trace), mixin, static_cast<Visitor*>(0));
@@ -5978,7 +5966,6 @@ TEST(HeapTest, TraceTypesEagerly)
static_assert(TraceEagerlyTrait<TraceTypeEagerly1>::value, "should be true");
static_assert(TraceEagerlyTrait<Member<TraceTypeEagerly1>>::value, "should be true");
static_assert(TraceEagerlyTrait<WeakMember<TraceTypeEagerly1>>::value, "should be true");
- static_assert(TraceEagerlyTrait<RawPtr<TraceTypeEagerly1>>::value, "should be true");
static_assert(TraceEagerlyTrait<HeapVector<Member<TraceTypeEagerly1>>>::value, "should be true");
static_assert(TraceEagerlyTrait<HeapVector<WeakMember<TraceTypeEagerly1>>>::value, "should be true");
static_assert(TraceEagerlyTrait<HeapHashSet<Member<TraceTypeEagerly1>>>::value, "should be true");
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTerminatedArray.h ('k') | third_party/WebKit/Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698