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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0f9f3a426a099c7a0f26740d78d7b2e5311bbb43 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
@@ -24,15 +24,16 @@
*/
#include "modules/webaudio/AudioScheduledSourceNode.h"
+
+#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 +227,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,
+ wrapPassRefPtr(this)));
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698