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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.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/platform/heap/PersistentNode.h
diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.h b/third_party/WebKit/Source/platform/heap/PersistentNode.h
index a6858409b70d38cba8cdd08c59b42752506a579b..c9bebe33802af8b51291dbd6ca50cd5731c660f5 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -9,7 +9,9 @@
#include "platform/heap/ThreadState.h"
#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
+#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
+#include <memory>
namespace blink {
@@ -172,7 +174,7 @@ private:
class CrossThreadPersistentRegion final {
USING_FAST_MALLOC(CrossThreadPersistentRegion);
public:
- CrossThreadPersistentRegion() : m_persistentRegion(adoptPtr(new PersistentRegion)) { }
+ CrossThreadPersistentRegion() : m_persistentRegion(wrapUnique(new PersistentRegion)) { }
void allocatePersistentNode(PersistentNode*& persistentNode, void* self, TraceCallback trace)
{
@@ -242,7 +244,7 @@ private:
// We don't make CrossThreadPersistentRegion inherit from PersistentRegion
// because we don't want to virtualize performance-sensitive methods
// such as PersistentRegion::allocate/freePersistentNode.
- OwnPtr<PersistentRegion> m_persistentRegion;
+ std::unique_ptr<PersistentRegion> m_persistentRegion;
// Recursive as prepareForThreadStateTermination() clears a PersistentNode's
// associated Persistent<> -- it in turn freeing the PersistentNode. And both
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698