Index: base/task_runner_util.h |
diff --git a/base/task_runner_util.h b/base/task_runner_util.h |
index ba8e120c6f4393496130d9bef69a275b28533752..3b6feee753c50fea46413575a04776ae98c5bf88 100644 |
--- a/base/task_runner_util.h |
+++ b/base/task_runner_util.h |
@@ -26,12 +26,7 @@ void ReturnAsParamAdapter(const Callback<ReturnType(void)>& func, |
template <typename TaskReturnType, typename ReplyArgType> |
void ReplyAdapter(const Callback<void(ReplyArgType)>& callback, |
TaskReturnType* result) { |
- // TODO(ajwong): Remove this conditional and add a DCHECK to enforce that |
- // |reply| must be non-null in PostTaskAndReplyWithResult() below after |
- // current code that relies on this API softness has been removed. |
- // http://crbug.com/162712 |
- if (!callback.is_null()) |
- callback.Run(std::move(*result)); |
+ callback.Run(std::move(*result)); |
} |
} // namespace internal |
@@ -56,6 +51,8 @@ bool PostTaskAndReplyWithResult( |
const tracked_objects::Location& from_here, |
const Callback<TaskReturnType(void)>& task, |
const Callback<void(ReplyArgType)>& reply) { |
+ DCHECK(task); |
+ DCHECK(reply); |
dcheng
2016/11/29 21:13:11
TIL that Callback can convert to bool.
|
TaskReturnType* result = new TaskReturnType(); |
return task_runner->PostTaskAndReply( |
from_here, |