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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.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/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 c9bebe33802af8b51291dbd6ca50cd5731c660f5..a6858409b70d38cba8cdd08c59b42752506a579b 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -9,9 +9,7 @@
#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 {
@@ -174,7 +172,7 @@ private:
class CrossThreadPersistentRegion final {
USING_FAST_MALLOC(CrossThreadPersistentRegion);
public:
- CrossThreadPersistentRegion() : m_persistentRegion(wrapUnique(new PersistentRegion)) { }
+ CrossThreadPersistentRegion() : m_persistentRegion(adoptPtr(new PersistentRegion)) { }
void allocatePersistentNode(PersistentNode*& persistentNode, void* self, TraceCallback trace)
{
@@ -244,7 +242,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.
- std::unique_ptr<PersistentRegion> m_persistentRegion;
+ OwnPtr<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