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

Unified Diff: mojo/public/cpp/bindings/strong_binding.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 | « mojo/public/cpp/bindings/lib/shared_data.h ('k') | mojo/public/cpp/system/buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/strong_binding.h
diff --git a/mojo/public/cpp/bindings/strong_binding.h b/mojo/public/cpp/bindings/strong_binding.h
index 59ddb78da1c9b2d17ad091ecbce1dee7bb996cfc..3694c68082740332dbe310cec973183e430eec02 100644
--- a/mojo/public/cpp/bindings/strong_binding.h
+++ b/mojo/public/cpp/bindings/strong_binding.h
@@ -5,9 +5,9 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_
#define MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_
-#include <assert.h>
#include <utility>
+#include "base/logging.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
@@ -71,19 +71,19 @@ class StrongBinding {
~StrongBinding() {}
void Bind(ScopedMessagePipeHandle handle) {
- assert(!binding_.is_bound());
+ DCHECK(!binding_.is_bound());
binding_.Bind(std::move(handle));
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
}
void Bind(InterfacePtr<Interface>* ptr) {
- assert(!binding_.is_bound());
+ DCHECK(!binding_.is_bound());
binding_.Bind(ptr);
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
}
void Bind(InterfaceRequest<Interface> request) {
- assert(!binding_.is_bound());
+ DCHECK(!binding_.is_bound());
binding_.Bind(std::move(request));
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
}
@@ -97,7 +97,7 @@ class StrongBinding {
// This method may only be called after this StrongBinding has been bound to a
// message pipe.
void set_connection_error_handler(const Closure& error_handler) {
- assert(binding_.is_bound());
+ DCHECK(binding_.is_bound());
connection_error_handler_ = error_handler;
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/shared_data.h ('k') | mojo/public/cpp/system/buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698