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

Unified Diff: base/message_loop.cc

Issue 6982004: Added CHECK for tasks passed to PostTask being null. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
===================================================================
--- base/message_loop.cc (revision 84812)
+++ base/message_loop.cc (working copy)
@@ -255,6 +255,7 @@
void MessageLoop::PostTask(
const tracked_objects::Location& from_here, Task* task) {
+ CHECK(task);
PendingTask pending_task(
base::Bind(&TaskClosureAdapter::Run,
new TaskClosureAdapter(task, &should_leak_tasks_)),
@@ -265,6 +266,7 @@
void MessageLoop::PostDelayedTask(
const tracked_objects::Location& from_here, Task* task, int64 delay_ms) {
+ CHECK(task);
PendingTask pending_task(
base::Bind(&TaskClosureAdapter::Run,
new TaskClosureAdapter(task, &should_leak_tasks_)),
@@ -275,6 +277,7 @@
void MessageLoop::PostNonNestableTask(
const tracked_objects::Location& from_here, Task* task) {
+ CHECK(task);
PendingTask pending_task(
base::Bind(&TaskClosureAdapter::Run,
new TaskClosureAdapter(task, &should_leak_tasks_)),
@@ -285,6 +288,7 @@
void MessageLoop::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here, Task* task, int64 delay_ms) {
+ CHECK(task);
PendingTask pending_task(
base::Bind(&TaskClosureAdapter::Run,
new TaskClosureAdapter(task, &should_leak_tasks_)),
@@ -295,7 +299,7 @@
void MessageLoop::PostTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
- DCHECK(!task.is_null());
+ CHECK(!task.is_null());
PendingTask pending_task(task, from_here, CalculateDelayedRuntime(0), true);
AddToIncomingQueue(&pending_task);
}
@@ -303,7 +307,7 @@
void MessageLoop::PostDelayedTask(
const tracked_objects::Location& from_here, const base::Closure& task,
int64 delay_ms) {
- DCHECK(!task.is_null());
+ CHECK(!task.is_null());
PendingTask pending_task(task, from_here,
CalculateDelayedRuntime(delay_ms), true);
AddToIncomingQueue(&pending_task);
@@ -311,7 +315,7 @@
void MessageLoop::PostNonNestableTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
- DCHECK(!task.is_null());
+ CHECK(!task.is_null());
PendingTask pending_task(task, from_here, CalculateDelayedRuntime(0), false);
AddToIncomingQueue(&pending_task);
}
@@ -319,7 +323,7 @@
void MessageLoop::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here, const base::Closure& task,
int64 delay_ms) {
- DCHECK(!task.is_null());
+ CHECK(!task.is_null());
PendingTask pending_task(task, from_here,
CalculateDelayedRuntime(delay_ms), false);
AddToIncomingQueue(&pending_task);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698