Index: Source/WebCore/loader/DocumentLoader.cpp |
=================================================================== |
--- Source/WebCore/loader/DocumentLoader.cpp (revision 139358) |
+++ Source/WebCore/loader/DocumentLoader.cpp (working copy) |
@@ -208,6 +208,9 @@ |
// but not loads initiated by child frames' data sources -- that's the WebFrame's job. |
void DocumentLoader::stopLoading() |
{ |
+ RefPtr<Frame> protectFrame(m_frame); |
+ RefPtr<DocumentLoader> protectLoader(this); |
+ |
// In some rare cases, calling FrameLoader::stopLoading could cause isLoading() to return false. |
// (This can happen when there's a single XMLHttpRequest currently loading and stopLoading causes it |
// to stop loading. Because of this, we need to save it so we don't return early. |
@@ -244,9 +247,6 @@ |
// See <rdar://problem/9673866> for more details. |
if (m_isStopping) |
return; |
- |
- RefPtr<Frame> protectFrame(m_frame); |
- RefPtr<DocumentLoader> protectLoader(this); |
m_isStopping = true; |