OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
445 // when the ServiceWorker does not call respondWith().) | 445 // when the ServiceWorker does not call respondWith().) |
446 ASSERT(m_fallbackRequestForServiceWorker); | 446 ASSERT(m_fallbackRequestForServiceWorker); |
447 loadFallbackRequestForServiceWorker(); | 447 loadFallbackRequestForServiceWorker(); |
448 return; | 448 return; |
449 } | 449 } |
450 m_fallbackRequestForServiceWorker = nullptr; | 450 m_fallbackRequestForServiceWorker = nullptr; |
451 m_client->didReceiveResponse(identifier, response, handle); | 451 m_client->didReceiveResponse(identifier, response, handle); |
452 return; | 452 return; |
453 } | 453 } |
454 | 454 |
455 ASSERT(!m_fallbackRequestForServiceWorker); | 455 // |m_fallbackRequestForServiceWorker| may be set only wheh the request is |
tyoshino (SeeGerritForStatus)
2015/07/22 11:25:45
wheh -> when
| |
456 // same origin, because we skip the Service Worker CORS fallback for same | |
457 // origin requests. | |
tyoshino (SeeGerritForStatus)
2015/07/22 11:25:45
|m_fallbackRequestForServiceWorker| being set is n
horo
2015/07/22 14:28:08
Done.
| |
458 // FIXME: We should use |m_sameOriginRequest| when we will support | |
459 // Suborigins for Service Worker. | |
460 ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_ fallbackRequestForServiceWorker->url())); | |
461 m_fallbackRequestForServiceWorker = nullptr; | |
456 | 462 |
457 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC ontrol) { | 463 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC ontrol) { |
458 String accessControlErrorDescription; | 464 String accessControlErrorDescription; |
459 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec urityOrigin(), accessControlErrorDescription)) { | 465 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec urityOrigin(), accessControlErrorDescription)) { |
460 reportResponseReceived(identifier, response); | 466 reportResponseReceived(identifier, response); |
461 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn ternal, 0, response.url().string(), accessControlErrorDescription)); | 467 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn ternal, 0, response.url().string(), accessControlErrorDescription)); |
462 return; | 468 return; |
463 } | 469 } |
464 } | 470 } |
465 | 471 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
664 return DoNotAllowStoredCredentials; | 670 return DoNotAllowStoredCredentials; |
665 return m_resourceLoaderOptions.allowCredentials; | 671 return m_resourceLoaderOptions.allowCredentials; |
666 } | 672 } |
667 | 673 |
668 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 674 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
669 { | 675 { |
670 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); | 676 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); |
671 } | 677 } |
672 | 678 |
673 } // namespace blink | 679 } // namespace blink |
OLD | NEW |