Chromium Code Reviews

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: More unittest fixes. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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 a6341ccb95d42d5050b35c2677dcdd7269d81592..1dc3f1abb0fbd75a97a2486a0e036080fe02f39b 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -460,6 +460,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()) {
« no previous file with comments | « chrome/browser/web_applications/web_app_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine