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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp

Issue 2639953002: Worker: Migrate Timer to TaskRunnerTimer in InProcessWorkerObjectProxy (Closed)
Patch Set: WIP Created 3 years, 11 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 | « third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
index 338d02a9bc37ebd308355fd70a8c0656abfb183f..d3f1c886146cbb819b09a7e07eb1e6e8c1b9c03e 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
@@ -43,6 +43,7 @@
#include "core/workers/WorkerThread.h"
#include "platform/CrossThreadFunctional.h"
#include "platform/WebTaskRunner.h"
+#include "public/platform/Platform.h"
#include "wtf/Functional.h"
#include "wtf/PtrUtil.h"
#include <memory>
@@ -113,8 +114,9 @@ void InProcessWorkerObjectProxy::didCreateWorkerGlobalScope(
WorkerOrWorkletGlobalScope* globalScope) {
DCHECK(!m_workerGlobalScope);
m_workerGlobalScope = toWorkerGlobalScope(globalScope);
- m_timer = WTF::wrapUnique(new Timer<InProcessWorkerObjectProxy>(
- this, &InProcessWorkerObjectProxy::checkPendingActivity));
+ m_timer = WTF::makeUnique<TaskRunnerTimer<InProcessWorkerObjectProxy>>(
+ Platform::current()->currentThread()->getWebTaskRunner(), this,
haraken 2017/01/19 11:08:01 It's unfortunate that we have use the default sche
+ &InProcessWorkerObjectProxy::checkPendingActivity);
}
void InProcessWorkerObjectProxy::didEvaluateWorkerScript(bool) {
« no previous file with comments | « third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698