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

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

Issue 1517993004: Oilpan: simplify plugin container finalization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify away disconnectContentFrame override Created 5 years 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 void HTMLFrameOwnerElement::disconnectContentFrame() 175 void HTMLFrameOwnerElement::disconnectContentFrame()
176 { 176 {
177 // FIXME: Currently we don't do this in removedFrom because this causes an 177 // FIXME: Currently we don't do this in removedFrom because this causes an
178 // unload event in the subframe which could execute script that could then 178 // unload event in the subframe which could execute script that could then
179 // reach up into this document and then attempt to look back down. We should 179 // reach up into this document and then attempt to look back down. We should
180 // see if this behavior is really needed as Gecko does not allow this. 180 // see if this behavior is really needed as Gecko does not allow this.
181 if (RefPtrWillBeRawPtr<Frame> frame = contentFrame()) { 181 if (RefPtrWillBeRawPtr<Frame> frame = contentFrame()) {
182 frame->detach(FrameDetachType::Remove); 182 frame->detach(FrameDetachType::Remove);
183 } 183 }
184 #if ENABLE(OILPAN)
185 // Oilpan: a plugin container must be explicitly disposed before it
186 // is swept and finalized. This is because the underlying plugin needs
187 // to be able to access a fully-functioning frame (and all it refers
188 // to) while it destructs and cleans out its resources.
189 if (m_widget) {
190 m_widget->dispose();
191 m_widget = nullptr;
192 }
193 #endif
194 } 184 }
195 185
196 HTMLFrameOwnerElement::~HTMLFrameOwnerElement() 186 HTMLFrameOwnerElement::~HTMLFrameOwnerElement()
197 { 187 {
198 // An owner must by now have been informed of detachment 188 // An owner must by now have been informed of detachment
199 // when the frame was closed. 189 // when the frame was closed.
200 ASSERT(!m_contentFrame); 190 ASSERT(!m_contentFrame);
201 } 191 }
202 192
203 Document* HTMLFrameOwnerElement::contentDocument() const 193 Document* HTMLFrameOwnerElement::contentDocument() const
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 DEFINE_TRACE(HTMLFrameOwnerElement) 308 DEFINE_TRACE(HTMLFrameOwnerElement)
319 { 309 {
320 visitor->trace(m_contentFrame); 310 visitor->trace(m_contentFrame);
321 visitor->trace(m_widget); 311 visitor->trace(m_widget);
322 HTMLElement::trace(visitor); 312 HTMLElement::trace(visitor);
323 FrameOwner::trace(visitor); 313 FrameOwner::trace(visitor);
324 } 314 }
325 315
326 316
327 } // namespace blink 317 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698