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

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

Issue 2698153003: Reduce createSameThreadTask usage in modules/ (Closed)
Patch Set: Move a static callback to an anonymous namespace Created 3 years, 10 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/BaseAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
index d48fff095dc60bf1f1620f94c7165c094bef85e9..741a3410758bbe45933b45759fd1018b6d386773 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
@@ -33,7 +33,6 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
@@ -614,9 +613,9 @@ void BaseAudioContext::setContextState(AudioContextState newState) {
// Notify context that state changed
if (getExecutionContext())
- getExecutionContext()->postTask(
- TaskType::MediaElementEvent, BLINK_FROM_HERE,
- createSameThreadTask(&BaseAudioContext::notifyStateChange,
+ TaskRunnerHelper::get(TaskType::MediaElementEvent, getExecutionContext())
+ ->postTask(BLINK_FROM_HERE,
+ WTF::bind(&BaseAudioContext::notifyStateChange,
wrapPersistent(this)));
}
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | third_party/WebKit/Source/modules/webdatabase/Database.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698