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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 256233002: Ensure that modal dialogs from subframes can be cleaned up correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory leak. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 WasResized(); 1170 WasResized();
1171 delegate_->RenderViewReady(this); 1171 delegate_->RenderViewReady(this);
1172 } 1172 }
1173 1173
1174 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { 1174 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) {
1175 // Keep the termination status so we can get at it later when we 1175 // Keep the termination status so we can get at it later when we
1176 // need to know why it died. 1176 // need to know why it died.
1177 render_view_termination_status_ = 1177 render_view_termination_status_ =
1178 static_cast<base::TerminationStatus>(status); 1178 static_cast<base::TerminationStatus>(status);
1179 1179
1180 // Reset frame tree state associated with this process. 1180 // Reset frame tree state associated with this process. This must happen
1181 // before RenderViewTerminated because observers expect the subframes of any
1182 // affected frames to be cleared first.
1181 delegate_->GetFrameTree()->RenderProcessGone(this); 1183 delegate_->GetFrameTree()->RenderProcessGone(this);
1182 1184
1183 // Our base class RenderWidgetHost needs to reset some stuff. 1185 // Our base class RenderWidgetHost needs to reset some stuff.
1184 RendererExited(render_view_termination_status_, exit_code); 1186 RendererExited(render_view_termination_status_, exit_code);
1185 1187
1186 delegate_->RenderViewTerminated(this, 1188 delegate_->RenderViewTerminated(this,
1187 static_cast<base::TerminationStatus>(status), 1189 static_cast<base::TerminationStatus>(status),
1188 exit_code); 1190 exit_code);
1189 } 1191 }
1190 1192
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 return true; 1763 return true;
1762 } 1764 }
1763 1765
1764 void RenderViewHostImpl::AttachToFrameTree() { 1766 void RenderViewHostImpl::AttachToFrameTree() {
1765 FrameTree* frame_tree = delegate_->GetFrameTree(); 1767 FrameTree* frame_tree = delegate_->GetFrameTree();
1766 1768
1767 frame_tree->ResetForMainFrameSwap(); 1769 frame_tree->ResetForMainFrameSwap();
1768 } 1770 }
1769 1771
1770 } // namespace content 1772 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698