| Index: Source/platform/heap/HeapTest.cpp
|
| diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
|
| index 3772165f28ad414586d10687e6b6f24d8b29f7c7..454e5217ee84bade6d2bd9d338a74fe82d6c823d 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()->defaultTaskRunner()->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->defaultTaskRunner()->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->defaultTaskRunner()->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->defaultTaskRunner()->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->defaultTaskRunner()->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->defaultTaskRunner()->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->defaultTaskRunner()->postTask(FROM_HERE, new Task(threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, AllowCrossThreadAccessWrapper<DestructorLockingObject**>(&object))));
|
| parkMainThread();
|
|
|
| // Step 3: Set up a CrossThreadWeakPersistent.
|
|
|