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

Unified Diff: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp

Issue 1713143002: Remove most of the blink::Task wrapping of WTF::Function outside WebTaskRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698