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

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

Issue 2104913002: Rename threadSafeBind() to crossThreadBind() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_CTCPointer
Patch Set: Rebase Created 4 years, 6 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/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 c02c9d98a66fe09357832cc6aa6ec11052096c39..9b1f294ed3e486fe10803c340a498d4bf9f12966 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "platform/ThreadSafeFunctional.h"
+#include "platform/CrossThreadFunctional.h"
#include "platform/heap/Handle.h"
#include "platform/heap/Heap.h"
#include "platform/heap/HeapLinkedStack.h"
@@ -470,7 +470,7 @@ protected:
Vector<std::unique_ptr<WebThread>, numberOfThreads> m_threads;
for (int i = 0; i < numberOfThreads; i++) {
m_threads.append(wrapUnique(Platform::current()->createThread("blink gc testing thread")));
- m_threads.last()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(threadFunc, crossThreadUnretained(tester)));
+ m_threads.last()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(threadFunc, crossThreadUnretained(tester)));
}
while (tester->m_threadsToFinish) {
SafePointScope scope(BlinkGC::NoHeapPointersOnStack);
@@ -4963,7 +4963,7 @@ public:
static void test()
{
std::unique_ptr<WebThread> sleepingThread = wrapUnique(Platform::current()->createThread("SleepingThread"));
- sleepingThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(sleeperMainFunc));
+ sleepingThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(sleeperMainFunc));
// Wait for the sleeper to run.
while (!s_sleeperRunning) {
@@ -5628,7 +5628,7 @@ public:
MutexLocker locker(mainThreadMutex());
std::unique_ptr<WebThread> workerThread = wrapUnique(Platform::current()->createThread("Test Worker Thread"));
- workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
+ workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(workerThreadMain));
// Wait for the worker thread to have done its initialization,
// IE. the worker allocates an object and then throw aways any
@@ -5731,7 +5731,7 @@ public:
MutexLocker locker(mainThreadMutex());
std::unique_ptr<WebThread> workerThread = wrapUnique(Platform::current()->createThread("Test Worker Thread"));
- workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
+ workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(workerThreadMain));
// Wait for the worker thread initialization. The worker
// allocates a weak collection where both collection and
@@ -5934,7 +5934,7 @@ public:
MutexLocker locker(mainThreadMutex());
std::unique_ptr<WebThread> workerThread = wrapUnique(Platform::current()->createThread("Test Worker Thread"));
- workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
+ workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(workerThreadMain));
// Park the main thread until the worker thread has initialized.
parkMainThread();
@@ -6684,7 +6684,7 @@ TEST(HeapTest, CrossThreadWeakPersistent)
MutexLocker mainThreadMutexLocker(mainThreadMutex());
std::unique_ptr<WebThread> workerThread = wrapUnique(Platform::current()->createThread("Test Worker Thread"));
DestructorLockingObject* object = nullptr;
- workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, crossThreadUnretained(&object)));
+ workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(workerThreadMainForCrossThreadWeakPersistentTest, crossThreadUnretained(&object)));
parkMainThread();
// Step 3: Set up a CrossThreadWeakPersistent.
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GCTaskRunner.h ('k') | third_party/WebKit/Source/platform/heap/PersistentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698