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

Unified Diff: third_party/WebKit/Source/wtf/HashTable.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
« no previous file with comments | « third_party/WebKit/Source/wtf/HashSetTest.cpp ('k') | third_party/WebKit/Source/wtf/HashTraits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/HashTable.h
diff --git a/third_party/WebKit/Source/wtf/HashTable.h b/third_party/WebKit/Source/wtf/HashTable.h
index f6720ab942050244e8d29891633f2f95f10f4862..64c70184898b5576db459156257802f0b48bfd03 100644
--- a/third_party/WebKit/Source/wtf/HashTable.h
+++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -25,9 +25,7 @@
#include "wtf/Assertions.h"
#include "wtf/ConditionalDestructor.h"
#include "wtf/HashTraits.h"
-#include "wtf/PtrUtil.h"
#include "wtf/allocator/PartitionAllocator.h"
-#include <memory>
#define DUMP_HASHTABLE_STATS 0
#define DUMP_HASHTABLE_STATS_PER_TABLE 0
@@ -581,7 +579,7 @@ private:
#if DUMP_HASHTABLE_STATS_PER_TABLE
public:
- mutable std::unique_ptr<Stats> m_stats;
+ mutable OwnPtr<Stats> m_stats;
#endif
template <WeakHandlingFlag x, typename T, typename U, typename V, typename W, typename X, typename Y, typename Z> friend struct WeakProcessingHashTableHelper;
@@ -600,7 +598,7 @@ inline HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Alloca
, m_modifications(0)
#endif
#if DUMP_HASHTABLE_STATS_PER_TABLE
- , m_stats(wrapUnique(new Stats))
+ , m_stats(adoptPtr(new Stats))
#endif
{
static_assert(Allocator::isGarbageCollected || (!IsPointerToGarbageCollectedType<Key>::value && !IsPointerToGarbageCollectedType<Value>::value), "Cannot put raw pointers to garbage-collected classes into an off-heap collection.");
@@ -1237,7 +1235,7 @@ HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::H
, m_modifications(0)
#endif
#if DUMP_HASHTABLE_STATS_PER_TABLE
- , m_stats(wrapUnique(new Stats(*other.m_stats)))
+ , m_stats(adoptPtr(new Stats(*other.m_stats)))
#endif
{
// Copy the hash table the dumb way, by adding each element to the new
@@ -1260,7 +1258,7 @@ HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::H
, m_modifications(0)
#endif
#if DUMP_HASHTABLE_STATS_PER_TABLE
- , m_stats(wrapUnique(new Stats(*other.m_stats)))
+ , m_stats(adoptPtr(new Stats(*other.m_stats)))
#endif
{
swap(other);
« no previous file with comments | « third_party/WebKit/Source/wtf/HashSetTest.cpp ('k') | third_party/WebKit/Source/wtf/HashTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698