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

Unified Diff: ppapi/utility/completion_callback_factory_thread_traits.h

Issue 1885933002: Ensure that DLOG(FATAL) also asserts in release-with-asserts builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment with installer fix Created 4 years, 8 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 | « net/spdy/hpack/hpack_huffman_decoder.cc ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/utility/completion_callback_factory_thread_traits.h
diff --git a/ppapi/utility/completion_callback_factory_thread_traits.h b/ppapi/utility/completion_callback_factory_thread_traits.h
index a1dbc64e78ed6f74c53ad6b21d0b76b69a094ee8..ac0b31a75c2fe5d88e10afef502cb5cd632e2dd0 100644
--- a/ppapi/utility/completion_callback_factory_thread_traits.h
+++ b/ppapi/utility/completion_callback_factory_thread_traits.h
@@ -85,7 +85,7 @@ class NonThreadSafeThreadTraits {
/// Default constructor. In debug mode, this checks that the object is being
/// created on the main thread.
RefCount() : ref_(0) {
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
is_main_thread_ = Module::Get()->core()->IsMainThread();
#endif
}
@@ -113,7 +113,7 @@ class NonThreadSafeThreadTraits {
private:
int32_t ref_;
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
bool is_main_thread_;
#endif
};
@@ -126,7 +126,7 @@ class NonThreadSafeThreadTraits {
class Lock {
public:
Lock() {
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
is_main_thread_ = Module::Get()->core()->IsMainThread();
lock_held_ = false;
#endif
@@ -139,7 +139,7 @@ class NonThreadSafeThreadTraits {
/// Acquires the fake "lock". This does nothing except perform checks in
/// debug mode.
void Acquire() {
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
PP_DCHECK(!lock_held_);
lock_held_ = true;
#endif
@@ -148,14 +148,14 @@ class NonThreadSafeThreadTraits {
/// Releases the fake "lock". This does nothing except perform checks in
/// debug mode.
void Release() {
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
PP_DCHECK(lock_held_);
lock_held_ = false;
#endif
}
private:
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
bool is_main_thread_;
bool lock_held_;
#endif
« no previous file with comments | « net/spdy/hpack/hpack_huffman_decoder.cc ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698