Index: Source/core/loader/FrameLoader.cpp |
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp |
index e895269c1ecafdb193624ff5faff100520f6eee5..2b7adbb2f4b57480aded9a3c3ee37d5b80a4cd26 100644 |
--- a/Source/core/loader/FrameLoader.cpp |
+++ b/Source/core/loader/FrameLoader.cpp |
@@ -2323,11 +2323,7 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error) |
// FIXME: Don't want to do this if an entirely new load is going, so should check |
// that both data sources on the frame are either this or nil. |
stop(); |
- |
- // FIXME: We really ought to be able to just check for isCancellation() here, but there are some |
- // ResourceErrors that setIsCancellation() but aren't created by ResourceError::cancelledError(). |
- ResourceError c(ResourceError::cancelledError(KURL())); |
- if (error.errorCode() != c.errorCode() || error.domain() != c.domain()) |
+ if (m_client->shouldFallBack(error)) |
handleFallbackContent(); |
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) { |
@@ -2596,7 +2592,7 @@ void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& i |
notifier()->dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse()); |
if (newRequest.isNull()) |
- error = ResourceError::cancelledError(request.url()); |
+ error = cancelledError(request); |
else |
error = ResourceError(); |
@@ -2849,6 +2845,13 @@ void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType) |
loadDifferentDocumentItem(item, loadType, MayAttemptCacheOnlyLoadForFormSubmissionItem); |
} |
+ResourceError FrameLoader::cancelledError(const ResourceRequest& request) const |
+{ |
+ ResourceError error = m_client->cancelledError(request); |
+ error.setIsCancellation(true); |
+ return error; |
+} |
+ |
void FrameLoader::setTitle(const StringWithDirection& title) |
{ |
documentLoader()->setTitle(title); |