| Index: third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp
|
| index ad130a9e4b444cafd3e817d62f5d9eb2cb7784c9..7c23a8f1e590020f9ec1c13d5af5a78897aac76e 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp
|
| @@ -9,6 +9,8 @@
|
| #include "bindings/core/v8/V8Binding.h"
|
| #include "bindings/core/v8/V8HiddenValue.h"
|
| #include "core/dom/ExecutionContext.h"
|
| +#include "wtf/PtrUtil.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -81,7 +83,7 @@ void ScriptPromisePropertyBase::resolveOrReject(State targetState)
|
| v8::HandleScope handleScope(m_isolate);
|
| size_t i = 0;
|
| while (i < m_wrappers.size()) {
|
| - const OwnPtr<ScopedPersistent<v8::Object>>& persistent = m_wrappers[i];
|
| + const std::unique_ptr<ScopedPersistent<v8::Object>>& persistent = m_wrappers[i];
|
| if (persistent->isEmpty()) {
|
| // wrapper has died.
|
| // Since v8 GC can run during the iteration and clear the reference,
|
| @@ -129,7 +131,7 @@ v8::Local<v8::Object> ScriptPromisePropertyBase::ensureHolderWrapper(ScriptState
|
| v8::Local<v8::Context> context = scriptState->context();
|
| size_t i = 0;
|
| while (i < m_wrappers.size()) {
|
| - const OwnPtr<ScopedPersistent<v8::Object>>& persistent = m_wrappers[i];
|
| + const std::unique_ptr<ScopedPersistent<v8::Object>>& persistent = m_wrappers[i];
|
| if (persistent->isEmpty()) {
|
| // wrapper has died.
|
| // Since v8 GC can run during the iteration and clear the reference,
|
| @@ -144,7 +146,7 @@ v8::Local<v8::Object> ScriptPromisePropertyBase::ensureHolderWrapper(ScriptState
|
| ++i;
|
| }
|
| v8::Local<v8::Object> wrapper = holder(m_isolate, context->Global());
|
| - OwnPtr<ScopedPersistent<v8::Object>> weakPersistent = adoptPtr(new ScopedPersistent<v8::Object>);
|
| + std::unique_ptr<ScopedPersistent<v8::Object>> weakPersistent = wrapUnique(new ScopedPersistent<v8::Object>);
|
| weakPersistent->set(m_isolate, wrapper);
|
| weakPersistent->setWeak(weakPersistent.get(), &clearHandle);
|
| m_wrappers.append(std::move(weakPersistent));
|
|
|