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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2610653002: Tidy up XMLHttpRequest::endLoading(). (Closed)
Patch Set: alpha conversion + use it at two more call sites Created 3 years, 11 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: 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 7328e4995ea61c863ae934427b1c18dea2be2ccf..b639762cd1606d1e4e35740e05b60e3925bf2b5e 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -35,6 +35,7 @@
#include "core/events/Event.h"
#include "core/fetch/FetchInitiatorTypeNames.h"
#include "core/fetch/FetchRequest.h"
+#include "core/fetch/FetchUtils.h"
#include "core/fetch/MemoryCache.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/frame/Deprecation.h"
@@ -504,11 +505,9 @@ void DocumentLoader::responseReceived(
return;
}
- if (m_response.isHTTP()) {
- int status = m_response.httpStatusCode();
- if ((status < 200 || status >= 300) && m_frame->owner())
- m_frame->owner()->renderFallbackContent();
- }
+ if (m_frame->owner() && m_response.isHTTP() &&
+ !FetchUtils::isOkStatus(m_response.httpStatusCode()))
+ m_frame->owner()->renderFallbackContent();
}
void DocumentLoader::ensureWriter(const AtomicString& mimeType,
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchUtils.h ('k') | third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698