Support JSON encoding of data for about:tracking information
I also fought a terrible (but educational) fight with Thread Local Store, and its ability to do cleanup (call destructors) at thread exit (notably applicable to Worker Threads). Thta is why there were soooo many test bot runs and tiny checkins. I now have a plan in mind that won't rely on that functionality. The code seems to work cross-platform, but if I have trouble with Linux, I'll repeatedly leak ThreadData contexts temporarily on that platform. Given that the code is only enabled under Debug, this is not yet a real problem.
Each CL I write for this code also includes a bunch of cleanup. In this case, I changed the Write() methods to WriteHTML(), since I didn't want any confusion with JSON writing etc. I also did a bunch of tiny cleanups which should not have changed what the code does.
r=rtenneti
Review URL: http://codereview.chromium.org/8313013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106952 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 84baeca622c2d87c6a0aaf86e7a8362efe56fb25
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 4cdcb24..593c03c 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -497,7 +497,8 @@
DidProcessTask(pending_task.time_posted));
#if defined(TRACK_ALL_TASK_OBJECTS)
tracked_objects::ThreadData::TallyADeathIfActive(pending_task.post_births,
- pending_task.time_posted, pending_task.delayed_run_time, start_of_run);
+ pending_task.time_posted, pending_task.delayed_run_time, start_of_run,
+ tracked_objects::ThreadData::Now());
#endif // defined(TRACK_ALL_TASK_OBJECTS)
nestable_tasks_allowed_ = true;