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

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

Issue 1925583003: Replace AllowCrossThreadAccess() + non-GCed pointers with crossThreadUnretained() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_4
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 62e5ef531351e65189600f8df82ee9064359ff8f..806293c5b1ec41889ac3a518e50804af0ab90ff4 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -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, AllowCrossThreadAccess(tester)));
+ m_threads.last()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(threadFunc, crossThreadUnretained(tester)));
}
while (tester->m_threadsToFinish) {
SafePointScope scope(BlinkGC::NoHeapPointersOnStack);
@@ -6681,7 +6681,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, AllowCrossThreadAccess(&object)));
+ workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMainForCrossThreadWeakPersistentTest, crossThreadUnretained(&object)));
parkMainThread();
// Step 3: Set up a CrossThreadWeakPersistent.

Powered by Google App Engine
This is Rietveld 408576698