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

Unified Diff: webrtc/base/taskrunner.h

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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 | « webrtc/base/taskparent.cc ('k') | webrtc/base/taskrunner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/taskrunner.h
diff --git a/webrtc/base/taskrunner.h b/webrtc/base/taskrunner.h
index bd7b4ea858b485aa6824d4a2fc45570245351564..f59677a8467cf3f0f9a667a7a977bbe6e0174298 100644
--- a/webrtc/base/taskrunner.h
+++ b/webrtc/base/taskrunner.h
@@ -15,6 +15,7 @@
#include <vector>
+#include "webrtc/base/checks.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/base/taskparent.h"
@@ -45,7 +46,7 @@ class TaskRunner : public TaskParent, public sigslot::has_slots<> {
void UpdateTaskTimeout(Task* task, int64_t previous_task_timeout_time);
-#if !defined(NDEBUG)
+#if RTC_DCHECK_IS_ON
bool is_ok_to_delete(Task* task) {
return task == deleting_task_;
}
@@ -86,11 +87,11 @@ class TaskRunner : public TaskParent, public sigslot::has_slots<> {
void CheckForTimeoutChange(int64_t previous_timeout_time);
std::vector<Task *> tasks_;
- Task *next_timeout_task_;
- bool tasks_running_;
-#if !defined(NDEBUG)
- int abort_count_;
- Task* deleting_task_;
+ Task *next_timeout_task_ = nullptr;
+ bool tasks_running_ = false;
+#if RTC_DCHECK_IS_ON
+ int abort_count_ = 0;
+ Task* deleting_task_ = nullptr;
#endif
void RecalcNextTimeout(Task *exclude_task);
« no previous file with comments | « webrtc/base/taskparent.cc ('k') | webrtc/base/taskrunner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698