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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 15017018: Prevent unauthorized commits of the Chrome Web Store URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove NOTREACHED. Created 7 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
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 // 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
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 it is possible
nasko 2013/05/13 18:14:27 nit: "it is possible" doesn't seem as strong messa
Charlie Reis 2013/05/13 20:10:51 We can't always survive: renderers can kill the br
725 // for the browser 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698