Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
index d76d6e3208fb1cff218d29d6ee93b32c84f43535..ac01670abf4ef84b1aa11ad5f4b9182ca04d1875 100644 |
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
@@ -93,6 +93,7 @@ DocumentLoader::DocumentLoader(LocalFrame* frame, const ResourceRequest& req, co |
, m_navigationType(NavigationTypeOther) |
, m_documentLoadTiming(*this) |
, m_timeOfLastDataReceived(0.0) |
+ , m_shouldProtect(false) |
, m_applicationCacheHost(ApplicationCacheHost::create(this)) |
, m_state(NotStarted) |
, m_inDataReceived(false) |
@@ -242,6 +243,8 @@ void DocumentLoader::mainReceivedError(const ResourceError& error) |
// but not loads initiated by child frames' data sources -- that's the WebFrame's job. |
void DocumentLoader::stopLoading() |
{ |
+ if (m_shouldProtect) |
+ return; |
RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |
@@ -573,6 +576,8 @@ bool DocumentLoader::loadingMultipartContent() const |
void DocumentLoader::detachFromFrame() |
{ |
+ if (m_shouldProtect) |
+ return; |
ASSERT(m_frame); |
RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |