Index: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp |
index b526e10be61d2cdc78904fc92b7598b3496252fa..2a839c77ec44bd25ebf46a81a3aec4e839ffdab1 100644 |
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp |
@@ -13,13 +13,13 @@ DataConsumerHandleTestUtil::Thread::Thread(const char* name, InitializationPolic |
, m_initializationPolicy(initializationPolicy) |
, m_waitableEvent(adoptPtr(new WaitableEvent())) |
{ |
- m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::initialize, AllowCrossThreadAccess(this)))); |
+ m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&Thread::initialize, AllowCrossThreadAccess(this))); |
m_waitableEvent->wait(); |
} |
DataConsumerHandleTestUtil::Thread::~Thread() |
{ |
- m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::shutdown, AllowCrossThreadAccess(this)))); |
+ m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&Thread::shutdown, AllowCrossThreadAccess(this))); |
m_waitableEvent->wait(); |
} |
@@ -193,7 +193,7 @@ void DataConsumerHandleTestUtil::ReplayingHandle::Context::notify() |
if (!m_client) |
return; |
ASSERT(m_readerThread); |
- m_readerThread->taskRunner()->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Context::notifyInternal, this))); |
+ m_readerThread->taskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&Context::notifyInternal, this)); |
} |
void DataConsumerHandleTestUtil::ReplayingHandle::Context::notifyInternal() |
@@ -250,7 +250,7 @@ void DataConsumerHandleTestUtil::HandleReader::didGetReadable() |
} |
OwnPtr<HandleReadResult> result = adoptPtr(new HandleReadResult(r, m_data)); |
m_data.clear(); |
- Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, new Task(bind(&HandleReader::runOnFinishedReading, this, result.release()))); |
+ Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, bind(&HandleReader::runOnFinishedReading, this, result.release())); |
m_reader = nullptr; |
} |
@@ -284,7 +284,7 @@ void DataConsumerHandleTestUtil::HandleTwoPhaseReader::didGetReadable() |
} |
OwnPtr<HandleReadResult> result = adoptPtr(new HandleReadResult(r, m_data)); |
m_data.clear(); |
- Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, new Task(bind(&HandleTwoPhaseReader::runOnFinishedReading, this, result.release()))); |
+ Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, bind(&HandleTwoPhaseReader::runOnFinishedReading, this, result.release())); |
m_reader = nullptr; |
} |