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

Unified Diff: third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp

Issue 2307003002: Move collectGarbage* methods to ThreadState (Closed)
Patch Set: fix 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
Index: third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp b/third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp
index c35d44772e792c7bc830c96690200d48bf92e7a0..c316ca0ebc77dc66f4dda233a423f0459e9818db 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp
+++ b/third_party/WebKit/Source/core/dom/ExecutionContextTaskTest.cpp
@@ -36,7 +36,7 @@ protected:
}
void TearDown() override
{
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
ASSERT_EQ(0, GCObject::s_counter);
}
};
@@ -45,7 +45,7 @@ TEST_F(CrossThreadTaskTest, CreateForGarbageCollectedMethod)
{
std::unique_ptr<ExecutionContextTask> task1 = createCrossThreadTask(&GCObject::run, wrapCrossThreadPersistent(new GCObject), wrapCrossThreadPersistent(new GCObject));
std::unique_ptr<ExecutionContextTask> task2 = createCrossThreadTask(&GCObject::run, wrapCrossThreadPersistent(new GCObject), wrapCrossThreadPersistent(new GCObject));
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_EQ(4, GCObject::s_counter);
}
@@ -53,7 +53,7 @@ TEST_F(CrossThreadTaskTest, CreateForFunctionWithGarbageCollected)
{
std::unique_ptr<ExecutionContextTask> task1 = createCrossThreadTask(&functionWithGarbageCollected, wrapCrossThreadPersistent(new GCObject));
std::unique_ptr<ExecutionContextTask> task2 = createCrossThreadTask(&functionWithGarbageCollected, wrapCrossThreadPersistent(new GCObject));
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_EQ(2, GCObject::s_counter);
}
@@ -61,7 +61,7 @@ TEST_F(CrossThreadTaskTest, CreateForFunctionWithExecutionContext)
{
std::unique_ptr<ExecutionContextTask> task1 = createCrossThreadTask(&functionWithExecutionContext, wrapCrossThreadPersistent(new GCObject));
std::unique_ptr<ExecutionContextTask> task2 = createCrossThreadTask(&functionWithExecutionContext, wrapCrossThreadPersistent(new GCObject));
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_EQ(2, GCObject::s_counter);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698