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

Unified Diff: mojo/system/raw_channel.cc

Issue 251483007: Mojo: Start writing some unit tests for mojo::system::Channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing export macros Created 6 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 | « mojo/system/raw_channel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel.cc
diff --git a/mojo/system/raw_channel.cc b/mojo/system/raw_channel.cc
index d9febeb38fc61008d18de152f6100bf852ed30ae..92b9a3dfd9aff0646be7932e98d4f8e8d93ce11a 100644
--- a/mojo/system/raw_channel.cc
+++ b/mojo/system/raw_channel.cc
@@ -126,8 +126,13 @@ bool RawChannel::Init(Delegate* delegate) {
DCHECK(!write_buffer_);
write_buffer_.reset(new WriteBuffer);
- if (!OnInit())
+ if (!OnInit()) {
+ delegate_ = NULL;
+ message_loop_for_io_ = NULL;
+ read_buffer_.reset();
+ write_buffer_.reset();
return false;
+ }
return ScheduleRead() == IO_PENDING;
}
« no previous file with comments | « mojo/system/raw_channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698