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

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

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 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: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index 3772165f28ad414586d10687e6b6f24d8b29f7c7..fbb9d6e0cc49f367ea078658c8b4475a6d453633 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -465,7 +465,7 @@ protected:
Vector<OwnPtr<WebThread>, numberOfThreads> m_threads;
for (int i = 0; i < numberOfThreads; i++) {
m_threads.append(adoptPtr(Platform::current()->createThread("blink gc testing thread")));
- m_threads.last()->postTask(FROM_HERE, new Task(threadSafeBind(threadFunc, AllowCrossThreadAccess(tester))));
+ m_threads.last()->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(threadFunc, AllowCrossThreadAccess(tester))));
}
while (tester->m_threadsToFinish) {
SafePointScope scope(ThreadState::NoHeapPointersOnStack);
@@ -4638,7 +4638,7 @@ public:
static void test()
{
OwnPtr<WebThread> sleepingThread = adoptPtr(Platform::current()->createThread("SleepingThread"));
- sleepingThread->postTask(FROM_HERE, new Task(threadSafeBind(sleeperMainFunc)));
+ sleepingThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(sleeperMainFunc)));
// Wait for the sleeper to run.
while (!s_sleeperRunning) {
@@ -5308,7 +5308,7 @@ public:
MutexLocker locker(mainThreadMutex());
OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
- workerThread->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
+ workerThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
// Wait for the worker thread to have done its initialization,
// IE. the worker allocates an object and then throw aways any
@@ -5411,7 +5411,7 @@ public:
MutexLocker locker(mainThreadMutex());
OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
- workerThread->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
+ workerThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
// Wait for the worker thread initialization. The worker
// allocates a weak collection where both collection and
@@ -5614,7 +5614,7 @@ public:
MutexLocker locker(mainThreadMutex());
OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
- workerThread->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
+ workerThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
// Park the main thread until the worker thread has initialized.
parkMainThread();
@@ -5688,7 +5688,7 @@ public:
{
MutexLocker locker(mainThreadMutex());
OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
- workerThread->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
+ workerThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
parkMainThread();
@@ -6406,7 +6406,7 @@ TEST(HeapTest, CrossThreadWeakPersistent)
MutexLocker mainThreadMutexLocker(mainThreadMutex());
OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
DestructorLockingObject* object = nullptr;
- workerThread->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, AllowCrossThreadAccessWrapper<DestructorLockingObject**>(&object))));
+ workerThread->taskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, AllowCrossThreadAccessWrapper<DestructorLockingObject**>(&object))));
parkMainThread();
// Step 3: Set up a CrossThreadWeakPersistent.
« no previous file with comments | « Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp ('k') | Source/platform/heap/glue/MessageLoopInterruptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698