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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerBackingThread.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/WorkerBackingThread.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
index 3895867064b04b7f498ad5f0bde168e433827cbd..6fc16275ef713d78025736b7bbffa3d940a443a2 100644
--- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
@@ -7,9 +7,9 @@
#include "core/CoreExport.h"
#include "wtf/Forward.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
+#include <memory>
#include <v8.h>
namespace blink {
@@ -27,13 +27,13 @@ class WebThreadSupportingGC;
// WorkerGlobalScopes) can share one WorkerBackingThread.
class CORE_EXPORT WorkerBackingThread final {
public:
- static PassOwnPtr<WorkerBackingThread> create(const char* name) { return adoptPtr(new WorkerBackingThread(name, false)); }
- static PassOwnPtr<WorkerBackingThread> create(WebThread* thread) { return adoptPtr(new WorkerBackingThread(thread, false)); }
+ static std::unique_ptr<WorkerBackingThread> create(const char* name) { return wrapUnique(new WorkerBackingThread(name, false)); }
+ static std::unique_ptr<WorkerBackingThread> create(WebThread* thread) { return wrapUnique(new WorkerBackingThread(thread, false)); }
// These are needed to suppress leak reports. See
// https://crbug.com/590802 and https://crbug.com/v8/1428.
- static PassOwnPtr<WorkerBackingThread> createForTest(const char* name) { return adoptPtr(new WorkerBackingThread(name, true)); }
- static PassOwnPtr<WorkerBackingThread> createForTest(WebThread* thread) { return adoptPtr(new WorkerBackingThread(thread, true)); }
+ static std::unique_ptr<WorkerBackingThread> createForTest(const char* name) { return wrapUnique(new WorkerBackingThread(name, true)); }
+ static std::unique_ptr<WorkerBackingThread> createForTest(WebThread* thread) { return wrapUnique(new WorkerBackingThread(thread, true)); }
~WorkerBackingThread();
@@ -59,7 +59,7 @@ private:
WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown);
WorkerBackingThread(WebThread*, bool shouldCallGCOnSHutdown);
- OwnPtr<WebThreadSupportingGC> m_backingThread;
+ std::unique_ptr<WebThreadSupportingGC> m_backingThread;
v8::Isolate* m_isolate = nullptr;
bool m_isOwningThread;
bool m_shouldCallGCOnShutdown;

Powered by Google App Engine
This is Rietveld 408576698