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

Unified Diff: base/message_loop/message_loop.cc

Issue 1044413002: Record async "task backtraces" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index eb0f968849485ea73ef8a1aab9094bb9527af403..cacc26f0884ac3154aebc116795d5c715f1947e1 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -126,7 +126,8 @@ MessageLoop::MessageLoop(Type type)
os_modal_loop_(false),
#endif // OS_WIN
message_histogram_(NULL),
- run_loop_(NULL) {
+ run_loop_(NULL),
+ current_pending_task_(NULL) {
Init();
pump_ = CreateMessagePumpForType(type).Pass();
@@ -426,6 +427,7 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
void MessageLoop::RunTask(const PendingTask& pending_task) {
DCHECK(nestable_tasks_allowed_);
+ current_pending_task_ = &pending_task;
#if defined(OS_WIN)
if (pending_task.is_high_res) {
@@ -447,6 +449,8 @@ void MessageLoop::RunTask(const PendingTask& pending_task) {
DidProcessTask(pending_task));
nestable_tasks_allowed_ = true;
+
+ current_pending_task_ = NULL;
}
bool MessageLoop::DeferOrRunPendingTask(const PendingTask& pending_task) {

Powered by Google App Engine
This is Rietveld 408576698