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

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

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/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 e2a3118c75cfecf6b2c5e6a49773187bb58ded5f..b97a41a5d251331631771b147aef6da7b140043d 100644
--- a/third_party/WebKit/Source/core/style/DataPersistent.h
+++ b/third_party/WebKit/Source/core/style/DataPersistent.h
@@ -7,8 +7,7 @@
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "wtf/OwnPtr.h"
namespace blink {
@@ -37,7 +36,7 @@ public:
: m_ownCopy(false)
{
if (other.m_data)
- m_data = wrapUnique(new Persistent<T>(other.m_data->get()));
+ m_data = adoptPtr(new Persistent<T>(other.m_data->get()));
// Invalidated, subsequent mutations will happen on a new copy.
//
@@ -63,7 +62,7 @@ public:
void init()
{
ASSERT(!m_data);
- m_data = wrapUnique(new Persistent<T>(T::create()));
+ m_data = adoptPtr(new Persistent<T>(T::create()));
m_ownCopy = true;
}
@@ -84,7 +83,7 @@ public:
void operator=(std::nullptr_t) { m_data.clear(); }
private:
// Reduce size of DataPersistent<> by delaying creation of Persistent<>.
- std::unique_ptr<Persistent<T>> m_data;
+ OwnPtr<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