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

Issue 1711103002: Implement lifetime observer on RenderWidgetHostViewBase. (Closed)

Created:
4 years, 10 months ago by wjmaclean
Modified:
4 years, 9 months ago
CC:
chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, nasko+codewatch_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, sievers+watch_chromium.org, James Su, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement lifetime observer on RenderWidgetHostViewBase. It is important for RenderWidgetHostInputEventRouter to know about the destruction of RenderWidgetHostViewBase objects it owns pointers to. In the past we have encountered issues with stale pointers, and until now dealt with this using WeakPtrs to the views. But this approach still requires checking pointers before use to see if they are stale. This CL makes RenderWidgetHostInputEventRouter an observer of the RenderWidgetHostViewBase objects it holds pointers to in order to avoid holding stale pointers. BUG=583379 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/3912c64fb9b8e5ad166060a91ccb752914016029 Cr-Commit-Position: refs/heads/master@{#378133}

Patch Set 1 #

Patch Set 2 : Restructure, and make RWHVB derived classes responsible for early notification. #

Total comments: 10

Patch Set 3 : Can RWHVA's host_ ever be null? #

Patch Set 4 : Rebased to r378132. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -61 lines) Patch
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 2 chunks +7 lines, -13 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.h View 3 chunks +11 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.cc View 1 2 6 chunks +47 lines, -19 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 12 chunks +11 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 5 chunks +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 3 3 chunks +30 lines, -2 lines 0 comments Download
A content/browser/renderer_host/render_widget_host_view_base_observer.h View 1 chunk +32 lines, -0 lines 0 comments Download
A content/browser/renderer_host/render_widget_host_view_base_observer.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 3 chunks +7 lines, -16 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (23 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/1
4 years, 10 months ago (2016-02-18 20:42:36 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/118155)
4 years, 10 months ago (2016-02-18 22:39:29 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/20001
4 years, 10 months ago (2016-02-19 14:30:38 UTC) #7
wjmaclean
kenrb@ - could you please give this an initial lookover?
4 years, 10 months ago (2016-02-19 16:57:58 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-19 17:45:29 UTC) #12
kenrb
A few minor comments. In general I think this is more robust than the original ...
4 years, 10 months ago (2016-02-22 17:05:10 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/60001
4 years, 10 months ago (2016-02-22 21:04:47 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-22 22:37:42 UTC) #18
wjmaclean
nick - could you take a look at this for OWNERS approval? https://codereview.chromium.org/1711103002/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc File content/browser/frame_host/render_widget_host_view_child_frame.cc ...
4 years, 10 months ago (2016-02-23 13:13:26 UTC) #22
wjmaclean
jochen@ - can you take a look? My usual reviewers for this sort of stuff ...
4 years, 10 months ago (2016-02-24 18:19:31 UTC) #24
jochen (gone - plz use gerrit)
Avi is a better reviewer for this
4 years, 10 months ago (2016-02-25 11:52:45 UTC) #26
Avi (use Gerrit)
On 2016/02/25 11:52:45, jochen wrote: > Avi is a better reviewer for this I'm OK ...
4 years, 10 months ago (2016-02-25 22:03:15 UTC) #27
kenrb
On 2016/02/25 22:03:15, Avi wrote: > On 2016/02/25 11:52:45, jochen wrote: > > Avi is ...
4 years, 10 months ago (2016-02-26 14:11:52 UTC) #28
Avi (use Gerrit)
On 2016/02/26 14:11:52, kenrb wrote: > On 2016/02/25 22:03:15, Avi wrote: > > On 2016/02/25 ...
4 years, 10 months ago (2016-02-26 15:48:58 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/60001
4 years, 10 months ago (2016-02-27 00:44:22 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_site_isolation on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_site_isolation/builds/1120)
4 years, 10 months ago (2016-02-27 01:12:17 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/60001
4 years, 9 months ago (2016-02-27 12:17:40 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/151176)
4 years, 9 months ago (2016-02-27 12:23:59 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711103002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711103002/80001
4 years, 9 months ago (2016-02-27 18:55:48 UTC) #40
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 9 months ago (2016-02-27 23:26:51 UTC) #42
commit-bot: I haz the power
4 years, 9 months ago (2016-02-27 23:28:26 UTC) #44
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/3912c64fb9b8e5ad166060a91ccb752914016029
Cr-Commit-Position: refs/heads/master@{#378133}

Powered by Google App Engine
This is Rietveld 408576698