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

Side by Side Diff: Source/core/html/HTMLFrameOwnerElement.cpp

Issue 1041473002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/frame/RemoteFrame.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 node->decrementConnectedSubframeCount(); 142 node->decrementConnectedSubframeCount();
143 } 143 }
144 144
145 void HTMLFrameOwnerElement::disconnectContentFrame() 145 void HTMLFrameOwnerElement::disconnectContentFrame()
146 { 146 {
147 // FIXME: Currently we don't do this in removedFrom because this causes an 147 // FIXME: Currently we don't do this in removedFrom because this causes an
148 // unload event in the subframe which could execute script that could then 148 // unload event in the subframe which could execute script that could then
149 // reach up into this document and then attempt to look back down. We should 149 // reach up into this document and then attempt to look back down. We should
150 // see if this behavior is really needed as Gecko does not allow this. 150 // see if this behavior is really needed as Gecko does not allow this.
151 if (RefPtrWillBeRawPtr<Frame> frame = contentFrame()) { 151 if (RefPtrWillBeRawPtr<Frame> frame = contentFrame()) {
152 frame->detach(); 152 frame->detach(FrameDetachType::Remove);
153 } 153 }
154 #if ENABLE(OILPAN) 154 #if ENABLE(OILPAN)
155 // Oilpan: a plugin container must be explicitly disposed before it 155 // Oilpan: a plugin container must be explicitly disposed before it
156 // is swept and finalized. This is because the underlying plugin needs 156 // is swept and finalized. This is because the underlying plugin needs
157 // to be able to access a fully-functioning frame (and all it refers 157 // to be able to access a fully-functioning frame (and all it refers
158 // to) while it destructs and cleans out its resources. 158 // to) while it destructs and cleans out its resources.
159 if (m_widget) { 159 if (m_widget) {
160 m_widget->dispose(); 160 m_widget->dispose();
161 m_widget = nullptr; 161 m_widget = nullptr;
162 } 162 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 DEFINE_TRACE(HTMLFrameOwnerElement) 263 DEFINE_TRACE(HTMLFrameOwnerElement)
264 { 264 {
265 visitor->trace(m_contentFrame); 265 visitor->trace(m_contentFrame);
266 visitor->trace(m_widget); 266 visitor->trace(m_widget);
267 HTMLElement::trace(visitor); 267 HTMLElement::trace(visitor);
268 FrameOwner::trace(visitor); 268 FrameOwner::trace(visitor);
269 } 269 }
270 270
271 271
272 } // namespace blink 272 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/RemoteFrame.cpp ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698