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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8PerContextData.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/bindings/core/v8/V8PerContextData.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
index d34f37863f2125746c52915f0ed8b6465008e308..4bf774cded9550a56b8509f51c91c8d6d8c21853 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
@@ -34,9 +34,8 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "core/inspector/InstanceCounters.h"
-#include "wtf/PtrUtil.h"
#include "wtf/StringExtras.h"
-#include <memory>
+
#include <stdlib.h>
namespace blink {
@@ -45,7 +44,7 @@ V8PerContextData::V8PerContextData(v8::Local<v8::Context> context)
: m_isolate(context->GetIsolate())
, m_wrapperBoilerplates(m_isolate)
, m_constructorMap(m_isolate)
- , m_contextHolder(wrapUnique(new gin::ContextHolder(m_isolate)))
+ , m_contextHolder(adoptPtr(new gin::ContextHolder(m_isolate)))
, m_context(m_isolate, context)
, m_activityLogger(0)
, m_compiledPrivateScript(m_isolate)
@@ -68,9 +67,9 @@ V8PerContextData::~V8PerContextData()
InstanceCounters::decrementCounter(InstanceCounters::V8PerContextDataCounter);
}
-std::unique_ptr<V8PerContextData> V8PerContextData::create(v8::Local<v8::Context> context)
+PassOwnPtr<V8PerContextData> V8PerContextData::create(v8::Local<v8::Context> context)
{
- return wrapUnique(new V8PerContextData(context));
+ return adoptPtr(new V8PerContextData(context));
}
V8PerContextData* V8PerContextData::from(v8::Local<v8::Context> context)
@@ -146,7 +145,7 @@ v8::Local<v8::Object> V8PerContextData::prototypeForType(const WrapperTypeInfo*
return prototypeValue.As<v8::Object>();
}
-void V8PerContextData::addCustomElementBinding(std::unique_ptr<V0CustomElementBinding> binding)
+void V8PerContextData::addCustomElementBinding(PassOwnPtr<V0CustomElementBinding> binding)
{
m_customElementBindings.append(std::move(binding));
}

Powered by Google App Engine
This is Rietveld 408576698