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

Issue 18512004: Cleanup swapped out RenderViewHosts when the process goes away. (Closed)

Created:
7 years, 5 months ago by Fady Samuel
Modified:
7 years, 5 months ago
Reviewers:
Charlie Reis, nasko
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cleanup swapped out RenderViewHosts when the process goes away. Currently swapped out RVHs are not cleaned up for a given WebContents if the renderer hosting the associated RVs crashes. During webview postMessage, when sending a message from the embedder to the guest after recovering from a crash, we use the routing ID of the existing swapped out RVH which does not have a corresponding RV in the new renderer process. This produces a null e.source contentWindow and so the new guest has no way to communicate back to the embedder. BUG=258993 Test=RenderViewHostManagerTest.CleanUpSwappedOutRVHOnProcessCrash Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210919

Patch Set 1 #

Patch Set 2 : Added test and added Nasko's suggestion #

Patch Set 3 : Fixed whitespace #

Total comments: 8

Patch Set 4 : Updated #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -1 line) Patch
M content/browser/web_contents/render_view_host_manager.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/web_contents/render_view_host_manager_unittest.cc View 1 2 3 2 chunks +39 lines, -0 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
Fady Samuel
7 years, 5 months ago (2013-07-10 17:19:08 UTC) #1
Charlie Reis
Please wait for Nasko's review as well, but drive-by LGTM with nits. :) https://codereview.chromium.org/18512004/diff/5001/content/browser/web_contents/render_view_host_manager_unittest.cc File ...
7 years, 5 months ago (2013-07-10 17:23:30 UTC) #2
nasko
LGTM with a couple of nits. https://codereview.chromium.org/18512004/diff/5001/content/browser/web_contents/render_view_host_manager.cc File content/browser/web_contents/render_view_host_manager.cc (right): https://codereview.chromium.org/18512004/diff/5001/content/browser/web_contents/render_view_host_manager.cc#newcode90 content/browser/web_contents/render_view_host_manager.cc:90: // Keep track ...
7 years, 5 months ago (2013-07-10 17:29:00 UTC) #3
Fady Samuel
Nits addressed. CQ'ing. https://codereview.chromium.org/18512004/diff/5001/content/browser/web_contents/render_view_host_manager.cc File content/browser/web_contents/render_view_host_manager.cc (right): https://codereview.chromium.org/18512004/diff/5001/content/browser/web_contents/render_view_host_manager.cc#newcode90 content/browser/web_contents/render_view_host_manager.cc:90: // Keep track of renderer processes ...
7 years, 5 months ago (2013-07-10 17:51:33 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/18512004/11001
7 years, 5 months ago (2013-07-10 17:51:58 UTC) #5
commit-bot: I haz the power
Change committed as 210919
7 years, 5 months ago (2013-07-10 20:22:41 UTC) #6
Charlie Reis
https://chromiumcodereview.appspot.com/18512004/diff/11001/content/browser/web_contents/render_view_host_manager_unittest.cc File content/browser/web_contents/render_view_host_manager_unittest.cc (right): https://chromiumcodereview.appspot.com/18512004/diff/11001/content/browser/web_contents/render_view_host_manager_unittest.cc#newcode962 content/browser/web_contents/render_view_host_manager_unittest.cc:962: opener1->CreateSwappedOutRenderView(rvh1->GetSiteInstance()); Wait, this is the same SiteInstance as opener1's ...
7 years, 5 months ago (2013-07-10 21:10:38 UTC) #7
Fady Samuel
7 years, 5 months ago (2013-07-10 21:27:33 UTC) #8
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/18512004/diff/11001/content/browser/we...
File content/browser/web_contents/render_view_host_manager_unittest.cc (right):

https://chromiumcodereview.appspot.com/18512004/diff/11001/content/browser/we...
content/browser/web_contents/render_view_host_manager_unittest.cc:962:
opener1->CreateSwappedOutRenderView(rvh1->GetSiteInstance());
On 2013/07/10 21:10:39, creis wrote:
> Wait, this is the same SiteInstance as opener1's current RVH.  That should be
> illegal-- we should never have a swapped out RVH in the same SiteInstance as
> that tab's current RVH.  That would break if we try to swap out the current
one,
> since they're keyed by SiteInstance ID.
> 
> I'll put together a separate CL to fix it.
> 

Heh, a bit of copy-pasta, I didn't notice. Thanks for catching this.

Powered by Google App Engine
This is Rietveld 408576698