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