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

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.cpp

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/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 6156652cf87b70bd87ccab6fdab04eaecdfd74e6..527b04a16494c04b763afd0016f77c7b9c69dbbe 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -48,9 +48,7 @@
#include "wtf/CurrentTime.h"
#include "wtf/DataLog.h"
#include "wtf/LeakAnnotations.h"
-#include "wtf/PtrUtil.h"
#include "wtf/allocator/Partitions.h"
-#include <memory>
namespace blink {
@@ -219,15 +217,15 @@ void ThreadHeapStats::decreaseAllocatedSpace(size_t delta)
}
ThreadHeap::ThreadHeap()
- : m_regionTree(wrapUnique(new RegionTree()))
- , m_heapDoesNotContainCache(wrapUnique(new HeapDoesNotContainCache))
- , m_safePointBarrier(wrapUnique(new SafePointBarrier()))
- , m_freePagePool(wrapUnique(new FreePagePool))
- , m_orphanedPagePool(wrapUnique(new OrphanedPagePool))
- , m_markingStack(wrapUnique(new CallbackStack()))
- , m_postMarkingCallbackStack(wrapUnique(new CallbackStack()))
- , m_globalWeakCallbackStack(wrapUnique(new CallbackStack()))
- , m_ephemeronStack(wrapUnique(new CallbackStack(CallbackStack::kMinimalBlockSize)))
+ : m_regionTree(adoptPtr(new RegionTree()))
+ , m_heapDoesNotContainCache(adoptPtr(new HeapDoesNotContainCache))
+ , m_safePointBarrier(adoptPtr(new SafePointBarrier()))
+ , m_freePagePool(adoptPtr(new FreePagePool))
+ , m_orphanedPagePool(adoptPtr(new OrphanedPagePool))
+ , m_markingStack(adoptPtr(new CallbackStack()))
+ , m_postMarkingCallbackStack(adoptPtr(new CallbackStack()))
+ , m_globalWeakCallbackStack(adoptPtr(new CallbackStack()))
+ , m_ephemeronStack(adoptPtr(new CallbackStack(CallbackStack::kMinimalBlockSize)))
{
if (ThreadState::current()->isMainThread())
s_mainThreadHeap = this;
@@ -488,7 +486,7 @@ void ThreadHeap::collectGarbage(BlinkGC::StackState stackState, BlinkGC::GCType
RELEASE_ASSERT(!state->isGCForbidden());
state->completeSweep();
- std::unique_ptr<Visitor> visitor = Visitor::create(state, gcType);
+ OwnPtr<Visitor> visitor = Visitor::create(state, gcType);
SafePointScope safePointScope(stackState, state);
@@ -581,7 +579,7 @@ void ThreadHeap::collectGarbageForTerminatingThread(ThreadState* state)
// ahead while it is running, hence the termination GC does not enter a
// safepoint. VisitorScope will not enter also a safepoint scope for
// ThreadTerminationGC.
- std::unique_ptr<Visitor> visitor = Visitor::create(state, BlinkGC::ThreadTerminationGC);
+ OwnPtr<Visitor> visitor = Visitor::create(state, BlinkGC::ThreadTerminationGC);
ThreadState::NoAllocationScope noAllocationScope(state);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698