Index: Source/core/frame/LocalFrame.cpp |
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp |
index 837b38ac87116e94034b5d2e352d1f74c51ad0f4..35975f313b488a5891afda26cba9c194895d7d12 100644 |
--- a/Source/core/frame/LocalFrame.cpp |
+++ b/Source/core/frame/LocalFrame.cpp |
@@ -281,6 +281,11 @@ void LocalFrame::detach(FrameDetachType type) |
m_loader.stopAllLoaders(); |
m_loader.dispatchUnloadEvent(); |
detachChildren(); |
+ |
+ // All done if detaching the subframes brought about a detach of this frame also. |
+ if (!client()) |
+ return; |
+ |
// stopAllLoaders() needs to be called after detachChildren(), because detachChildren() |
// will trigger the unload event handlers of any child frames, and those event |
// handlers might start a new subresource load in this frame. |