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

Unified Diff: content/browser/renderer_host/render_widget_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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 197e58a5e1a272930cee76d16145cef6dd2908dd..302c42489f75869d98b9c270ca6ca1fa2186cd19 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -438,6 +438,10 @@ bool RenderWidgetHostImpl::IsLoading() const {
}
bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
+ // Only process messages if the RenderWidget is alive.
+ if (!renderer_initialized())
+ return false;
+
if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg))
return true;

Powered by Google App Engine
This is Rietveld 408576698