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

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

Issue 2738823004: Replace createCrossThreadTask with crossThreadBind in webaudio (Closed)
Patch Set: 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/AudioScheduledSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
index dddec42243d3d9784f1e2f7f75de0ccb932abf38..8bc0911b5c78a30a3ee5380be6a668561309aa01 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
@@ -24,15 +24,15 @@
*/
#include "modules/webaudio/AudioScheduledSourceNode.h"
tzik 2017/03/10 00:15:43 Could you add a blank line after AudioScheduledSou
yuryu 2017/03/10 07:49:32 Done.
+#include <algorithm>
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/TaskRunnerHelper.h"
#include "modules/EventModules.h"
#include "modules/webaudio/BaseAudioContext.h"
+#include "platform/CrossThreadFunctional.h"
#include "platform/audio/AudioUtilities.h"
#include "wtf/MathExtras.h"
-#include <algorithm>
namespace blink {
@@ -226,10 +226,11 @@ void AudioScheduledSourceHandler::finish() {
finishWithoutOnEnded();
if (context()->getExecutionContext()) {
- context()->getExecutionContext()->postTask(
- TaskType::MediaElementEvent, BLINK_FROM_HERE,
- createCrossThreadTask(&AudioScheduledSourceHandler::notifyEnded,
- PassRefPtr<AudioScheduledSourceHandler>(this)));
+ TaskRunnerHelper::get(TaskType::MediaElementEvent,
+ context()->getExecutionContext())
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(&AudioScheduledSourceHandler::notifyEnded,
+ RefPtr<AudioScheduledSourceHandler>(this)));
tzik 2017/03/10 00:15:43 Can we use wrapPassRefPtr here?
yuryu 2017/03/10 07:49:32 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698