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

Side by Side Diff: ipc/ipc_channel_nacl.cc

Issue 1321803003: ipc: Make sure that ChannelReader is destroyed correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_add_header4
Patch Set: Rebase against top of tree. Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_nacl.h" 5 #include "ipc/ipc_channel_nacl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 broker_(broker) { 134 broker_(broker) {
135 if (!CreatePipe(channel_handle)) { 135 if (!CreatePipe(channel_handle)) {
136 // The pipe may have been closed already. 136 // The pipe may have been closed already.
137 const char *modestr = (mode_ & MODE_SERVER_FLAG) ? "server" : "client"; 137 const char *modestr = (mode_ & MODE_SERVER_FLAG) ? "server" : "client";
138 LOG(WARNING) << "Unable to create pipe named \"" << channel_handle.name 138 LOG(WARNING) << "Unable to create pipe named \"" << channel_handle.name
139 << "\" in " << modestr << " mode"; 139 << "\" in " << modestr << " mode";
140 } 140 }
141 } 141 }
142 142
143 ChannelNacl::~ChannelNacl() { 143 ChannelNacl::~ChannelNacl() {
144 CleanUp();
144 Close(); 145 Close();
145 } 146 }
146 147
147 base::ProcessId ChannelNacl::GetPeerPID() const { 148 base::ProcessId ChannelNacl::GetPeerPID() const {
148 // This shouldn't actually get used in the untrusted side of the proxy, and we 149 // This shouldn't actually get used in the untrusted side of the proxy, and we
149 // don't have the real pid anyway. 150 // don't have the real pid anyway.
150 return -1; 151 return -1;
151 } 152 }
152 153
153 base::ProcessId ChannelNacl::GetSelfPID() const { 154 base::ProcessId ChannelNacl::GetSelfPID() const {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // static 399 // static
399 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle, 400 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle,
400 Mode mode, 401 Mode mode,
401 Listener* listener, 402 Listener* listener,
402 AttachmentBroker* broker) { 403 AttachmentBroker* broker) {
403 return scoped_ptr<Channel>( 404 return scoped_ptr<Channel>(
404 new ChannelNacl(channel_handle, mode, listener, broker)); 405 new ChannelNacl(channel_handle, mode, listener, broker));
405 } 406 }
406 407
407 } // namespace IPC 408 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698