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

Unified Diff: third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp

Issue 2288983004: Merge TaskSynchronizer into WaitableEvent. (Closed)
Patch Set: fix Created 4 years, 4 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 cef7e6d1691ca93bb168cc4114dc159be16f0ed2..7595fc88d96115238cde5d2324cdbaade9a2faab 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp
@@ -29,7 +29,7 @@
#include "platform/audio/HRTFDatabaseLoader.h"
#include "platform/CrossThreadFunctional.h"
-#include "platform/TaskSynchronizer.h"
+#include "platform/WaitableEvent.h"
#include "public/platform/Platform.h"
#include "public/platform/WebTaskRunner.h"
#include "public/platform/WebTraceLocation.h"
@@ -121,9 +121,9 @@ HRTFDatabase* HRTFDatabaseLoader::database()
// This cleanup task is needed just to make sure that the loader thread finishes
// the load task and thus the loader thread doesn't touch m_thread any more.
-void HRTFDatabaseLoader::cleanupTask(TaskSynchronizer* sync)
+void HRTFDatabaseLoader::cleanupTask(WaitableEvent* sync)
{
- sync->taskCompleted();
+ sync->signal();
}
void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
@@ -131,10 +131,10 @@ void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
if (!m_thread)
return;
- TaskSynchronizer sync;
+ WaitableEvent sync;
// TODO(alexclarke): Should this be posted as a loading task?
m_thread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, crossThreadBind(&HRTFDatabaseLoader::cleanupTask, crossThreadUnretained(this), crossThreadUnretained(&sync)));
- sync.waitForTaskCompletion();
+ sync.wait();
m_thread.reset();
}
« no previous file with comments | « third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698