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

Unified Diff: src/base/platform/elapsed-timer.h

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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 | « src/base/logging.h ('k') | src/base/platform/mutex.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/elapsed-timer.h
diff --git a/src/base/platform/elapsed-timer.h b/src/base/platform/elapsed-timer.h
index dccba3a3ac29ece576f4aed63d2f9e872a1f4aab..445eed84b55be9515c4bf9041c9ba6c21f460351 100644
--- a/src/base/platform/elapsed-timer.h
+++ b/src/base/platform/elapsed-timer.h
@@ -13,7 +13,7 @@ namespace base {
class ElapsedTimer FINAL {
public:
-#ifdef DEBUG
+#if DCHECK_IS_ON
ElapsedTimer() : started_(false) {}
#endif
@@ -23,7 +23,7 @@ class ElapsedTimer FINAL {
void Start() {
DCHECK(!IsStarted());
start_ticks_ = Now();
-#ifdef DEBUG
+#if DCHECK_IS_ON
started_ = true;
#endif
DCHECK(IsStarted());
@@ -34,7 +34,7 @@ class ElapsedTimer FINAL {
void Stop() {
DCHECK(IsStarted());
start_ticks_ = TimeTicks();
-#ifdef DEBUG
+#if DCHECK_IS_ON
started_ = false;
#endif
DCHECK(!IsStarted());
@@ -87,7 +87,7 @@ class ElapsedTimer FINAL {
}
TimeTicks start_ticks_;
-#ifdef DEBUG
+#if DCHECK_IS_ON
bool started_;
#endif
};
« no previous file with comments | « src/base/logging.h ('k') | src/base/platform/mutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698