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

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: Created 5 years, 2 months 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..4c05d9f36100721c772f835142f1c9ac3d5af45c 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -917,6 +917,14 @@ void RenderFrameHostManager::DiscardUnusedFrame(
}
if (render_frame_host) {
+ if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
+ // RenderFrame that has not committed yet isn't linked into the renderer
Charlie Reis 2015/10/29 17:28:58 nit: Let's rephrase this. Is the part about being
nasko 2015/10/29 19:09:45 Done.
+ // process frame tree. This requires an explicit cleanup, so send an IPC
+ // to delete the RenderFrame.
+ render_frame_host->Send(
+ new FrameMsg_DeleteFrame(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/browser/site_per_process_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698