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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 2738823004: Replace createCrossThreadTask with crossThreadBind in webaudio (Closed)
Patch Set: RefPtr -> wrapPassRefPtr Created 3 years, 9 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/webaudio/OfflineAudioDestinationNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
index 609d7f188a62312001f69963aa0fc03a3118e5f7..954586c250ad2140ba27c668320c68c1c8fffa35 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
@@ -25,19 +25,19 @@
#include "modules/webaudio/OfflineAudioDestinationNode.h"
-#include "core/dom/ExecutionContextTask.h"
+#include <algorithm>
#include "core/dom/TaskRunnerHelper.h"
#include "modules/webaudio/AudioNodeInput.h"
#include "modules/webaudio/AudioNodeOutput.h"
#include "modules/webaudio/BaseAudioContext.h"
#include "modules/webaudio/OfflineAudioContext.h"
+#include "platform/CrossThreadFunctional.h"
#include "platform/audio/AudioBus.h"
#include "platform/audio/AudioUtilities.h"
#include "platform/audio/DenormalDisabler.h"
#include "platform/audio/HRTFDatabaseLoader.h"
#include "public/platform/Platform.h"
#include "wtf/PtrUtil.h"
-#include <algorithm>
namespace blink {
@@ -221,11 +221,12 @@ void OfflineAudioDestinationHandler::suspendOfflineRendering() {
// The actual rendering has been suspended. Notify the context.
if (context()->getExecutionContext()) {
- context()->getExecutionContext()->postTask(
- TaskType::MediaElementEvent, BLINK_FROM_HERE,
- createCrossThreadTask(&OfflineAudioDestinationHandler::notifySuspend,
- PassRefPtr<OfflineAudioDestinationHandler>(this),
- context()->currentSampleFrame()));
+ TaskRunnerHelper::get(TaskType::MediaElementEvent,
+ context()->getExecutionContext())
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(
+ &OfflineAudioDestinationHandler::notifySuspend,
+ wrapPassRefPtr(this), context()->currentSampleFrame()));
}
}
@@ -234,10 +235,12 @@ void OfflineAudioDestinationHandler::finishOfflineRendering() {
// The actual rendering has been completed. Notify the context.
if (context()->getExecutionContext()) {
- context()->getExecutionContext()->postTask(
- TaskType::MediaElementEvent, BLINK_FROM_HERE,
- createCrossThreadTask(&OfflineAudioDestinationHandler::notifyComplete,
- wrapPassRefPtr(this)));
+ TaskRunnerHelper::get(TaskType::MediaElementEvent,
+ context()->getExecutionContext())
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(&OfflineAudioDestinationHandler::notifyComplete,
+ wrapPassRefPtr(this)));
}
}

Powered by Google App Engine
This is Rietveld 408576698