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

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: 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/message_loop.h ('k') | base/pending_task.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 72185a8e11a3d085d43af4b131f26cbd87a09490..60df713f7cbf3ab55f645950d78d5f3f63e4a61a 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -320,7 +320,8 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
#endif
nestable_tasks_allowed_(true),
pump_factory_(pump_factory),
- run_loop_(NULL),
+ run_loop_(nullptr),
+ current_pending_task_(nullptr),
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_ = nullptr;
}
bool MessageLoop::DeferOrRunPendingTask(PendingTask pending_task) {
« no previous file with comments | « base/message_loop/message_loop.h ('k') | base/pending_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698