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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 0309cae03ba81e89d7e24d7bd6f3f5ea25b38e99..556c9341cbd649cc638e217712a6b8ab8c68731d 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.h
@@ -37,8 +37,8 @@
#include "platform/WaitableEvent.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(std::unique_ptr<WorkerThreadStartupData>);
+ void start(PassOwnPtr<WorkerThreadStartupData>);
void terminate();
// Called on the main thread. Internally calls terminateInternal() and wait
@@ -159,7 +159,7 @@ protected:
// Factory method for creating a new worker context for the thread.
// Called on the worker thread.
- virtual WorkerGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData>) = 0;
+ virtual WorkerGlobalScope* createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) = 0;
// Returns true when this WorkerThread owns the associated
// WorkerBackingThread exclusively. If this function returns true, the
@@ -193,7 +193,7 @@ private:
void terminateInternal(TerminationMode);
void forciblyTerminateExecution();
- void initializeOnWorkerThread(std::unique_ptr<WorkerThreadStartupData>);
+ void initializeOnWorkerThread(PassOwnPtr<WorkerThreadStartupData>);
void prepareForShutdownOnWorkerThread();
void performShutdownOnWorkerThread();
void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool isInstrumented);
@@ -209,8 +209,8 @@ private:
long long m_forceTerminationDelayInMs;
- std::unique_ptr<InspectorTaskRunner> m_inspectorTaskRunner;
- std::unique_ptr<WorkerMicrotaskRunner> m_microtaskRunner;
+ OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner;
+ OwnPtr<WorkerMicrotaskRunner> m_microtaskRunner;
RefPtr<WorkerLoaderProxy> m_workerLoaderProxy;
WorkerReportingProxy& m_workerReportingProxy;
@@ -223,14 +223,14 @@ private:
Persistent<WorkerGlobalScope> m_workerGlobalScope;
// Signaled when the thread starts termination on the main thread.
- std::unique_ptr<WaitableEvent> m_terminationEvent;
+ OwnPtr<WaitableEvent> m_terminationEvent;
// Signaled when the thread completes termination on the worker thread.
- std::unique_ptr<WaitableEvent> m_shutdownEvent;
+ OwnPtr<WaitableEvent> m_shutdownEvent;
// Scheduled when termination starts with TerminationMode::Force, and
// cancelled when the worker thread is gracefully shut down.
- std::unique_ptr<ForceTerminationTask> m_scheduledForceTerminationTask;
+ OwnPtr<ForceTerminationTask> m_scheduledForceTerminationTask;
Persistent<WorkerThreadLifecycleContext> m_workerThreadLifecycleContext;
};
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp ('k') | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698