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

Unified Diff: third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.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/audio/HRTFDatabaseLoader.cpp
diff --git a/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp b/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp
index 6a150874101f664ad9252b7e1d36b947cedc6ac9..9f6cf6c973d66f498ee05acd2463822e40b787db 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp
@@ -95,7 +95,7 @@ void HRTFDatabaseLoader::loadAsynchronously()
// Start the asynchronous database loading process.
m_thread = wrapUnique(Platform::current()->createThread("HRTF database loader"));
// TODO(alexclarke): Should this be posted as a loading task?
- m_thread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&HRTFDatabaseLoader::loadTask, AllowCrossThreadAccess(this)));
+ m_thread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&HRTFDatabaseLoader::loadTask, crossThreadUnretained(this)));
}
}
@@ -119,7 +119,7 @@ void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
TaskSynchronizer sync;
// TODO(alexclarke): Should this be posted as a loading task?
- m_thread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&HRTFDatabaseLoader::cleanupTask, AllowCrossThreadAccess(this), AllowCrossThreadAccess(&sync)));
+ m_thread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&HRTFDatabaseLoader::cleanupTask, crossThreadUnretained(this), crossThreadUnretained(&sync)));
sync.waitForTaskCompletion();
m_thread.reset();
}
« no previous file with comments | « third_party/WebKit/Source/platform/CrossThreadCopier.h ('k') | third_party/WebKit/Source/platform/audio/ReverbConvolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698