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

Issue 1457203002: Make WebContentsImpl aware of all of its RWHs. (Closed)

Created:
5 years, 1 month ago by lazyboy
Modified:
5 years, 1 month ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, dcheng, site-isolation-reviews_chromium.org, nasko, ncarter (slow), Avi (use Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebContentsImpl aware of all of its RWHs. It used to be that WebContentsImpl only knew about the RWHs created through WebContentsImpl::CreateNewWidget() and stored them in WCI::created_widgets_. However, widgets created through FrameTree::CreateRenderViewHost() used to be left out. This made RenderWidgetHostImpl::WasResized() to incorrectly send ViewMsg_Resize while the WebContents was being torn down. WasResized() has a check for !delegate_ but |delegate_| never became nullptr during WebContentsImpl shutdown. Adding all widgets to WCI::created_widgets_ will ensure that we notify RWHs about the delegate's (WC) destruction via DetachDelegate and do not send ViewMsg_Resize while a the delegate (WC) is shutting down. BUG=523644, 523451 Test=See https://code.google.com/p/chromium/issues/detail?id=523644#c16 for repro steps. Ensure the renderer does not crash. Committed: https://crrev.com/63f5b3105ceaaf470c2c8f1e52f8dc77a591b0f2 Cr-Commit-Position: refs/heads/master@{#361169}

Patch Set 1 #

Patch Set 2 : fix RW destruction by Shutdown #

Total comments: 19

Patch Set 3 : unify two deletion paths + address comments #

Patch Set 4 : revert unnecessary changes #

Total comments: 2

Patch Set 5 : add caution in RenderWidgetDeleted() #

Patch Set 6 : sync @tott #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -9 lines) Patch
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 2 chunks +11 lines, -9 lines 0 comments Download

Messages

Total messages: 24 (11 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/1457203002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1457203002/20001
5 years, 1 month ago (2015-11-19 07:12:00 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-19 10:34:56 UTC) #7
lazyboy
/cc dcheng@ who is also aware of this issue.
5 years, 1 month ago (2015-11-19 17:46:23 UTC) #10
Charlie Reis
Thanks for tracking this down! One question below about the need for a second erase ...
5 years, 1 month ago (2015-11-20 18:41:41 UTC) #11
Avi (use Gerrit)
https://codereview.chromium.org/1457203002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h File content/browser/renderer_host/render_widget_host_delegate.h (right): https://codereview.chromium.org/1457203002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h#newcode43 content/browser/renderer_host/render_widget_host_delegate.h:43: virtual void RenderWidgetCreated(RenderWidgetHostImpl* render_widget_host) {} On 2015/11/20 18:41:41, Charlie ...
5 years, 1 month ago (2015-11-20 19:06:31 UTC) #13
lazyboy
https://codereview.chromium.org/1457203002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h File content/browser/renderer_host/render_widget_host_delegate.h (right): https://codereview.chromium.org/1457203002/diff/20001/content/browser/renderer_host/render_widget_host_delegate.h#newcode43 content/browser/renderer_host/render_widget_host_delegate.h:43: virtual void RenderWidgetCreated(RenderWidgetHostImpl* render_widget_host) {} On 2015/11/20 19:06:30, Avi ...
5 years, 1 month ago (2015-11-20 23:52:05 UTC) #14
Avi (use Gerrit)
My comments were all nitpicky; I'll yield the floor to Charlie.
5 years, 1 month ago (2015-11-21 01:09:35 UTC) #16
Charlie Reis
Thanks. I think this is ready, but I'm curious for your answers to the questions ...
5 years, 1 month ago (2015-11-21 01:19:19 UTC) #17
lazyboy
https://codereview.chromium.org/1457203002/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/1457203002/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode431 content/browser/web_contents/web_contents_impl.cc:431: (*iter)->DetachDelegate(); On 2015/11/21 01:19:19, Charlie Reis wrote: > On ...
5 years, 1 month ago (2015-11-21 02:22:59 UTC) #18
Charlie Reis
Thanks, LGTM.
5 years, 1 month ago (2015-11-21 06:20:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1457203002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1457203002/100001
5 years, 1 month ago (2015-11-23 19:17:00 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-11-23 20:19:59 UTC) #23
commit-bot: I haz the power
5 years, 1 month ago (2015-11-23 20:21:46 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/63f5b3105ceaaf470c2c8f1e52f8dc77a591b0f2
Cr-Commit-Position: refs/heads/master@{#361169}

Powered by Google App Engine
This is Rietveld 408576698