| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // A lot of the following steps can result in the current frame being | 263 // A lot of the following steps can result in the current frame being |
| 264 // detached, so protect a reference to it. | 264 // detached, so protect a reference to it. |
| 265 RefPtrWillBeRawPtr<LocalFrame> protect(this); | 265 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
| 266 m_loader.stopAllLoaders(); | 266 m_loader.stopAllLoaders(); |
| 267 m_loader.dispatchUnloadEvent(); | 267 m_loader.dispatchUnloadEvent(); |
| 268 detachChildren(); | 268 detachChildren(); |
| 269 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() | 269 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() |
| 270 // will trigger the unload event handlers of any child frames, and those eve
nt | 270 // will trigger the unload event handlers of any child frames, and those eve
nt |
| 271 // handlers might start a new subresource load in this frame. | 271 // handlers might start a new subresource load in this frame. |
| 272 m_loader.stopAllLoaders(); | 272 m_loader.stopAllLoaders(); |
| 273 m_loader.detach(); |
| 273 if (!client()) | 274 if (!client()) |
| 274 return; | 275 return; |
| 275 | 276 |
| 276 m_loader.detach(); | |
| 277 // Notify ScriptController that the frame is closing, since its cleanup ends
up calling | 277 // Notify ScriptController that the frame is closing, since its cleanup ends
up calling |
| 278 // back to FrameLoaderClient via WindowProxy. | 278 // back to FrameLoaderClient via WindowProxy. |
| 279 script().clearForClose(); | 279 script().clearForClose(); |
| 280 ScriptForbiddenScope forbidScript; | 280 ScriptForbiddenScope forbidScript; |
| 281 setView(nullptr); | 281 setView(nullptr); |
| 282 willDetachFrameHost(); | 282 willDetachFrameHost(); |
| 283 InspectorInstrumentation::frameDetachedFromParent(this); | 283 InspectorInstrumentation::frameDetachedFromParent(this); |
| 284 Frame::detach(); | 284 Frame::detach(); |
| 285 // Clear the FrameLoader right here rather than during | 285 // Clear the FrameLoader right here rather than during |
| 286 // finalization. Too late to access various heap objects at that | 286 // finalization. Too late to access various heap objects at that |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 // We detach the FrameView's custom scroll bars as early as | 836 // We detach the FrameView's custom scroll bars as early as |
| 837 // possible to prevent m_doc->detach() from messing with the view | 837 // possible to prevent m_doc->detach() from messing with the view |
| 838 // such that its scroll bars won't be torn down. | 838 // such that its scroll bars won't be torn down. |
| 839 // | 839 // |
| 840 // FIXME: We should revisit this. | 840 // FIXME: We should revisit this. |
| 841 if (m_view) | 841 if (m_view) |
| 842 m_view->prepareForDetach(); | 842 m_view->prepareForDetach(); |
| 843 } | 843 } |
| 844 | 844 |
| 845 } // namespace blink | 845 } // namespace blink |
| OLD | NEW |