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

Issue 1408873002: Ignore InputMsg IPCs if RenderView is in swapped out state. (Closed)

Created:
5 years, 2 months ago by nasko
Modified:
5 years, 2 months ago
Reviewers:
alexmos
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ignore InputMsg IPCs if RenderView is in swapped out state. InputMsg IPCs are dispatched to the compositor thread when they arrive in the renderer process. If not handled there, they are sent back to the main thread. This behavior allows for IPCs that are processed on the main thread to come in order different than the browser process has sent them in. The crash in 541578 occurs when InputMsg_SetFocus is sent right before FrameMsg_SwapOut. On the renderer side, the InputMsg_SetFocus message is sent to the compositor thread and in the meantime the FrameMsg_SwapOut message is processed on the main thread. After swapping out is complete the top-level frame for the swapped out RenderView becomes a RemoteFrame when swapped out RenderFrameHost usage is disabled. This causes the FocusController to return RemoteFrame and that violates assumptions elsewhere in code that all focused frames are LocalFrame. Overall, swapped out RenderView should not be processing input messages at all, so this CL implements this restriction. BUG=357747, 541578 Committed: https://crrev.com/c6edf7e60d1d5dd6202fd778dbac8605fe71036d Cr-Commit-Position: refs/heads/master@{#354426}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Fixes based on Alex's review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -0 lines) Patch
M content/browser/frame_host/render_frame_host_manager_browsertest.cc View 1 2 chunks +48 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
nasko
Hey Alex, Can you review this CL for me? It implements the restriction that swapped ...
5 years, 2 months ago (2015-10-15 22:08:37 UTC) #2
alexmos
Great, I'm very glad to see this fixed! https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc#newcode2138 content/browser/frame_host/render_frame_host_manager_browsertest.cc:2138: static_cast<WebContentsImpl*>(new_shell->web_contents()); ...
5 years, 2 months ago (2015-10-15 22:52:38 UTC) #3
nasko
https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc#newcode2126 content/browser/frame_host/render_frame_host_manager_browsertest.cc:2126: embedded_test_server()->GetURL("a.com", "/title1.html")); I missed to add EXPECT_TRUE on all ...
5 years, 2 months ago (2015-10-15 23:18:26 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408873002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408873002/20001
5 years, 2 months ago (2015-10-15 23:19:22 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-16 00:14:52 UTC) #8
alexmos
LGTM https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc File content/browser/frame_host/render_frame_host_manager_browsertest.cc (right): https://codereview.chromium.org/1408873002/diff/1/content/browser/frame_host/render_frame_host_manager_browsertest.cc#newcode2126 content/browser/frame_host/render_frame_host_manager_browsertest.cc:2126: embedded_test_server()->GetURL("a.com", "/title1.html")); On 2015/10/15 23:18:26, nasko (slow to ...
5 years, 2 months ago (2015-10-16 00:49:15 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408873002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408873002/20001
5 years, 2 months ago (2015-10-16 01:44:27 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-16 01:48:53 UTC) #12
commit-bot: I haz the power
5 years, 2 months ago (2015-10-16 01:49:53 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c6edf7e60d1d5dd6202fd778dbac8605fe71036d
Cr-Commit-Position: refs/heads/master@{#354426}

Powered by Google App Engine
This is Rietveld 408576698