Chromium Code Reviews| Index: Source/web/WebSharedWorkerImpl.cpp |
| diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp |
| index affe4fa163d2c6f647c8867d567eaaf69f386f7f..086c5126b3058a455b1eaafd0b90f49a60eabaaa 100644 |
| --- a/Source/web/WebSharedWorkerImpl.cpp |
| +++ b/Source/web/WebSharedWorkerImpl.cpp |
| @@ -156,6 +156,7 @@ WebSharedWorkerImpl::WebSharedWorkerImpl(WebSharedWorkerClient* client) |
| , m_clientWeakPtr(WeakPtr<WebSharedWorkerClient>(m_client)) |
| , m_pauseWorkerContextOnStart(false) |
| , m_attachDevToolsOnStart(false) |
| + , m_settings(WebWorkerSettings::create()) |
|
kinuko
2014/03/10 05:55:52
not needed
|
| { |
| initializeWebKitStaticValues(); |
| } |
| @@ -313,12 +314,13 @@ void WebSharedWorkerImpl::connectTask(ExecutionContext* context, PassOwnPtr<WebM |
| workerGlobalScope->dispatchEvent(createConnectEvent(port)); |
| } |
| -void WebSharedWorkerImpl::startWorkerContext(const WebURL& url, const WebString& name, const WebString& contentSecurityPolicy, WebContentSecurityPolicyType policyType) |
| +void WebSharedWorkerImpl::startWorkerContext(const WebURL& url, const WebString& name, const WebString& contentSecurityPolicy, WebContentSecurityPolicyType policyType, const WebWorkerSettings& settings) |
| { |
| m_url = url; |
| m_name = name; |
| m_contentSecurityPolicy = contentSecurityPolicy; |
| m_policyType = policyType; |
| + m_settings = settings; |
| initializeLoader(url); |
| } |
| @@ -350,7 +352,8 @@ void WebSharedWorkerImpl::onScriptLoaderFinished() |
| provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::create()); |
| WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); |
| providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->createWorkerPermissionClientProxy(webSecurityOrigin))); |
| - OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurityPolicy::HeaderType>(m_policyType), workerClients.release()); |
| + OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurityPolicy::HeaderType>(m_policyType), workerClients.release(), PassOwnPtr<WorkerSettings>(m_settings)); |
|
kinuko
2014/03/10 13:50:41
I don't think we need this explicit cast (just pas
|
| + |
| setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData.release())); |
| InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScriptLoader->identifier(), m_mainScriptLoader->script()); |
| m_mainScriptLoader.clear(); |