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

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

Issue 1534933002: Don't process messages sent to dead routing ids. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 891
892 bool RenderViewHostImpl::SuddenTerminationAllowed() const { 892 bool RenderViewHostImpl::SuddenTerminationAllowed() const {
893 return sudden_termination_allowed_ || 893 return sudden_termination_allowed_ ||
894 GetProcess()->SuddenTerminationAllowed(); 894 GetProcess()->SuddenTerminationAllowed();
895 } 895 }
896 896
897 /////////////////////////////////////////////////////////////////////////////// 897 ///////////////////////////////////////////////////////////////////////////////
898 // RenderViewHostImpl, IPC message handlers: 898 // RenderViewHostImpl, IPC message handlers:
899 899
900 bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) { 900 bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
901 // Only process messages if the RenderView is alive.
902 if (!renderer_initialized())
903 return false;
904
901 if (!BrowserMessageFilter::CheckCanDispatchOnUI( 905 if (!BrowserMessageFilter::CheckCanDispatchOnUI(
902 msg, static_cast<RenderWidgetHostImpl*>(this))) { 906 msg, static_cast<RenderWidgetHostImpl*>(this))) {
903 return true; 907 return true;
904 } 908 }
905 909
906 // Filter out most IPC messages if this renderer is swapped out. 910 // Filter out most IPC messages if this renderer is swapped out.
907 // We still want to handle certain ACKs to keep our state consistent. 911 // We still want to handle certain ACKs to keep our state consistent.
908 if (is_swapped_out_) { 912 if (is_swapped_out_) {
909 if (!SwappedOutMessages::CanHandleWhileSwappedOut(msg)) { 913 if (!SwappedOutMessages::CanHandleWhileSwappedOut(msg)) {
910 // If this is a synchronous message and we decided not to handle it, 914 // If this is a synchronous message and we decided not to handle it,
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 } else { 1407 } else {
1404 render_view_ready_on_process_launch_ = true; 1408 render_view_ready_on_process_launch_ = true;
1405 } 1409 }
1406 } 1410 }
1407 1411
1408 void RenderViewHostImpl::RenderViewReady() { 1412 void RenderViewHostImpl::RenderViewReady() {
1409 delegate_->RenderViewReady(this); 1413 delegate_->RenderViewReady(this);
1410 } 1414 }
1411 1415
1412 } // namespace content 1416 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698