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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1408873002: Ignore InputMsg IPCs if RenderView is in swapped out state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Alex's review. Created 5 years, 2 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index c768e6ae073f519df9c20937a201516d44242b10..ace7f67609514df4088e3a3c6cfba25ee5253a8a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1276,6 +1276,11 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
if (main_frame && main_frame->isWebLocalFrame())
GetContentClient()->SetActiveURL(main_frame->document().url());
+ // Input IPC messages must not be processed if the RenderView is in
+ // swapped out state.
+ if (is_swapped_out_ && IPC_MESSAGE_ID_CLASS(message.type()) == InputMsgStart)
+ return false;
+
base::ObserverListBase<RenderViewObserver>::Iterator it(&observers_);
RenderViewObserver* observer;
while ((observer = it.GetNext()) != NULL)
@@ -3066,6 +3071,9 @@ GURL RenderViewImpl::GetURLForGraphicsContext3D() {
}
void RenderViewImpl::OnSetFocus(bool enable) {
+ // This message must always be received when the main frame is a
+ // WebLocalFrame.
+ CHECK(webview()->mainFrame()->isWebLocalFrame());
RenderWidget::OnSetFocus(enable);
#if defined(ENABLE_PLUGINS)
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698