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

Unified Diff: mojo/system/local_data_pipe.cc

Issue 405653003: mojo: Make InterfacePtr<> testable in if() statements without .get(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to is_bound() Created 6 years, 5 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/spy/spy.cc ('k') | mojo/views/native_widget_view_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/local_data_pipe.cc
diff --git a/mojo/system/local_data_pipe.cc b/mojo/system/local_data_pipe.cc
index 8f4bbd6a47e54cd4afb9bdba2dc50be96986c4eb..eb799ccff695a8c99e4aefe621fd2e0fb9cadc2c 100644
--- a/mojo/system/local_data_pipe.cc
+++ b/mojo/system/local_data_pipe.cc
@@ -287,7 +287,7 @@ HandleSignalsState LocalDataPipe::ConsumerGetHandleSignalsStateNoLock() const {
void LocalDataPipe::EnsureBufferNoLock() {
DCHECK(producer_open_no_lock());
- if (buffer_.get())
+ if (buffer_)
return;
buffer_.reset(static_cast<char*>(
base::AlignedAlloc(capacity_num_bytes(), kDataPipeBufferAlignmentBytes)));
@@ -297,7 +297,7 @@ void LocalDataPipe::DestroyBufferNoLock() {
#ifndef NDEBUG
// Scribble on the buffer to help detect use-after-frees. (This also helps the
// unit test detect certain bugs without needing ASAN or similar.)
- if (buffer_.get())
+ if (buffer_)
memset(buffer_.get(), 0xcd, capacity_num_bytes());
#endif
buffer_.reset();
« no previous file with comments | « mojo/spy/spy.cc ('k') | mojo/views/native_widget_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698