| OLD | NEW |
| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 return widget_helper_->WaitForBackingStoreMsg(render_widget_id, | 714 return widget_helper_->WaitForBackingStoreMsg(render_widget_id, |
| 715 max_delay, msg); | 715 max_delay, msg); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void RenderProcessHostImpl::ReceivedBadMessage() { | 718 void RenderProcessHostImpl::ReceivedBadMessage() { |
| 719 if (run_renderer_in_process()) { | 719 if (run_renderer_in_process()) { |
| 720 // In single process mode it is better if we don't suicide but just | 720 // In single process mode it is better if we don't suicide but just |
| 721 // crash. | 721 // crash. |
| 722 CHECK(false); | 722 CHECK(false); |
| 723 } | 723 } |
| 724 NOTREACHED(); | 724 // We kill the renderer but don't include a NOTREACHED, because we want the |
| 725 // browser to try to survive when it gets illegal messages from the renderer. |
| 725 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, | 726 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, |
| 726 false); | 727 false); |
| 727 } | 728 } |
| 728 | 729 |
| 729 void RenderProcessHostImpl::WidgetRestored() { | 730 void RenderProcessHostImpl::WidgetRestored() { |
| 730 // Verify we were properly backgrounded. | 731 // Verify we were properly backgrounded. |
| 731 DCHECK_EQ(backgrounded_, (visible_widgets_ == 0)); | 732 DCHECK_EQ(backgrounded_, (visible_widgets_ == 0)); |
| 732 visible_widgets_++; | 733 visible_widgets_++; |
| 733 SetBackgrounded(false); | 734 SetBackgrounded(false); |
| 734 } | 735 } |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1746 TRACE_EVENT0("renderer_host", | 1747 TRACE_EVENT0("renderer_host", |
| 1747 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1748 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
| 1748 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1749 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
| 1749 ack_params.sync_point = 0; | 1750 ack_params.sync_point = 0; |
| 1750 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1751 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
| 1751 gpu_process_host_id, | 1752 gpu_process_host_id, |
| 1752 ack_params); | 1753 ack_params); |
| 1753 } | 1754 } |
| 1754 | 1755 |
| 1755 } // namespace content | 1756 } // namespace content |
| OLD | NEW |