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

Unified Diff: third_party/WebKit/Source/platform/WebThreadSupportingGC.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/platform/WebThreadSupportingGC.h
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.h b/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
index 184365c756c8b3e46369f68a6ad844136ecffbf0..faeacc2d245c7173ec041670bcdbb9fea0bb81d1 100644
--- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
+++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
@@ -11,7 +11,8 @@
#include "public/platform/WebThread.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
-#include <memory>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -28,8 +29,8 @@ class PLATFORM_EXPORT WebThreadSupportingGC final {
USING_FAST_MALLOC(WebThreadSupportingGC);
WTF_MAKE_NONCOPYABLE(WebThreadSupportingGC);
public:
- static std::unique_ptr<WebThreadSupportingGC> create(const char* name, bool perThreadHeapEnabled = false);
- static std::unique_ptr<WebThreadSupportingGC> createForThread(WebThread*, bool perThreadHeapEnabled = false);
+ static PassOwnPtr<WebThreadSupportingGC> create(const char* name, bool perThreadHeapEnabled = false);
+ static PassOwnPtr<WebThreadSupportingGC> createForThread(WebThread*, bool perThreadHeapEnabled = false);
~WebThreadSupportingGC();
void postTask(const WebTraceLocation& location, std::unique_ptr<SameThreadClosure> task)
@@ -79,13 +80,13 @@ public:
private:
WebThreadSupportingGC(const char* name, WebThread*, bool perThreadHeapEnabled);
- std::unique_ptr<GCTaskRunner> m_gcTaskRunner;
+ OwnPtr<GCTaskRunner> m_gcTaskRunner;
// m_thread is guaranteed to be non-null after this instance is constructed.
// m_owningThread is non-null unless this instance is constructed for an
// existing thread via createForThread().
WebThread* m_thread = nullptr;
- std::unique_ptr<WebThread> m_owningThread;
+ OwnPtr<WebThread> m_owningThread;
bool m_perThreadHeapEnabled;
};
« no previous file with comments | « third_party/WebKit/Source/platform/WebScheduler.cpp ('k') | third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698