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

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

Issue 283313002: Ensure that any IPC sent from a child process that couldn't be deserialized causes that p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: switch to histograms Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | ipc/ipc_channel_proxy.h » ('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 "content/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 opening_channel_ = false; 286 opening_channel_ = false;
287 delegate_->OnChannelError(); 287 delegate_->OnChannelError();
288 288
289 for (size_t i = 0; i < filters_.size(); ++i) 289 for (size_t i = 0; i < filters_.size(); ++i)
290 filters_[i]->OnChannelError(); 290 filters_[i]->OnChannelError();
291 291
292 // This will delete host_, which will also destroy this! 292 // This will delete host_, which will also destroy this!
293 delegate_->OnChildDisconnected(); 293 delegate_->OnChildDisconnected();
294 } 294 }
295 295
296 void ChildProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
297 delegate_->OnBadMessageReceived(message);
298 }
299
296 void ChildProcessHostImpl::OnAllocateSharedMemory( 300 void ChildProcessHostImpl::OnAllocateSharedMemory(
297 uint32 buffer_size, 301 uint32 buffer_size,
298 base::SharedMemoryHandle* handle) { 302 base::SharedMemoryHandle* handle) {
299 AllocateSharedMemory(buffer_size, peer_handle_, handle); 303 AllocateSharedMemory(buffer_size, peer_handle_, handle);
300 } 304 }
301 305
302 void ChildProcessHostImpl::OnShutdownRequest() { 306 void ChildProcessHostImpl::OnShutdownRequest() {
303 if (delegate_->CanShutdown()) 307 if (delegate_->CanShutdown())
304 Send(new ChildProcessMsg_Shutdown()); 308 Send(new ChildProcessMsg_Shutdown());
305 } 309 }
306 310
307 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( 311 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
308 uint32 width, 312 uint32 width,
309 uint32 height, 313 uint32 height,
310 uint32 internalformat, 314 uint32 internalformat,
311 uint32 usage, 315 uint32 usage,
312 gfx::GpuMemoryBufferHandle* handle) { 316 gfx::GpuMemoryBufferHandle* handle) {
313 handle->type = gfx::SHARED_MEMORY_BUFFER; 317 handle->type = gfx::SHARED_MEMORY_BUFFER;
314 AllocateSharedMemory( 318 AllocateSharedMemory(
315 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), 319 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat),
316 peer_handle_, 320 peer_handle_,
317 &handle->handle); 321 &handle->handle);
318 } 322 }
319 323
320 } // namespace content 324 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698