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

Issue 2023453003: Make RenderFrameHostImpl::GetRenderWidgetHost() always return an object (Closed)

Created:
4 years, 6 months ago by kenrb
Modified:
4 years, 6 months ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, creis+watch_chromium.org, aboxhall+watch_chromium.org, nektar+watch_chromium.org, nasko+codewatch_chromium.org, jam, yuzo+watch_chromium.org, je_julie, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make RenderFrameHostImpl::GetRenderWidgetHost() always return an object Using GetRenderWidgetHost as an accessor for the RFHI's data member is error prone because it is easy to assume that a frame attached to the frame tree will always have a widget to talk to, and also it is inconsistent with RenderViewImpl::GetHost() which does not return nullptr. While it is generally preferable for features to interact with a RenderWidgetHostView rather than a RenderWidgetHost for the purposes of input and renderering interactions, where possible, RenderWidgetHost availability is sometimes necessary and GetView() can unavoidably return nullptr in some cases (for instance, if the renderer just crashed). This CL also does some related cleanup. BUG=455245 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/0e8dc209f5e4a6140e43551de0e036324c68a383 Cr-Commit-Position: refs/heads/master@{#396751}

Patch Set 1 #

Patch Set 2 : Compile fix #

Patch Set 3 : Need a cast in test #

Total comments: 18

Patch Set 4 : Addressing creis' comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -35 lines) Patch
M content/browser/accessibility/dump_accessibility_browsertest_base.cc View 1 2 3 1 chunk +3 lines, -5 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/frame_host/cross_process_frame_connector.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 1 chunk +17 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 3 chunks +22 lines, -18 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (5 generated)
kenrb
creis: PTAL?
4 years, 6 months ago (2016-05-27 22:01:16 UTC) #3
Charlie Reis
Thanks! LGTM with a few minor comments and suggestions. https://codereview.chromium.org/2023453003/diff/40001/content/browser/accessibility/dump_accessibility_browsertest_base.cc File content/browser/accessibility/dump_accessibility_browsertest_base.cc (right): https://codereview.chromium.org/2023453003/diff/40001/content/browser/accessibility/dump_accessibility_browsertest_base.cc#newcode273 content/browser/accessibility/dump_accessibility_browsertest_base.cc:273: ...
4 years, 6 months ago (2016-05-27 22:50:28 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2023453003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2023453003/60001
4 years, 6 months ago (2016-05-30 18:25:15 UTC) #7
kenrb
https://codereview.chromium.org/2023453003/diff/40001/content/browser/accessibility/dump_accessibility_browsertest_base.cc File content/browser/accessibility/dump_accessibility_browsertest_base.cc (right): https://codereview.chromium.org/2023453003/diff/40001/content/browser/accessibility/dump_accessibility_browsertest_base.cc#newcode273 content/browser/accessibility/dump_accessibility_browsertest_base.cc:273: static_cast<RenderWidgetHostViewBase*>(current_frame_host->GetView()); On 2016/05/27 22:50:28, Charlie Reis wrote: > Sanity ...
4 years, 6 months ago (2016-05-30 19:39:54 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-05-30 19:51:52 UTC) #9
commit-bot: I haz the power
4 years, 6 months ago (2016-05-30 19:53:15 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/0e8dc209f5e4a6140e43551de0e036324c68a383
Cr-Commit-Position: refs/heads/master@{#396751}

Powered by Google App Engine
This is Rietveld 408576698