Chromium Code Reviews| Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp |
| diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp |
| index 45c73b5158bd389075756fa5c3c9743116f35990..0fc9335c6e917e47a3a9f9faa9ba49313219b5b1 100644 |
| --- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp |
| +++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp |
| @@ -5,7 +5,9 @@ |
| #include "modules/compositorworker/AnimationWorkletThread.h" |
| #include "core/workers/WorkerThreadStartupData.h" |
| +#include "modules/compositorworker/AnimationWorkletGlobalScope.h" |
| #include "platform/TraceEvent.h" |
| +#include "platform/weborigin/SecurityOrigin.h" |
| #include "wtf/PtrUtil.h" |
| namespace blink { |
| @@ -29,8 +31,12 @@ AnimationWorkletThread::~AnimationWorkletThread() |
| WorkerOrWorkletGlobalScope* AnimationWorkletThread::createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData> startupData) |
| { |
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("animation-worklet"), "AnimationWorkletThread::createWorkerGlobalScope"); |
| - // TODO(ikilpatrick): implement. |
| - return nullptr; |
| + |
| + RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(startupData->m_scriptURL); |
|
ikilpatrick
2016/08/17 01:37:14
@mike - for the MainThreadWorkletGlobalScope we ju
|
| + if (startupData->m_starterOriginPrivilegeData) |
| + securityOrigin->transferPrivilegesFrom(std::move(startupData->m_starterOriginPrivilegeData)); |
| + |
| + return AnimationWorkletGlobalScope::create(startupData->m_scriptURL, startupData->m_userAgent, securityOrigin.release(), this->isolate(), this); |
| } |
| } // namespace blink |