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

Unified Diff: third_party/WebKit/Source/core/style/DataPersistent.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/core/style/DataPersistent.h
diff --git a/third_party/WebKit/Source/core/style/DataPersistent.h b/third_party/WebKit/Source/core/style/DataPersistent.h
index b97a41a5d251331631771b147aef6da7b140043d..e2a3118c75cfecf6b2c5e6a49773187bb58ded5f 100644
--- a/third_party/WebKit/Source/core/style/DataPersistent.h
+++ b/third_party/WebKit/Source/core/style/DataPersistent.h
@@ -7,7 +7,8 @@
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
-#include "wtf/OwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -36,7 +37,7 @@ public:
: m_ownCopy(false)
{
if (other.m_data)
- m_data = adoptPtr(new Persistent<T>(other.m_data->get()));
+ m_data = wrapUnique(new Persistent<T>(other.m_data->get()));
// Invalidated, subsequent mutations will happen on a new copy.
//
@@ -62,7 +63,7 @@ public:
void init()
{
ASSERT(!m_data);
- m_data = adoptPtr(new Persistent<T>(T::create()));
+ m_data = wrapUnique(new Persistent<T>(T::create()));
m_ownCopy = true;
}
@@ -83,7 +84,7 @@ public:
void operator=(std::nullptr_t) { m_data.clear(); }
private:
// Reduce size of DataPersistent<> by delaying creation of Persistent<>.
- OwnPtr<Persistent<T>> m_data;
+ std::unique_ptr<Persistent<T>> m_data;
unsigned m_ownCopy:1;
};
« no previous file with comments | « third_party/WebKit/Source/core/style/DataEquivalency.h ('k') | third_party/WebKit/Source/core/style/GridArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698