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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return; | 62 return; |
63 | 63 |
64 ASSERT_WITH_SECURITY_IMPLICATION(executionContext->isWorkerGlobalScope()); | 64 ASSERT_WITH_SECURITY_IMPLICATION(executionContext->isWorkerGlobalScope()); |
65 | 65 |
66 ThreadableLoaderOptions options; | 66 ThreadableLoaderOptions options; |
67 options.allowCredentials = AllowStoredCredentials; | 67 options.allowCredentials = AllowStoredCredentials; |
68 options.crossOriginRequestPolicy = crossOriginRequestPolicy; | 68 options.crossOriginRequestPolicy = crossOriginRequestPolicy; |
69 // FIXME: Should we add EnforceScriptSrcDirective here? | 69 // FIXME: Should we add EnforceScriptSrcDirective here? |
70 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy
; | 70 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy
; |
71 | 71 |
72 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(execut
ionContext), *request, *this, options); | 72 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(*execu
tionContext), *request, *this, options); |
73 } | 73 } |
74 | 74 |
75 void WorkerScriptLoader::loadAsynchronously(ExecutionContext* executionContext,
const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScript
LoaderClient* client) | 75 void WorkerScriptLoader::loadAsynchronously(ExecutionContext* executionContext,
const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScript
LoaderClient* client) |
76 { | 76 { |
77 ASSERT(client); | 77 ASSERT(client); |
78 m_client = client; | 78 m_client = client; |
79 m_url = url; | 79 m_url = url; |
80 | 80 |
81 OwnPtr<ResourceRequest> request(createResourceRequest()); | 81 OwnPtr<ResourceRequest> request(createResourceRequest()); |
82 if (!request) | 82 if (!request) |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void WorkerScriptLoader::notifyFinished() | 182 void WorkerScriptLoader::notifyFinished() |
183 { | 183 { |
184 if (!m_client || m_finishing) | 184 if (!m_client || m_finishing) |
185 return; | 185 return; |
186 | 186 |
187 m_finishing = true; | 187 m_finishing = true; |
188 m_client->notifyFinished(); | 188 m_client->notifyFinished(); |
189 } | 189 } |
190 | 190 |
191 } // namespace WebCore | 191 } // namespace WebCore |
OLD | NEW |