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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 ASSERT(m_fallbackRequestForServiceWorker); | 412 ASSERT(m_fallbackRequestForServiceWorker); |
413 if (response.wasFallbackRequiredByServiceWorker()) { | 413 if (response.wasFallbackRequiredByServiceWorker()) { |
414 loadFallbackRequestForServiceWorker(); | 414 loadFallbackRequestForServiceWorker(); |
415 return; | 415 return; |
416 } | 416 } |
417 m_fallbackRequestForServiceWorker = nullptr; | 417 m_fallbackRequestForServiceWorker = nullptr; |
418 m_client->didReceiveResponse(identifier, response, handle); | 418 m_client->didReceiveResponse(identifier, response, handle); |
419 return; | 419 return; |
420 } | 420 } |
421 | 421 |
422 ASSERT(!m_fallbackRequestForServiceWorker); | 422 // Here, it's possible that |m_fallbackRequestForServiceWorker| is set. |
| 423 // This means the document was controlled by the ServiceWorker but the |
| 424 // browser process didn't forward the request to the ServiceWorker for |
| 425 // some reason. |
| 426 m_fallbackRequestForServiceWorker = nullptr; |
423 | 427 |
424 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC
ontrol) { | 428 if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessC
ontrol) { |
425 String accessControlErrorDescription; | 429 String accessControlErrorDescription; |
426 if (!passesAccessControlCheck(&m_document, response, effectiveAllowCrede
ntials(), securityOrigin(), accessControlErrorDescription)) { | 430 if (!passesAccessControlCheck(&m_document, response, effectiveAllowCrede
ntials(), securityOrigin(), accessControlErrorDescription)) { |
427 reportResponseReceived(identifier, response); | 431 reportResponseReceived(identifier, response); |
428 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); | 432 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); |
429 return; | 433 return; |
430 } | 434 } |
431 } | 435 } |
432 | 436 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 return DoNotAllowStoredCredentials; | 625 return DoNotAllowStoredCredentials; |
622 return m_resourceLoaderOptions.allowCredentials; | 626 return m_resourceLoaderOptions.allowCredentials; |
623 } | 627 } |
624 | 628 |
625 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 629 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
626 { | 630 { |
627 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); | 631 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); |
628 } | 632 } |
629 | 633 |
630 } // namespace blink | 634 } // namespace blink |
OLD | NEW |