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

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: moar 00 like. Created 3 years, 11 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 2212941db9ae15a3a6a30a590389dca826134f35..ff9e813e6fda86b922f2801f00bf875c2274ed8a 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -321,6 +321,7 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
nestable_tasks_allowed_(true),
pump_factory_(pump_factory),
run_loop_(NULL),
+ current_pending_task_(NULL),
danakj 2017/02/07 23:16:46 nullptr
awong 2017/02/08 01:55:50 Done.
incoming_task_queue_(new internal::IncomingTaskQueue(this)),
unbound_task_runner_(
new internal::MessageLoopTaskRunner(incoming_task_queue_)),
@@ -403,6 +404,7 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
void MessageLoop::RunTask(PendingTask* pending_task) {
DCHECK(nestable_tasks_allowed_);
+ current_pending_task_ = pending_task;
#if defined(OS_WIN)
if (pending_task->is_high_res) {
@@ -423,6 +425,8 @@ void MessageLoop::RunTask(PendingTask* pending_task) {
observer.DidProcessTask(*pending_task);
nestable_tasks_allowed_ = true;
+
+ current_pending_task_ = NULL;
}
bool MessageLoop::DeferOrRunPendingTask(PendingTask pending_task) {

Powered by Google App Engine
This is Rietveld 408576698