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

Side by Side 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: 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_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 437 }
438 438
439 Destroy(); 439 Destroy();
440 } 440 }
441 441
442 bool RenderWidgetHostImpl::IsLoading() const { 442 bool RenderWidgetHostImpl::IsLoading() const {
443 return is_loading_; 443 return is_loading_;
444 } 444 }
445 445
446 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { 446 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
447 // Only process messages if the RenderWidget is alive.
448 if (!renderer_initialized())
449 return false;
450
447 bool handled = true; 451 bool handled = true;
448 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) 452 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg)
449 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) 453 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone)
450 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, 454 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture,
451 OnQueueSyntheticGesture) 455 OnQueueSyntheticGesture)
452 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, 456 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition,
453 OnImeCancelComposition) 457 OnImeCancelComposition)
454 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) 458 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
455 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, 459 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK,
456 OnUpdateScreenRectsAck) 460 OnUpdateScreenRectsAck)
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 } 2246 }
2243 2247
2244 #if defined(OS_WIN) 2248 #if defined(OS_WIN)
2245 gfx::NativeViewAccessible 2249 gfx::NativeViewAccessible
2246 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2250 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2247 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2251 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2248 } 2252 }
2249 #endif 2253 #endif
2250 2254
2251 } // namespace content 2255 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698