| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (!request) | 94 if (!request) |
| 95 return; | 95 return; |
| 96 | 96 |
| 97 ThreadableLoaderOptions options; | 97 ThreadableLoaderOptions options; |
| 98 options.crossOriginRequestPolicy = crossOriginRequestPolicy; | 98 options.crossOriginRequestPolicy = crossOriginRequestPolicy; |
| 99 | 99 |
| 100 ResourceLoaderOptions resourceLoaderOptions; | 100 ResourceLoaderOptions resourceLoaderOptions; |
| 101 resourceLoaderOptions.allowCredentials = AllowStoredCredentials; | 101 resourceLoaderOptions.allowCredentials = AllowStoredCredentials; |
| 102 | 102 |
| 103 m_needToCancel = true; | 103 m_needToCancel = true; |
| 104 m_threadableLoader = ThreadableLoader::create(executionContext, this, *reque
st, options, resourceLoaderOptions); | 104 m_threadableLoader = ThreadableLoader::create(executionContext, this, option
s, resourceLoaderOptions); |
| 105 m_threadableLoader->start(*request); |
| 105 if (m_failed) | 106 if (m_failed) |
| 106 notifyFinished(); | 107 notifyFinished(); |
| 107 // Do nothing here since notifyFinished() could delete |this|. | 108 // Do nothing here since notifyFinished() could delete |this|. |
| 108 } | 109 } |
| 109 | 110 |
| 110 const KURL& WorkerScriptLoader::responseURL() const | 111 const KURL& WorkerScriptLoader::responseURL() const |
| 111 { | 112 { |
| 112 ASSERT(!failed()); | 113 ASSERT(!failed()); |
| 113 return m_responseURL; | 114 return m_responseURL; |
| 114 } | 115 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // document (which is implemented in WorkerMessagingProxy, and | 226 // document (which is implemented in WorkerMessagingProxy, and |
| 226 // m_contentSecurityPolicy should be left as nullptr to inherit the policy). | 227 // m_contentSecurityPolicy should be left as nullptr to inherit the policy). |
| 227 if (!response.url().protocolIs("blob") && !response.url().protocolIs("file")
&& !response.url().protocolIs("filesystem")) { | 228 if (!response.url().protocolIs("blob") && !response.url().protocolIs("file")
&& !response.url().protocolIs("filesystem")) { |
| 228 m_contentSecurityPolicy = ContentSecurityPolicy::create(); | 229 m_contentSecurityPolicy = ContentSecurityPolicy::create(); |
| 229 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); | 230 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); |
| 230 m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponse
Headers(response)); | 231 m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponse
Headers(response)); |
| 231 } | 232 } |
| 232 } | 233 } |
| 233 | 234 |
| 234 } // namespace blink | 235 } // namespace blink |
| OLD | NEW |