| Index: third_party/WebKit/Source/platform/heap/ThreadState.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| index 234e07f232e5aca9d4e53dc2ba31e9e7411909b2..16825dce3a9344508e8aaec61ad32f41fa2ed837 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| @@ -45,6 +45,7 @@
|
| #include "wtf/ThreadSpecific.h"
|
| #include "wtf/Threading.h"
|
| #include "wtf/ThreadingPrimitives.h"
|
| +#include <memory>
|
|
|
| namespace v8 {
|
| class Isolate;
|
| @@ -78,12 +79,12 @@ class Visitor;
|
| // Since a pre-finalizer adds pressure on GC performance, you should use it
|
| // only if necessary.
|
| //
|
| -// A pre-finalizer is similar to the HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>>
|
| +// A pre-finalizer is similar to the HeapHashMap<WeakMember<Foo>, std::unique_ptr<Disposer>>
|
| // idiom. The difference between this and the idiom is that pre-finalizer
|
| // function is called whenever an object is destructed with this feature. The
|
| -// HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>> idiom requires an assumption
|
| +// HeapHashMap<WeakMember<Foo>, std::unique_ptr<Disposer>> idiom requires an assumption
|
| // that the HeapHashMap outlives objects pointed by WeakMembers.
|
| -// FIXME: Replace all of the HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>>
|
| +// FIXME: Replace all of the HeapHashMap<WeakMember<Foo>, std::unique_ptr<Disposer>>
|
| // idiom usages with the pre-finalizer if the replacement won't cause
|
| // performance regressions.
|
| //
|
| @@ -334,7 +335,7 @@ public:
|
| void leaveSafePoint(SafePointAwareMutexLocker* = nullptr);
|
| bool isAtSafePoint() const { return m_atSafePoint; }
|
|
|
| - void addInterruptor(PassOwnPtr<BlinkGCInterruptor>);
|
| + void addInterruptor(std::unique_ptr<BlinkGCInterruptor>);
|
|
|
| void recordStackEnd(intptr_t* endOfStack)
|
| {
|
| @@ -600,7 +601,7 @@ private:
|
| void reportMemoryToV8();
|
|
|
| // Should only be called under protection of threadAttachMutex().
|
| - const Vector<OwnPtr<BlinkGCInterruptor>>& interruptors() const { return m_interruptors; }
|
| + const Vector<std::unique_ptr<BlinkGCInterruptor>>& interruptors() const { return m_interruptors; }
|
|
|
| friend class SafePointAwareMutexLocker;
|
| friend class SafePointBarrier;
|
| @@ -621,7 +622,7 @@ private:
|
|
|
| ThreadHeap* m_heap;
|
| ThreadIdentifier m_thread;
|
| - OwnPtr<PersistentRegion> m_persistentRegion;
|
| + std::unique_ptr<PersistentRegion> m_persistentRegion;
|
| BlinkGC::StackState m_stackState;
|
| #if OS(WIN) && COMPILER(MSVC)
|
| size_t m_threadStackSize;
|
| @@ -632,7 +633,7 @@ private:
|
| void* m_safePointScopeMarker;
|
| Vector<Address> m_safePointStackCopy;
|
| bool m_atSafePoint;
|
| - Vector<OwnPtr<BlinkGCInterruptor>> m_interruptors;
|
| + Vector<std::unique_ptr<BlinkGCInterruptor>> m_interruptors;
|
| bool m_sweepForbidden;
|
| size_t m_noAllocationCount;
|
| size_t m_gcForbiddenCount;
|
| @@ -682,7 +683,7 @@ private:
|
| // since there will be less than 2^8 types of objects in common cases.
|
| static const int likelyToBePromptlyFreedArraySize = (1 << 8);
|
| static const int likelyToBePromptlyFreedArrayMask = likelyToBePromptlyFreedArraySize - 1;
|
| - OwnPtr<int[]> m_likelyToBePromptlyFreed;
|
| + std::unique_ptr<int[]> m_likelyToBePromptlyFreed;
|
|
|
| // Stats for heap memory of this thread.
|
| size_t m_allocatedObjectSize;
|
|
|