diff options
author | nasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-10 00:05:11 +0000 |
---|---|---|
committer | nasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-10 00:05:11 +0000 |
commit | 5f96f5a6dd9c29e7bab04d3d0a2b2461998a62f7 (patch) | |
tree | 45192b83471cd41aebbe4c846a37bdab9613e7c5 /content/renderer/render_view_impl.cc | |
parent | d4f8cd3b6b75ae4292b6eb028c51fd6082af2ee4 (diff) | |
download | chromium_src-5f96f5a6dd9c29e7bab04d3d0a2b2461998a62f7.zip chromium_src-5f96f5a6dd9c29e7bab04d3d0a2b2461998a62f7.tar.gz chromium_src-5f96f5a6dd9c29e7bab04d3d0a2b2461998a62f7.tar.bz2 |
Always create FrameTreeNodes and RenderFrameHosts for every frame.
Patch Set 1 and 2 are import of the original CL: https://codereview.chromium.org/82033002/
BUG=245126
Review URL: https://codereview.chromium.org/117603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r-- | content/renderer/render_view_impl.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 0faf360..a10ae54 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -949,7 +949,7 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) { main_render_frame_.reset( RenderFrameImpl::Create(this, params->main_frame_routing_id)); // The main frame WebFrame object is closed by - // RenderViewImpl::frameDetached(). + // RenderFrameImpl::frameDetached(). webview()->setMainFrame(WebFrame::create(main_render_frame_.get())); main_render_frame_->MainWebFrameCreated(webview()->mainFrame()); main_render_frame_->SetWebFrame(webview()->mainFrame()); @@ -3081,6 +3081,10 @@ void RenderViewImpl::didDisownOpener(blink::WebFrame* frame) { } void RenderViewImpl::frameDetached(WebFrame* frame) { + // NOTE: We may get here for either the main frame or for subframes. The + // RenderFrameImpl will be deleted immediately after this call for subframes + // but not for the main frame, which is owned by |main_render_frame_|. + FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameDetached(frame)); } |