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

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

Issue 705003002: Change the return type of WTF::bind() to |OwnPtr<Function>| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments from yhirano Created 6 years, 1 month 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 | « Source/platform/Task.h ('k') | Source/platform/scheduler/Scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index 4edef2f13541959f0f45a07da23c681843b3887c..b0cc938c0a1af8471e22baafffd763ddeb8635b0 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -4302,21 +4302,21 @@ TEST(HeapTest, RegressNullIsStrongified)
TEST(HeapTest, Bind)
{
- Closure closure = bind(&Bar::trace, Bar::create(), static_cast<Visitor*>(0));
+ OwnPtr<Closure> closure = bind(&Bar::trace, Bar::create(), static_cast<Visitor*>(0));
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
// The closure should have a persistent handle to the Bar.
EXPECT_EQ(1u, Bar::s_live);
- Closure closure2 = bind(&Bar::trace, RawPtr<Bar>(Bar::create()), static_cast<Visitor*>(0));
+ OwnPtr<Closure> closure2 = bind(&Bar::trace, RawPtr<Bar>(Bar::create()), static_cast<Visitor*>(0));
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
// The closure should have a persistent handle to the Bar.
EXPECT_EQ(2u, Bar::s_live);
// RawPtr<OffHeapInt> should not make Persistent.
- Closure closure3 = bind(&OffHeapInt::voidFunction, RawPtr<OffHeapInt>(OffHeapInt::create(1).get()));
+ OwnPtr<Closure> closure3 = bind(&OffHeapInt::voidFunction, RawPtr<OffHeapInt>(OffHeapInt::create(1).get()));
UseMixin::s_traceCount = 0;
Mixin* mixin = UseMixin::create();
- Closure mixinClosure = bind(&Mixin::trace, mixin, static_cast<Visitor*>(0));
+ OwnPtr<Closure> mixinClosure = bind(&Mixin::trace, mixin, static_cast<Visitor*>(0));
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
// The closure should have a persistent handle to the mixin.
EXPECT_EQ(1, UseMixin::s_traceCount);
« no previous file with comments | « Source/platform/Task.h ('k') | Source/platform/scheduler/Scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698