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

Unified Diff: third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp

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.cpp
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
index bb85da48a415342ec8811f2988c549eb38580682..6c7f2cdc59892948860ed27437d02258636d9f61 100644
--- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
+++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
@@ -6,20 +6,18 @@
#include "platform/heap/SafePoint.h"
#include "public/platform/WebScheduler.h"
-#include "wtf/PtrUtil.h"
#include "wtf/Threading.h"
-#include <memory>
namespace blink {
-std::unique_ptr<WebThreadSupportingGC> WebThreadSupportingGC::create(const char* name, bool perThreadHeapEnabled)
+PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::create(const char* name, bool perThreadHeapEnabled)
{
- return wrapUnique(new WebThreadSupportingGC(name, nullptr, perThreadHeapEnabled));
+ return adoptPtr(new WebThreadSupportingGC(name, nullptr, perThreadHeapEnabled));
}
-std::unique_ptr<WebThreadSupportingGC> WebThreadSupportingGC::createForThread(WebThread* thread, bool perThreadHeapEnabled)
+PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::createForThread(WebThread* thread, bool perThreadHeapEnabled)
{
- return wrapUnique(new WebThreadSupportingGC(nullptr, thread, perThreadHeapEnabled));
+ return adoptPtr(new WebThreadSupportingGC(nullptr, thread, perThreadHeapEnabled));
}
WebThreadSupportingGC::WebThreadSupportingGC(const char* name, WebThread* thread, bool perThreadHeapEnabled)
@@ -34,7 +32,7 @@ WebThreadSupportingGC::WebThreadSupportingGC(const char* name, WebThread* thread
#endif
if (!m_thread) {
// If |thread| is not given, create a new one and own it.
- m_owningThread = wrapUnique(Platform::current()->createThread(name));
+ m_owningThread = adoptPtr(Platform::current()->createThread(name));
m_thread = m_owningThread.get();
}
}
@@ -51,7 +49,7 @@ WebThreadSupportingGC::~WebThreadSupportingGC()
void WebThreadSupportingGC::initialize()
{
ThreadState::attachCurrentThread(m_perThreadHeapEnabled);
- m_gcTaskRunner = wrapUnique(new GCTaskRunner(m_thread));
+ m_gcTaskRunner = adoptPtr(new GCTaskRunner(m_thread));
}
void WebThreadSupportingGC::shutdown()

Powered by Google App Engine
This is Rietveld 408576698