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

Unified Diff: content/browser/frame_host/render_frame_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: Remove Init call. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index e693c96e5c4d269e375b92f870ad506d4c5d7ed1..72153fa84217712f5ba2d4fff403c3697da2e04c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -459,6 +459,10 @@ bool RenderFrameHostImpl::Send(IPC::Message* message) {
}
bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
+ // Only process messages if the RenderFrame is alive.
+ if (!render_frame_created_)
+ return false;
+
// Filter out most IPC messages if this frame is swapped out.
// We still want to handle certain ACKs to keep our state consistent.
if (is_swapped_out()) {

Powered by Google App Engine
This is Rietveld 408576698