| 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 965d1bb1e3b2f6fcd88e156f47c11310c52ac003..1d0be05168a717ca6d8fb8bba5dc6cf103976c0c 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| @@ -28,7 +28,6 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#include "platform/Task.h"
|
| #include "platform/ThreadSafeFunctional.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/heap/Heap.h"
|
| @@ -39,6 +38,7 @@
|
| #include "platform/heap/Visitor.h"
|
| #include "platform/testing/UnitTestHelpers.h"
|
| #include "public/platform/Platform.h"
|
| +#include "public/platform/WebTaskRunner.h"
|
| #include "public/platform/WebTraceLocation.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "wtf/HashTraits.h"
|
| @@ -461,7 +461,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()->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(threadFunc, AllowCrossThreadAccess(tester))));
|
| + m_threads.last()->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(threadFunc, AllowCrossThreadAccess(tester)));
|
| }
|
| while (tester->m_threadsToFinish) {
|
| SafePointScope scope(BlinkGC::NoHeapPointersOnStack);
|
| @@ -4703,7 +4703,7 @@ public:
|
| static void test()
|
| {
|
| OwnPtr<WebThread> sleepingThread = adoptPtr(Platform::current()->createThread("SleepingThread"));
|
| - sleepingThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(sleeperMainFunc)));
|
| + sleepingThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(sleeperMainFunc));
|
|
|
| // Wait for the sleeper to run.
|
| while (!s_sleeperRunning) {
|
| @@ -5373,7 +5373,7 @@ public:
|
|
|
| MutexLocker locker(mainThreadMutex());
|
| OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
|
| - workerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
|
| + workerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
|
|
|
| // Wait for the worker thread to have done its initialization,
|
| // IE. the worker allocates an object and then throw aways any
|
| @@ -5476,7 +5476,7 @@ public:
|
|
|
| MutexLocker locker(mainThreadMutex());
|
| OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
|
| - workerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
|
| + workerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
|
|
|
| // Wait for the worker thread initialization. The worker
|
| // allocates a weak collection where both collection and
|
| @@ -5679,7 +5679,7 @@ public:
|
|
|
| MutexLocker locker(mainThreadMutex());
|
| OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
|
| - workerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
|
| + workerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
|
|
|
| // Park the main thread until the worker thread has initialized.
|
| parkMainThread();
|
| @@ -5753,7 +5753,7 @@ public:
|
| {
|
| MutexLocker locker(mainThreadMutex());
|
| OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
|
| - workerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(workerThreadMain)));
|
| + workerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
|
|
|
| parkMainThread();
|
|
|
| @@ -6472,7 +6472,7 @@ TEST(HeapTest, CrossThreadWeakPersistent)
|
| MutexLocker mainThreadMutexLocker(mainThreadMutex());
|
| OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
|
| DestructorLockingObject* object = nullptr;
|
| - workerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, AllowCrossThreadAccessWrapper<DestructorLockingObject**>(&object))));
|
| + workerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, AllowCrossThreadAccessWrapper<DestructorLockingObject**>(&object)));
|
| parkMainThread();
|
|
|
| // Step 3: Set up a CrossThreadWeakPersistent.
|
|
|