Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1265)

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp

Issue 2401513003: Worker: Clean up InProcessWorkerBase (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index 93da34f8590634a641621b6cef755f58f4b9c912..63a575e51722765e7ef34032507dbb8fca4e423e 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -100,7 +100,9 @@ InProcessWorkerMessagingProxy::~InProcessWorkerMessagingProxy() {
void InProcessWorkerMessagingProxy::startWorkerGlobalScope(
const KURL& scriptURL,
const String& userAgent,
- const String& sourceCode) {
+ const String& sourceCode,
+ ContentSecurityPolicy* contentSecurityPolicy,
+ const String& referrerPolicy) {
DCHECK(isParentContextThread());
if (askedToTerminate()) {
// Worker.terminate() could be called from JS before the thread was
@@ -111,8 +113,8 @@ void InProcessWorkerMessagingProxy::startWorkerGlobalScope(
Document* document = toDocument(getExecutionContext());
SecurityOrigin* starterOrigin = document->getSecurityOrigin();
- ContentSecurityPolicy* csp = m_workerObject->contentSecurityPolicy()
- ? m_workerObject->contentSecurityPolicy()
+ ContentSecurityPolicy* csp = contentSecurityPolicy
+ ? contentSecurityPolicy
: document->contentSecurityPolicy();
DCHECK(csp);
@@ -123,7 +125,7 @@ void InProcessWorkerMessagingProxy::startWorkerGlobalScope(
std::unique_ptr<WorkerThreadStartupData> startupData =
WorkerThreadStartupData::create(
scriptURL, userAgent, sourceCode, nullptr, startMode,
- csp->headers().get(), m_workerObject->referrerPolicy(), starterOrigin,
+ csp->headers().get(), referrerPolicy, starterOrigin,
m_workerClients.release(), document->addressSpace(),
OriginTrialContext::getTokens(document).get(),
std::move(workerSettings));
« no previous file with comments | « third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698