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

Unified Diff: mojo/public/cpp/system/message_pipe.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/system/handle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/message_pipe.h
diff --git a/mojo/public/cpp/system/message_pipe.h b/mojo/public/cpp/system/message_pipe.h
index b6201559b8921f8701c1a850b9082932137c6263..fab23e4797849543c1ab14cbc8a595af4e5035d5 100644
--- a/mojo/public/cpp/system/message_pipe.h
+++ b/mojo/public/cpp/system/message_pipe.h
@@ -12,10 +12,10 @@
#ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_
#define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_
-#include <assert.h>
#include <stdint.h>
#include "base/compiler_specific.h"
+#include "base/logging.h"
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/cpp/system/handle.h"
#include "mojo/public/cpp/system/macros.h"
@@ -44,8 +44,8 @@ static_assert(sizeof(ScopedMessagePipeHandle) == sizeof(MessagePipeHandle),
inline MojoResult CreateMessagePipe(const MojoCreateMessagePipeOptions* options,
ScopedMessagePipeHandle* message_pipe0,
ScopedMessagePipeHandle* message_pipe1) {
- assert(message_pipe0);
- assert(message_pipe1);
+ DCHECK(message_pipe0);
+ DCHECK(message_pipe1);
MessagePipeHandle handle0;
MessagePipeHandle handle1;
MojoResult rv = MojoCreateMessagePipe(
@@ -103,14 +103,12 @@ class MessagePipe {
inline MessagePipe::MessagePipe() {
MojoResult result = CreateMessagePipe(nullptr, &handle0, &handle1);
- ALLOW_UNUSED_LOCAL(result);
- assert(result == MOJO_RESULT_OK);
+ DCHECK_EQ(MOJO_RESULT_OK, result);
}
inline MessagePipe::MessagePipe(const MojoCreateMessagePipeOptions& options) {
MojoResult result = CreateMessagePipe(&options, &handle0, &handle1);
- ALLOW_UNUSED_LOCAL(result);
- assert(result == MOJO_RESULT_OK);
+ DCHECK_EQ(MOJO_RESULT_OK, result);
}
inline MessagePipe::~MessagePipe() {
« no previous file with comments | « mojo/public/cpp/system/handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698