diff --git a/dom/locales/en-US/chrome/security/security.properties b/dom/locales/en-US/chrome/security/security.properties index 2a2b4d8def56..46a68c116c4c 100644 --- a/dom/locales/en-US/chrome/security/security.properties +++ b/dom/locales/en-US/chrome/security/security.properties @@ -6,7 +6,6 @@ BlockMixedActiveContent = Blocked loading mixed active content "%1$S" # CORS # LOCALIZATION NOTE: Do not translate "Access-Control-Allow-Origin", Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers CORSDisabled=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS disabled). -CORSRequestFailed=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request failed). CORSRequestNotHttp=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request not http). CORSMissingAllowOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' missing). CORSAllowOriginNotMatchingOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' does not match '%2$S'). diff --git a/dom/security/nsCORSListenerProxy.cpp b/dom/security/nsCORSListenerProxy.cpp index 5e167cc9c621..613f283bd4c5 100644 --- a/dom/security/nsCORSListenerProxy.cpp +++ b/dom/security/nsCORSListenerProxy.cpp @@ -538,14 +538,8 @@ nsCORSListenerProxy::CheckRequestApproved(nsIRequest* aRequest) // Check if the request failed nsresult status; nsresult rv = aRequest->GetStatus(&status); - if (NS_FAILED(rv)) { - LogBlockedRequest(aRequest, "CORSRequestFailed", nullptr); - return rv; - } - if (NS_FAILED(status)) { - LogBlockedRequest(aRequest, "CORSRequestFailed", nullptr); - return status; - } + NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(status, status); // Test that things worked on a HTTP level nsCOMPtr http = do_QueryInterface(aRequest);