Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: Source/WebCore/loader/FrameLoader.cpp

Issue 14264012: Create errors (especially cancellation errors) internally to WebCore, rather (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/loader/FrameLoader.cpp
===================================================================
--- Source/WebCore/loader/FrameLoader.cpp (revision 148396)
+++ Source/WebCore/loader/FrameLoader.cpp (working copy)
@@ -2508,7 +2508,9 @@
// 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();
- if (m_client->shouldFallBack(error))
+
+ ResourceError c = ResourceError::createCancelledError(KURL());
+ if (error.errorCode() != c.errorCode() || error.domain() != c.domain())
handleFallbackContent();
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
@@ -2774,7 +2776,7 @@
notifier()->dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse());
if (newRequest.isNull())
- error = cancelledError(request);
+ error = ResourceError::createCancelledError(request.url());
else
error = ResourceError();
@@ -3050,13 +3052,6 @@
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);

Powered by Google App Engine
This is Rietveld 408576698