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

Side by Side Diff: content/common/np_channel_base.cc

Issue 8735015: Add CHECK on file descriptor in various IPC::ChannelHandle passed in. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove CHECK in plugin thread. Created 9 years 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 | « content/common/gpu/gpu_channel_manager.cc ('k') | content/ppapi_plugin/ppapi_thread.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/np_channel_base.h" 5 #include "content/common/np_channel_base.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 base::WaitableEvent* NPChannelBase::GetModalDialogEvent( 116 base::WaitableEvent* NPChannelBase::GetModalDialogEvent(
117 gfx::NativeViewId containing_window) { 117 gfx::NativeViewId containing_window) {
118 return NULL; 118 return NULL;
119 } 119 }
120 120
121 bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop, 121 bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop,
122 bool create_pipe_now, 122 bool create_pipe_now,
123 base::WaitableEvent* shutdown_event) { 123 base::WaitableEvent* shutdown_event) {
124 #if defined(OS_POSIX)
125 // Check the validity of fd for bug investigation. Remove after fixed.
126 // See for details: crbug.com/95129, crbug.com/97285.
127 if (mode_ == IPC::Channel::MODE_CLIENT)
128 CHECK_NE(-1, channel_handle_.socket.fd);
129 #endif
130
124 channel_.reset(new IPC::SyncChannel( 131 channel_.reset(new IPC::SyncChannel(
125 channel_handle_, mode_, this, ipc_message_loop, create_pipe_now, 132 channel_handle_, mode_, this, ipc_message_loop, create_pipe_now,
126 shutdown_event)); 133 shutdown_event));
127 channel_valid_ = true; 134 channel_valid_ = true;
128 return true; 135 return true;
129 } 136 }
130 137
131 bool NPChannelBase::Send(IPC::Message* message) { 138 bool NPChannelBase::Send(IPC::Message* message) {
132 if (!channel_.get()) { 139 if (!channel_.get()) {
133 delete message; 140 delete message;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 277
271 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, 278 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id,
272 NPObject* object) { 279 NPObject* object) {
273 DCHECK(object != NULL); 280 DCHECK(object != NULL);
274 stub_map_.erase(object); 281 stub_map_.erase(object);
275 } 282 }
276 283
277 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { 284 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) {
278 proxy_map_.erase(route_id); 285 proxy_map_.erase(route_id);
279 } 286 }
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698