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

Issue 538883002: Speculative fix for DelegatedFrameHost destructor crashes (Closed)

Created:
6 years, 3 months ago by ccameron
Modified:
6 years, 3 months ago
Reviewers:
piman
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Speculative fix for DelegatedFrameHost destructor crashes It appears that RenderWidgetHostViewMac::Destroy is never getting called in some instances, and that is resulting in crashes when we end up in its destructor, which is called by Objective C's runtime. I suspect that this is a leak somewhere, and that on other platforms we simply never call the destructor. Call the necessary bits of RenderWidgetHostViewMac::Destroy to avoid crash when a RenderWidgetHostImpl reaches its destructor before its view_ has been reset. Also, turn the weak pointers to RenderWidgetHostViewBase in RenderWidgetHostImpl and RenderWidgetHostViewGuest to use base::WeakPtr to prevent the many dangling instances. BUG=404828 Committed: https://crrev.com/c54cc7cb4a7910f83b6501f8122b06ba5c8b3a45 Cr-Commit-Position: refs/heads/master@{#293573}

Patch Set 1 #

Patch Set 2 : git cl try #

Patch Set 3 : Add weak pointers #

Patch Set 4 : Smaller version #

Patch Set 5 : For real this time #

Patch Set 6 : Absolutely minimal fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -2 lines) Patch
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 3 chunks +8 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 chunks +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
ccameron
This is the smallest (potential) fix I could think of. This needs to get merged ...
6 years, 3 months ago (2014-09-04 04:45:59 UTC) #2
piman
LGTM, seems reasonable, provided something will not try to reach into the RWHVMac and expect ...
6 years, 3 months ago (2014-09-04 04:52:15 UTC) #3
ccameron
On 2014/09/04 04:52:15, piman (OOO) wrote: > LGTM, seems reasonable, provided something will not try ...
6 years, 3 months ago (2014-09-04 07:07:42 UTC) #4
ccameron
On 2014/09/04 07:07:42, ccameron1 wrote: > On 2014/09/04 04:52:15, piman (OOO) wrote: > > LGTM, ...
6 years, 3 months ago (2014-09-04 21:09:15 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/538883002/40001
6 years, 3 months ago (2014-09-04 21:10:21 UTC) #7
piman
lgtm
6 years, 3 months ago (2014-09-04 23:56:02 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/5495)
6 years, 3 months ago (2014-09-05 03:10:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/538883002/40001
6 years, 3 months ago (2014-09-05 04:39:56 UTC) #12
ccameron
On 2014/09/05 04:39:56, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 3 months ago (2014-09-05 04:47:19 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/5561)
6 years, 3 months ago (2014-09-05 06:35:50 UTC) #15
ccameron
On 2014/09/05 06:35:50, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-05 17:23:14 UTC) #16
piman
On 2014/09/05 17:23:14, ccameron1 wrote: > On 2014/09/05 06:35:50, I haz the power (commit-bot) wrote: ...
6 years, 3 months ago (2014-09-05 17:45:59 UTC) #17
piman
(LGTM either way) On Fri, Sep 5, 2014 at 10:45 AM, <piman@chromium.org> wrote: > On ...
6 years, 3 months ago (2014-09-05 17:46:55 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/538883002/100001
6 years, 3 months ago (2014-09-05 19:38:38 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 0fb966bd89bc617839113cd7943280a00c8aeb6f
6 years, 3 months ago (2014-09-05 20:14:04 UTC) #21
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:41:20 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c54cc7cb4a7910f83b6501f8122b06ba5c8b3a45
Cr-Commit-Position: refs/heads/master@{#293573}

Powered by Google App Engine
This is Rietveld 408576698