X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fworkers%2FWorkerThreadStartupData.h;h=5bfd4fe33d06651fd2a7303af3476b73fe06a87b;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=1e85c2cf55a91fbba0b5d7c0b64eb98c6aa25245;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h b/src/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h index 1e85c2c..5bfd4fe 100644 --- a/src/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h +++ b/src/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h @@ -43,13 +43,13 @@ namespace blink { class WorkerClients; -class WorkerThreadStartupData FINAL : public NoBaseWillBeGarbageCollectedFinalized { +class WorkerThreadStartupData final : public NoBaseWillBeGarbageCollectedFinalized { WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; public: - static PassOwnPtrWillBeRawPtr create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, PassOwnPtrWillBeRawPtr workerClients) + static PassOwnPtrWillBeRawPtr create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, const SecurityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr 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,27 @@ 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 ensure that these are transferred to the origin of a new worker + // global scope, supply the Document's SecurityOrigin as the + // 'starter origin'. + // + // Ownership of this optional starter origin remain with the caller, + // and is assumed to stay alive until the new Worker thread has been + // initialized. + // + // See SecurityOrigin::transferPrivilegesFrom() for details on what + // privileges are transferred. + const SecurityOrigin* m_starterOrigin; OwnPtrWillBeMember m_workerClients; void trace(Visitor*); private: - WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, PassOwnPtrWillBeRawPtr); + WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicyHeaderType contentSecurityPolicyType, const SecurityOrigin*, PassOwnPtrWillBeRawPtr); }; } // namespace blink