OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 if (!client()) | 262 if (!client()) |
263 return; | 263 return; |
264 m_loader.detach(); | 264 m_loader.detach(); |
265 setView(nullptr); | 265 setView(nullptr); |
266 willDetachFrameHost(); | 266 willDetachFrameHost(); |
267 // Notify ScriptController that the frame is closing, since its cleanup ends up calling | 267 // Notify ScriptController that the frame is closing, since its cleanup ends up calling |
268 // back to FrameLoaderClient via WindowProxy. | 268 // back to FrameLoaderClient via WindowProxy. |
269 script().clearForClose(); | 269 script().clearForClose(); |
270 InspectorInstrumentation::frameDetachedFromParent(this); | 270 InspectorInstrumentation::frameDetachedFromParent(this); |
271 Frame::detach(); | 271 Frame::detach(); |
272 #if ENABLE(OILPAN) | |
273 // Clear the FrameLoader right here rather than during | |
274 // finalization. Too late to access various heap objects at that | |
275 // stage. | |
276 loader().clear(); | |
277 #endif | |
272 } | 278 } |
273 | 279 |
274 void LocalFrame::disconnectOwnerElement() | 280 void LocalFrame::disconnectOwnerElement() |
275 { | 281 { |
276 if (owner()) { | 282 if (owner()) { |
277 if (Document* document = this->document()) | 283 if (Document* document = this->document()) |
278 document->topDocument().clearAXObjectCache(); | 284 document->topDocument().clearAXObjectCache(); |
279 #if ENABLE(OILPAN) | 285 #if ENABLE(OILPAN) |
280 // First give the plugin elements holding persisted, | 286 // First give the plugin elements holding persisted, |
281 // renderer-less plugins the opportunity to dispose of them. | 287 // renderer-less plugins the opportunity to dispose of them. |
282 for (const auto& pluginElement : m_pluginElements) | 288 for (const auto& pluginElement : m_pluginElements) |
283 pluginElement->disconnectContentFrame(); | 289 pluginElement->disconnectContentFrame(); |
284 m_pluginElements.clear(); | 290 m_pluginElements.clear(); |
285 | |
286 // Clear the FrameView and FrameLoader right here rather than | |
287 // during finalization. Too late to access various heap objects | |
288 // at that stage. | |
289 setView(nullptr); | |
dcheng
2014/10/24 20:03:51
One quick question--is this getting handled elsewh
sof
2014/10/24 20:05:41
Yes, 5 lines up in LocalFrame::detach().
| |
290 loader().clear(); | |
291 #endif | 291 #endif |
292 } | 292 } |
293 Frame::disconnectOwnerElement(); | 293 Frame::disconnectOwnerElement(); |
294 } | 294 } |
295 | 295 |
296 void LocalFrame::addDestructionObserver(FrameDestructionObserver* observer) | 296 void LocalFrame::addDestructionObserver(FrameDestructionObserver* observer) |
297 { | 297 { |
298 m_destructionObservers.add(observer); | 298 m_destructionObservers.add(observer); |
299 } | 299 } |
300 | 300 |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
784 // We detach the FrameView's custom scroll bars as early as | 784 // We detach the FrameView's custom scroll bars as early as |
785 // possible to prevent m_doc->detach() from messing with the view | 785 // possible to prevent m_doc->detach() from messing with the view |
786 // such that its scroll bars won't be torn down. | 786 // such that its scroll bars won't be torn down. |
787 // | 787 // |
788 // FIXME: We should revisit this. | 788 // FIXME: We should revisit this. |
789 if (m_view) | 789 if (m_view) |
790 m_view->prepareForDetach(); | 790 m_view->prepareForDetach(); |
791 } | 791 } |
792 | 792 |
793 } // namespace blink | 793 } // namespace blink |
OLD | NEW |