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

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 148494)
+++ Source/WebCore/loader/FrameLoader.cpp (working copy)
@@ -42,6 +42,7 @@
#include "MemoryCache.h"
#include "CachedPage.h"
#include "CachedResourceLoader.h"
+#include "CancelledResourceError.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Console.h"
@@ -2504,7 +2505,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 = CancelledResourceError(KURL());
darin (slow to review) 2013/04/17 18:58:11 nit: CancelledResourceError c(KURL()); Although,
Nate Chapin 2013/04/17 20:45:05 I tried the switch to isCancellation(), and a coup
+ if (error.errorCode() != c.errorCode() || error.domain() != c.domain())
handleFallbackContent();
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
@@ -2770,7 +2773,7 @@
notifier()->dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse());
if (newRequest.isNull())
- error = cancelledError(request);
+ error = CancelledResourceError(request.url());
darin (slow to review) 2013/04/17 18:58:11 Hmm, this relies on the fact that CancelledResourc
else
error = ResourceError();
@@ -3046,13 +3049,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