| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 void LocalFrame::detach(FrameDetachType type) | 275 void LocalFrame::detach(FrameDetachType type) |
| 276 { | 276 { |
| 277 PluginScriptForbiddenScope forbidPluginDestructorScripting; | 277 PluginScriptForbiddenScope forbidPluginDestructorScripting; |
| 278 // A lot of the following steps can result in the current frame being | 278 // A lot of the following steps can result in the current frame being |
| 279 // detached, so protect a reference to it. | 279 // detached, so protect a reference to it. |
| 280 RefPtrWillBeRawPtr<LocalFrame> protect(this); | 280 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
| 281 m_loader.stopAllLoaders(); | 281 m_loader.stopAllLoaders(); |
| 282 m_loader.dispatchUnloadEvent(); | 282 m_loader.dispatchUnloadEvent(); |
| 283 detachChildren(); | 283 detachChildren(); |
| 284 |
| 285 // All done if detaching the subframes brought about a detach of this frame
also. |
| 286 if (!client()) |
| 287 return; |
| 288 |
| 284 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() | 289 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() |
| 285 // will trigger the unload event handlers of any child frames, and those eve
nt | 290 // will trigger the unload event handlers of any child frames, and those eve
nt |
| 286 // handlers might start a new subresource load in this frame. | 291 // handlers might start a new subresource load in this frame. |
| 287 m_loader.stopAllLoaders(); | 292 m_loader.stopAllLoaders(); |
| 288 m_loader.detach(); | 293 m_loader.detach(); |
| 289 document()->detach(); | 294 document()->detach(); |
| 290 m_loader.clear(); | 295 m_loader.clear(); |
| 291 if (!client()) | 296 if (!client()) |
| 292 return; | 297 return; |
| 293 | 298 |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 { | 852 { |
| 848 if (isLocalRoot()) | 853 if (isLocalRoot()) |
| 849 m_instrumentingAgents = InstrumentingAgents::create(); | 854 m_instrumentingAgents = InstrumentingAgents::create(); |
| 850 else | 855 else |
| 851 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 856 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 852 } | 857 } |
| 853 | 858 |
| 854 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 859 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
| 855 | 860 |
| 856 } // namespace blink | 861 } // namespace blink |
| OLD | NEW |