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

Unified Diff: content/child/scheduler/task_queue_manager.h

Issue 1072473002: Speculative patch: Make it safe to delete the TQM inside a Task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/child/scheduler/task_queue_manager.h
diff --git a/content/child/scheduler/task_queue_manager.h b/content/child/scheduler/task_queue_manager.h
index e8563ee6fd1bf369e9ba180383a388f91dd72eda..1f91073026844cf378d87835098ed3efe6eae3c4 100644
--- a/content/child/scheduler/task_queue_manager.h
+++ b/content/child/scheduler/task_queue_manager.h
@@ -128,6 +128,12 @@ class CONTENT_EXPORT TaskQueueManager {
friend class internal::LazyNow;
friend class internal::TaskQueue;
+ class DeletionSentinel : public base::RefCounted<DeletionSentinel> {
+ private:
+ friend class base::RefCounted<DeletionSentinel>;
+ ~DeletionSentinel() {}
+ };
+
// Called by the task queue to register a new pending task and allocate a
// sequence number for it.
void DidQueueTask(base::PendingTask* pending_task);
@@ -198,6 +204,7 @@ class CONTENT_EXPORT TaskQueueManager {
const char* disabled_by_default_tracing_category_;
+ scoped_refptr<DeletionSentinel> deletion_sentinel_;
base::WeakPtrFactory<TaskQueueManager> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
« no previous file with comments | « no previous file | content/child/scheduler/task_queue_manager.cc » ('j') | content/child/scheduler/task_queue_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698