| Index: Source/web/WebSharedWorkerImpl.cpp
|
| diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp
|
| index a3e270508c21cffab6c5c8387a1222b2423bb9dc..4382dca91a58da0730e10d3c5769f4bbd215eaf1 100644
|
| --- a/Source/web/WebSharedWorkerImpl.cpp
|
| +++ b/Source/web/WebSharedWorkerImpl.cpp
|
| @@ -104,6 +104,7 @@ public:
|
| {
|
| m_identifier = identifier;
|
| m_appCacheID = response.appCacheID();
|
| + processContentSecurityPolicy(response);
|
| (*m_receiveResponseCallback)();
|
| }
|
|
|
| @@ -124,8 +125,12 @@ public:
|
| long long appCacheID() const { return m_appCacheID; }
|
|
|
| private:
|
| - Loader() : m_scriptLoader(WorkerScriptLoader::create()), m_identifier(0), m_appCacheID(0)
|
| + Loader()
|
| + : m_scriptLoader(WorkerScriptLoader::create())
|
| + , m_identifier(0)
|
| + , m_appCacheID(0)
|
| {
|
| + setContentSecurityPolicy(ContentSecurityPolicy::create());
|
| }
|
|
|
| RefPtr<WorkerScriptLoader> m_scriptLoader;
|
| @@ -373,8 +378,6 @@ void WebSharedWorkerImpl::startWorkerContext(const WebURL& url, const WebString&
|
| {
|
| m_url = url;
|
| m_name = name;
|
| - m_contentSecurityPolicy = contentSecurityPolicy;
|
| - m_policyType = policyType;
|
| initializeLoader();
|
| }
|
|
|
| @@ -414,7 +417,7 @@ void WebSharedWorkerImpl::onScriptLoaderFinished()
|
| provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::create());
|
| WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
|
| provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(client()->createWorkerContentSettingsClientProxy(webSecurityOrigin)));
|
| - OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), nullptr, startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHeaderType>(m_policyType), starterOrigin, workerClients.release());
|
| + OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), nullptr, startMode, m_mainScriptLoader->contentSecurityPolicy()->deprecatedHeader(), static_cast<ContentSecurityPolicyHeaderType>(m_mainScriptLoader->contentSecurityPolicy()->deprecatedHeaderType()), starterOrigin, workerClients.release());
|
| m_loaderProxy = WorkerLoaderProxy::create(this);
|
| setWorkerThread(SharedWorkerThread::create(m_name, m_loaderProxy, *this, startupData.release()));
|
| InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScriptLoader->identifier(), m_mainScriptLoader->script());
|
|
|