| 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 { | 782 { |
| 783 ResourceRequest actualRequest = m_actualRequest; | 783 ResourceRequest actualRequest = m_actualRequest; |
| 784 ResourceLoaderOptions actualOptions = m_actualOptions; | 784 ResourceLoaderOptions actualOptions = m_actualOptions; |
| 785 m_actualRequest = ResourceRequest(); | 785 m_actualRequest = ResourceRequest(); |
| 786 m_actualOptions = ResourceLoaderOptions(); | 786 m_actualOptions = ResourceLoaderOptions(); |
| 787 | 787 |
| 788 actualRequest.setHTTPOrigin(getSecurityOrigin()); | 788 actualRequest.setHTTPOrigin(getSecurityOrigin()); |
| 789 | 789 |
| 790 clearResource(); | 790 clearResource(); |
| 791 | 791 |
| 792 // Explicitly set the SkipServiceWorker flag here. Even if the page was not |
| 793 // controlled by a SW when the preflight request was sent, a new SW may be |
| 794 // controlling the page now by calling clients.claim(). We should not send |
| 795 // the actual request to the SW. https://crbug.com/604583 |
| 796 actualRequest.setSkipServiceWorker(true); |
| 797 |
| 792 loadRequest(actualRequest, actualOptions); | 798 loadRequest(actualRequest, actualOptions); |
| 793 // |this| may be dead here in async mode. | 799 // |this| may be dead here in async mode. |
| 794 } | 800 } |
| 795 | 801 |
| 796 void DocumentThreadableLoader::handlePreflightFailure(const String& url, const S
tring& errorDescription) | 802 void DocumentThreadableLoader::handlePreflightFailure(const String& url, const S
tring& errorDescription) |
| 797 { | 803 { |
| 798 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription); | 804 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription); |
| 799 | 805 |
| 800 // Prevent handleSuccessfulFinish() from bypassing access check. | 806 // Prevent handleSuccessfulFinish() from bypassing access check. |
| 801 m_actualRequest = ResourceRequest(); | 807 m_actualRequest = ResourceRequest(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 954 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 949 } | 955 } |
| 950 | 956 |
| 951 Document& DocumentThreadableLoader::document() const | 957 Document& DocumentThreadableLoader::document() const |
| 952 { | 958 { |
| 953 ASSERT(m_document); | 959 ASSERT(m_document); |
| 954 return *m_document; | 960 return *m_document; |
| 955 } | 961 } |
| 956 | 962 |
| 957 } // namespace blink | 963 } // namespace blink |
| OLD | NEW |