Chromium Code Reviews| Index: src/profiler/cpu-profiler.h |
| diff --git a/src/profiler/cpu-profiler.h b/src/profiler/cpu-profiler.h |
| index aa9f0504771431b7440e9f3d0d5001e15cc42ad0..8ea2a003c8072703d71c6199c9994d533a2c8099 100644 |
| --- a/src/profiler/cpu-profiler.h |
| +++ b/src/profiler/cpu-profiler.h |
| @@ -5,6 +5,8 @@ |
| #ifndef V8_PROFILER_CPU_PROFILER_H_ |
| #define V8_PROFILER_CPU_PROFILER_H_ |
| +#include <memory> |
| + |
| #include "src/allocation.h" |
| #include "src/base/atomic-utils.h" |
| #include "src/base/atomicops.h" |
| @@ -193,8 +195,7 @@ class CpuProfiler : public CodeEventListener { |
| public: |
| explicit CpuProfiler(Isolate* isolate); |
| - CpuProfiler(Isolate* isolate, |
| - CpuProfilesCollection* test_collection, |
| + CpuProfiler(Isolate* isolate, CpuProfilesCollection* profiles, |
| ProfileGenerator* test_generator, |
| ProfilerEventsProcessor* test_processor); |
| @@ -241,8 +242,8 @@ class CpuProfiler : public CodeEventListener { |
| bool is_profiling() const { return is_profiling_; } |
| - ProfileGenerator* generator() const { return generator_; } |
| - ProfilerEventsProcessor* processor() const { return processor_; } |
| + ProfileGenerator* generator() const { return generator_.get(); } |
| + ProfilerEventsProcessor* processor() const { return processor_.get(); } |
| Isolate* isolate() const { return isolate_; } |
| private: |
| @@ -255,11 +256,11 @@ class CpuProfiler : public CodeEventListener { |
| void RecordDeoptInlinedFrames(CodeEntry* entry, AbstractCode* abstract_code); |
| Name* InferScriptName(Name* name, SharedFunctionInfo* info); |
| - Isolate* isolate_; |
| + Isolate* const isolate_; |
| base::TimeDelta sampling_interval_; |
| - CpuProfilesCollection* profiles_; |
| - ProfileGenerator* generator_; |
| - ProfilerEventsProcessor* processor_; |
| + std::unique_ptr<CpuProfilesCollection> profiles_; |
|
Yang
2016/06/14 13:04:16
We don't use unique_ptr in V8 until now. Is there
alph
2016/06/14 15:47:15
std::unique_ptr is allowed in Chromium C++ style g
|
| + std::unique_ptr<ProfileGenerator> generator_; |
| + std::unique_ptr<ProfilerEventsProcessor> processor_; |
| bool saved_is_logging_; |
| bool is_profiling_; |