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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/InProcessWorkerMessagingProxy.h
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
index 54543993fc3e56836ba571f2a9080eea4b732f78..27722da11cd5ffae4b767622163d0a58895348c0 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
@@ -34,10 +34,10 @@
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
+#include <memory>
namespace blink {
@@ -60,15 +60,15 @@ public:
// (Only use these methods in the parent context thread.)
void startWorkerGlobalScope(const KURL& scriptURL, const String& userAgent, const String& sourceCode) override;
void terminateWorkerGlobalScope() override;
- void postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) override;
+ void postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue>, std::unique_ptr<MessagePortChannelArray>) override;
bool hasPendingActivity() const final;
void workerObjectDestroyed() override;
// These methods come from worker context thread via
// InProcessWorkerObjectProxy and are called on the parent context thread.
- void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>);
- void reportException(const String& errorMessage, PassOwnPtr<SourceLocation>);
- void reportConsoleMessage(MessageSource, MessageLevel, const String& message, PassOwnPtr<SourceLocation>);
+ void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, std::unique_ptr<MessagePortChannelArray>);
+ void reportException(const String& errorMessage, std::unique_ptr<SourceLocation>);
+ void reportConsoleMessage(MessageSource, MessageLevel, const String& message, std::unique_ptr<SourceLocation>);
void postMessageToPageInspector(const String&);
void postWorkerConsoleAgentEnabled();
void confirmMessageFromWorkerObject(bool hasPendingActivity);
@@ -85,7 +85,7 @@ protected:
InProcessWorkerMessagingProxy(InProcessWorkerBase*, WorkerClients*);
~InProcessWorkerMessagingProxy() override;
- virtual PassOwnPtr<WorkerThread> createWorkerThread(double originTime) = 0;
+ virtual std::unique_ptr<WorkerThread> createWorkerThread(double originTime) = 0;
PassRefPtr<WorkerLoaderProxy> loaderProxy() { return m_loaderProxy; }
InProcessWorkerObjectProxy& workerObjectProxy() { return *m_workerObjectProxy.get(); }
@@ -104,10 +104,10 @@ private:
bool isParentContextThread() const;
Persistent<ExecutionContext> m_executionContext;
- OwnPtr<InProcessWorkerObjectProxy> m_workerObjectProxy;
+ std::unique_ptr<InProcessWorkerObjectProxy> m_workerObjectProxy;
WeakPersistent<InProcessWorkerBase> m_workerObject;
bool m_mayBeDestroyed;
- OwnPtr<WorkerThread> m_workerThread;
+ std::unique_ptr<WorkerThread> m_workerThread;
// Unconfirmed messages from the parent context thread to the worker thread.
unsigned m_unconfirmedMessageCount;

Powered by Google App Engine
This is Rietveld 408576698