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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. Created 4 years, 6 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
Index: third_party/WebKit/Source/core/workers/WorkerThread.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerThread.h
index 3a1de279867b357456c7c840563a261077303a49..5b3ffdd14ee8163176adea2f730f53d76a49e97b 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.h
@@ -36,8 +36,8 @@
#include "platform/LifecycleNotifier.h"
#include "wtf/Forward.h"
#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
+#include <memory>
#include <v8.h>
namespace blink {
@@ -100,7 +100,7 @@ public:
virtual ~WorkerThread();
// Called on the main thread.
- void start(PassOwnPtr<WorkerThreadStartupData>);
+ void start(std::unique_ptr<WorkerThreadStartupData>);
void terminate();
// Called on the main thread. Internally calls terminateInternal() and wait
@@ -157,7 +157,7 @@ protected:
// Factory method for creating a new worker context for the thread.
// Called on the worker thread.
- virtual WorkerGlobalScope* createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) = 0;
+ virtual WorkerGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData>) = 0;
// Called on the worker thread.
virtual void postInitialize() { }
@@ -183,7 +183,7 @@ private:
void terminateInternal(TerminationMode);
void forciblyTerminateExecution();
- void initializeOnWorkerThread(PassOwnPtr<WorkerThreadStartupData>);
+ void initializeOnWorkerThread(std::unique_ptr<WorkerThreadStartupData>);
void prepareForShutdownOnWorkerThread();
void performShutdownOnWorkerThread();
void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool isInstrumented);
@@ -201,8 +201,8 @@ private:
long long m_forceTerminationDelayInMs;
- OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner;
- OwnPtr<WorkerMicrotaskRunner> m_microtaskRunner;
+ std::unique_ptr<InspectorTaskRunner> m_inspectorTaskRunner;
+ std::unique_ptr<WorkerMicrotaskRunner> m_microtaskRunner;
RefPtr<WorkerLoaderProxy> m_workerLoaderProxy;
WorkerReportingProxy& m_workerReportingProxy;
@@ -215,14 +215,14 @@ private:
Persistent<WorkerGlobalScope> m_workerGlobalScope;
// Signaled when the thread starts termination on the main thread.
- OwnPtr<WaitableEvent> m_terminationEvent;
+ std::unique_ptr<WaitableEvent> m_terminationEvent;
// Signaled when the thread completes termination on the worker thread.
- OwnPtr<WaitableEvent> m_shutdownEvent;
+ std::unique_ptr<WaitableEvent> m_shutdownEvent;
// Scheduled when termination starts with TerminationMode::Force, and
// cancelled when the worker thread is gracefully shut down.
- OwnPtr<ForceTerminationTask> m_scheduledForceTerminationTask;
+ std::unique_ptr<ForceTerminationTask> m_scheduledForceTerminationTask;
Persistent<WorkerThreadLifecycleContext> m_workerThreadLifecycleContext;
};

Powered by Google App Engine
This is Rietveld 408576698