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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.h

Issue 2440063002: Worker: Make WorkerThread inherit WebThread::TaskObserver instead of WorkerMicrotaskRunner (Closed)
Patch Set: Created 4 years, 2 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/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/workers/WorkerThread.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerThread.h
index e4873947873f442dd624f7efa64480727bcb4f99..bbd47ae68ee551bb842c78c0e912805c0fd74706 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.h
@@ -34,6 +34,7 @@
#include "core/workers/WorkerThreadLifecycleObserver.h"
#include "platform/LifecycleNotifier.h"
#include "platform/WaitableEvent.h"
+#include "public/platform/WebThread.h"
#include "wtf/Forward.h"
#include "wtf/Functional.h"
#include "wtf/PassRefPtr.h"
@@ -90,7 +91,7 @@ class CORE_EXPORT WorkerThreadLifecycleContext final
// any interruptions.
// - Queued tasks never run.
// - postTask() and appendDebuggerTask() reject posting new tasks.
-class CORE_EXPORT WorkerThread {
+class CORE_EXPORT WorkerThread : public WebThread::TaskObserver {
public:
// Represents how this thread is terminated. Used for UMA. Append only.
enum class ExitCode {
@@ -112,6 +113,10 @@ class CORE_EXPORT WorkerThread {
void terminateAndWait();
static void terminateAndWaitForAllWorkers();
+ // WebThread::TaskObserver.
+ void willProcessTask() override;
+ void didProcessTask() override;
+
virtual WorkerBackingThread& workerBackingThread() = 0;
virtual void clearWorkerBackingThread() = 0;
ConsoleMessageStorage* consoleMessageStorage() const {
@@ -186,7 +191,6 @@ class CORE_EXPORT WorkerThread {
Terminate_WhileDebuggerTaskIsRunning);
class ForceTerminationTask;
- class WorkerMicrotaskRunner;
enum class TerminationMode {
// Synchronously terminate the worker execution. Please be careful to
@@ -267,7 +271,6 @@ class CORE_EXPORT WorkerThread {
long long m_forceTerminationDelayInMs;
std::unique_ptr<InspectorTaskRunner> m_inspectorTaskRunner;
- std::unique_ptr<WorkerMicrotaskRunner> m_microtaskRunner;
RefPtr<WorkerLoaderProxy> m_workerLoaderProxy;
WorkerReportingProxy& m_workerReportingProxy;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698