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

Unified Diff: src/profiler/heap-profiler.h

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 5 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: src/profiler/heap-profiler.h
diff --git a/src/profiler/heap-profiler.h b/src/profiler/heap-profiler.h
index 93cb57a7d1599888583bbf121a20f0b89aa00c4e..3e1dcb54f9780805643105a8140ef6d912004efb 100644
--- a/src/profiler/heap-profiler.h
+++ b/src/profiler/heap-profiler.h
@@ -5,7 +5,8 @@
#ifndef V8_PROFILER_HEAP_PROFILER_H_
#define V8_PROFILER_HEAP_PROFILER_H_
-#include "src/base/smart-pointers.h"
+#include <memory>
+
#include "src/isolate.h"
#include "src/list.h"
@@ -33,7 +34,7 @@ class HeapProfiler {
bool StartSamplingHeapProfiler(uint64_t sample_interval, int stack_depth,
v8::HeapProfiler::SamplingFlags);
void StopSamplingHeapProfiler();
- bool is_sampling_allocations() { return !sampling_heap_profiler_.is_empty(); }
+ bool is_sampling_allocations() { return !!sampling_heap_profiler_; }
Igor Sheludko 2016/07/25 09:58:10 same here
AllocationProfile* GetAllocationProfile();
void StartHeapObjectsTracking(bool track_allocations);
@@ -66,9 +67,7 @@ class HeapProfiler {
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
bool is_tracking_object_moves() const { return is_tracking_object_moves_; }
- bool is_tracking_allocations() const {
- return !allocation_tracker_.is_empty();
- }
+ bool is_tracking_allocations() const { return !!allocation_tracker_; }
Igor Sheludko 2016/07/25 09:58:10 same here
Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id);
void ClearHeapObjectMap();
@@ -79,14 +78,16 @@ class HeapProfiler {
Heap* heap() const;
// Mapping from HeapObject addresses to objects' uids.
- base::SmartPointer<HeapObjectsMap> ids_;
+ std::unique_ptr<HeapObjectsMap> ids_;
List<HeapSnapshot*> snapshots_;
- base::SmartPointer<StringsStorage> names_;
+ std::unique_ptr<StringsStorage> names_;
List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
- base::SmartPointer<AllocationTracker> allocation_tracker_;
+ std::unique_ptr<AllocationTracker> allocation_tracker_;
bool is_tracking_object_moves_;
base::Mutex profiler_mutex_;
- base::SmartPointer<SamplingHeapProfiler> sampling_heap_profiler_;
+ std::unique_ptr<SamplingHeapProfiler> sampling_heap_profiler_;
+
+ DISALLOW_COPY_AND_ASSIGN(HeapProfiler);
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698