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

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

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplify now the quiescence is handled in chromium Created 5 years, 8 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: Source/core/workers/WorkerThread.h
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h
index 4a66960a7817ce0179f3d486e3edebeab2ac84a6..1b9be7f651aa04cbd060509dd1b061373c381d92 100644
--- a/Source/core/workers/WorkerThread.h
+++ b/Source/core/workers/WorkerThread.h
@@ -47,7 +47,6 @@ class WebWaitableEvent;
class WorkerGlobalScope;
class WorkerInspectorController;
class WorkerReportingProxy;
-class WorkerSharedTimer;
class WorkerThreadShutdownFinishTask;
class WorkerThreadStartupData;
class WorkerThreadTask;
@@ -122,8 +121,16 @@ protected:
virtual void destroyIsolate();
virtual void terminateV8Execution();
+ // This is protected virtual for testing.
+ virtual bool doIdleGc(double deadlineSeconds);
+
+ WebThreadSupportingGC* threadForTesting() const
+ {
+ return m_thread.get();
+ }
+
private:
- friend class WorkerSharedTimer;
+ friend class WorkerThreadIdleTask;
friend class WorkerThreadShutdownFinishTask;
void stopInShutdownSequence();
@@ -131,7 +138,7 @@ private:
void initialize();
void cleanup();
- void idleHandler();
+ void idleTask(double deadlineSeconds);
void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs);
void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>, long long delayMs);

Powered by Google App Engine
This is Rietveld 408576698