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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1409693009: Fix leaking of RenderFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on another review round. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 11333116a64699f84dda0e004d8733a57365dbca..cf7813614787558c962d04c409c3732ad9d158e3 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -917,6 +917,12 @@ void RenderFrameHostManager::DiscardUnusedFrame(
}
if (render_frame_host) {
+ if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
+ // Clean up the unused RenderFrame in the renderer process.
+ render_frame_host->Send(
+ new FrameMsg_Detach(render_frame_host->GetRoutingID()));
+ }
+
// We won't be coming back, so delete this one.
ShutdownProxiesIfLastActiveFrameInSiteInstance(render_frame_host.get());
render_frame_host.reset();
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698