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

Unified Diff: mojo/public/cpp/bindings/lib/shared_data.h

Issue 1773403006: [mojo-sdk] Replace assert() usage in bindings with DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | mojo/public/cpp/bindings/strong_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/shared_data.h
diff --git a/mojo/public/cpp/bindings/lib/shared_data.h b/mojo/public/cpp/bindings/lib/shared_data.h
index 0028e1156a948fb64ae61eb04361e62676c75eb3..0afd892bf998e1cf26f305602c5d004db2b68bcf 100644
--- a/mojo/public/cpp/bindings/lib/shared_data.h
+++ b/mojo/public/cpp/bindings/lib/shared_data.h
@@ -5,8 +5,7 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SHARED_DATA_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_SHARED_DATA_H_
-#include <assert.h>
-
+#include "base/logging.h"
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "mojo/public/cpp/system/macros.h"
@@ -83,11 +82,11 @@ class SharedData {
Holder(const T& value) : value(value), ref_count_(1) {}
void Retain() {
- assert(thread_checker_.CalledOnValidThread());
+ DCHECK(thread_checker_.CalledOnValidThread());
++ref_count_;
}
void Release() {
- assert(thread_checker_.CalledOnValidThread());
+ DCHECK(thread_checker_.CalledOnValidThread());
if (--ref_count_ == 0)
delete this;
}
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/strong_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698