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

Unified Diff: third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/FetchUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp
diff --git a/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp b/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp
index 49b16403813c70ecd395e4cd0f9e708df6755c4d..5385c8d885640dbbad7760972069eb3450f7cb09 100644
--- a/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp
+++ b/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp
@@ -281,9 +281,10 @@ bool passesPreflightStatusCheck(const ResourceResponse& response,
// Fetch API Spec: https://fetch.spec.whatwg.org/#cors-preflight-fetch
// CORS Spec: http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0
// https://crbug.com/452394
- if (response.httpStatusCode() < 200 || response.httpStatusCode() >= 300) {
+ int statusCode = response.httpStatusCode();
+ if (!FetchUtils::isOkStatus(statusCode)) {
errorDescription = "Response for preflight has invalid HTTP status code " +
- String::number(response.httpStatusCode());
+ String::number(statusCode);
return false;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/FetchUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698