| Index: third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.cpp
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.cpp b/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dfd9384fab8c17c1492e79e933c59a0a7b8a8486
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.cpp
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/serviceworkers/IsolatedWorkerThread.h"
|
| +
|
| +#include "core/workers/WorkerBackingThread.h"
|
| +#include "platform/TraceEvent.h"
|
| +#include "core/dom/ExceptionCode.h"
|
| +#include "core/workers/WorkerThreadStartupData.h"
|
| +#include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
|
| +#include "modules/serviceworkers/IsolatedWorkerReportingProxy.h"
|
| +#include "modules/EventTargetModulesNames.h"
|
| +
|
| +namespace blink {
|
| +
|
| +std::unique_ptr<IsolatedWorkerThread> IsolatedWorkerThread::create(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy)
|
| +{
|
| + return wrapUnique(new IsolatedWorkerThread(workerLoaderProxy, workerReportingProxy));
|
| +}
|
| +
|
| +IsolatedWorkerThread::IsolatedWorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy)
|
| + : WorkerThread(workerLoaderProxy, workerReportingProxy, false)
|
| + , m_workerBackingThread(WorkerBackingThread::create("IsolatedWorker Thread"))
|
| +{
|
| +}
|
| +
|
| +IsolatedWorkerThread::~IsolatedWorkerThread()
|
| +{
|
| +}
|
| +
|
| +void IsolatedWorkerThread::clearWorkerBackingThread()
|
| +{
|
| + m_workerBackingThread = nullptr;
|
| +}
|
| +
|
| +WorkerOrWorkletGlobalScope* IsolatedWorkerThread::createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData> startupData)
|
| +{
|
| + return ServiceWorkerGlobalScope::create(this, std::move(startupData));
|
| +}
|
| +
|
| +} // namespace blink
|
|
|