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

Side by Side Diff: base/message_loop.h

Issue 7039020: Tag all tracked objects, including Tasks, with the program counter at the site of FROM_HERE. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/alias.cc ('k') | base/message_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MESSAGE_LOOP_H_ 5 #ifndef BASE_MESSAGE_LOOP_H_
6 #define BASE_MESSAGE_LOOP_H_ 6 #define BASE_MESSAGE_LOOP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 base::TimeTicks time_posted; 408 base::TimeTicks time_posted;
409 409
410 // The time when the task should be run. 410 // The time when the task should be run.
411 base::TimeTicks delayed_run_time; 411 base::TimeTicks delayed_run_time;
412 412
413 // Secondary sort key for run time. 413 // Secondary sort key for run time.
414 int sequence_num; 414 int sequence_num;
415 415
416 // OK to dispatch from a nested loop. 416 // OK to dispatch from a nested loop.
417 bool nestable; 417 bool nestable;
418
419 // The site this PendingTask was posted from.
420 const void* birth_program_counter;
418 }; 421 };
419 422
420 class TaskQueue : public std::queue<PendingTask> { 423 class TaskQueue : public std::queue<PendingTask> {
421 public: 424 public:
422 void Swap(TaskQueue* queue) { 425 void Swap(TaskQueue* queue) {
423 c.swap(queue->c); // Calls std::deque::swap 426 c.swap(queue->c); // Calls std::deque::swap
424 } 427 }
425 }; 428 };
426 429
427 typedef std::priority_queue<PendingTask> DelayedTaskQueue; 430 typedef std::priority_queue<PendingTask> DelayedTaskQueue;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 #endif // defined(OS_POSIX) 690 #endif // defined(OS_POSIX)
688 }; 691 };
689 692
690 // Do not add any member variables to MessageLoopForIO! This is important b/c 693 // Do not add any member variables to MessageLoopForIO! This is important b/c
691 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 694 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
692 // data that you need should be stored on the MessageLoop's pump_ instance. 695 // data that you need should be stored on the MessageLoop's pump_ instance.
693 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 696 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
694 MessageLoopForIO_should_not_have_extra_member_variables); 697 MessageLoopForIO_should_not_have_extra_member_variables);
695 698
696 #endif // BASE_MESSAGE_LOOP_H_ 699 #endif // BASE_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « base/debug/alias.cc ('k') | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698