Chromium Code Reviews| Index: Source/core/workers/WorkerThreadStartupData.h |
| diff --git a/Source/core/workers/WorkerThreadStartupData.h b/Source/core/workers/WorkerThreadStartupData.h |
| index 1e85c2cf55a91fbba0b5d7c0b64eb98c6aa25245..ffc420c3cce5b1fe4dd272297b2939764430b6da 100644 |
| --- a/Source/core/workers/WorkerThreadStartupData.h |
| +++ b/Source/core/workers/WorkerThreadStartupData.h |
| @@ -47,9 +47,9 @@ class WorkerThreadStartupData FINAL : public NoBaseWillBeGarbageCollectedFinaliz |
| WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); |
| WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| public: |
| - static PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
| + static PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, const SecurityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
| { |
| - return adoptPtrWillBeNoop(new WorkerThreadStartupData(scriptURL, userAgent, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, workerClients)); |
| + return adoptPtrWillBeNoop(new WorkerThreadStartupData(scriptURL, userAgent, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, starterOrigin, workerClients)); |
| } |
| ~WorkerThreadStartupData(); |
| @@ -60,12 +60,23 @@ public: |
| WorkerThreadStartMode m_startMode; |
| String m_contentSecurityPolicy; |
| ContentSecurityPolicyHeaderType m_contentSecurityPolicyType; |
| + |
| + // The SecurityOrigin of the Document creating a Worker may have |
| + // been configured with extra policy privileges when it was created |
| + // (e.g., enforce path-based file:// origins.) |
| + // To have those be transferred to the origin of a new worker |
|
Mike West
2014/09/29 07:37:22
Nit: How about "To ensure that these are transferr
sof
2014/09/29 09:42:28
Oh yes, forgot to mention ownership assumptions.
|
| + // global scope, supply the Document's SecurityOrigin as the |
| + // 'starter origin'. |
| + // |
| + // See SecurityOrigin::transferPrivileges() for details |
| + // on the privileges that are inherited/transferred. |
| + const SecurityOrigin* m_starterOrigin; |
| OwnPtrWillBeMember<WorkerClients> m_workerClients; |
| void trace(Visitor*); |
| private: |
| - WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, PassOwnPtrWillBeRawPtr<WorkerClients>); |
| + WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, const SecurityOrigin* parentOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); |
|
Mike West
2014/09/29 07:37:22
s/parentOrigin/starterOrigin/. Or vice-versa, real
sof
2014/09/29 09:42:28
Oops, I decided not to go with 'parent origin' in
|
| }; |
| } // namespace blink |