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

Unified Diff: Source/core/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/core/loader/FrameLoader.cpp
===================================================================
--- Source/core/loader/FrameLoader.cpp (revision 148844)
+++ Source/core/loader/FrameLoader.cpp (working copy)
@@ -2443,7 +2443,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::cancelledError(KURL()));
+ if (error.errorCode() != c.errorCode() || error.domain() != c.domain())
darin (slow to review) 2013/04/25 18:15:54 nit: might be good to leave a FIXME comment in her
handleFallbackContent();
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
@@ -2723,7 +2725,7 @@
notifier()->dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse());
if (newRequest.isNull())
- error = cancelledError(request);
+ error = ResourceError::cancelledError(request.url());
else
error = ResourceError();
@@ -2999,13 +3001,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