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

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

Issue 2056253003: Remove Isolate::cpu_profiler() usage in api.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.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
« no previous file with comments | « src/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698