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

Unified Diff: base/message_loop/message_loop.h

Issue 1044413002: Record async "task backtraces" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More wording fixes. 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
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 91a7b1d33268d470ee4220202dd45734bc3d01ec..8417ce49c0cf25851fbb2fd304b0781bb48ae2ea 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -346,11 +346,13 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
void BindToCurrentThread();
private:
- friend class RunLoop;
friend class internal::IncomingTaskQueue;
+ friend class RunLoop;
friend class ScheduleWorkTest;
friend class Thread;
+ friend struct PendingTask;
FRIEND_TEST_ALL_PREFIXES(MessageLoopTest, DeleteUnboundLoop);
+ friend class PendingTaskTest;
// Creates a MessageLoop without binding to a thread.
// If |type| is TYPE_CUSTOM non-null |pump_factory| must be also given
@@ -450,6 +452,13 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
debug::TaskAnnotator task_annotator_;
+ // Used to allow creating a breadcrumb of program counters in PostTask.
+ // This variable is only initialized while a task is being executed and is
+ // meant only to store context for creating a backtrace breadcrumb. Do not
+ // attach other semantics to it without thinking through the use caes
+ // thoroughly.
+ const PendingTask* current_pending_task_;
+
scoped_refptr<internal::IncomingTaskQueue> incoming_task_queue_;
// A task runner which we haven't bound to a thread yet.
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698