Skip to content

Commit

Permalink
inspector: mark profile type const
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed May 16, 2019
1 parent f9c3aec commit 0d2abb4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/inspector_profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class V8CoverageConnection : public V8ProfilerConnection {
void Start() override;
void End() override;

const char* type() const override { return type_.c_str(); }
const char* type() const override { return "coverage"; }
bool ending() const override { return ending_; }

std::string GetDirectory() const override;
Expand All @@ -85,7 +85,6 @@ class V8CoverageConnection : public V8ProfilerConnection {
private:
std::unique_ptr<inspector::InspectorSession> session_;
bool ending_ = false;
std::string type_ = "coverage";
};

class V8CpuProfilerConnection : public V8ProfilerConnection {
Expand All @@ -96,7 +95,7 @@ class V8CpuProfilerConnection : public V8ProfilerConnection {
void Start() override;
void End() override;

const char* type() const override { return type_.c_str(); }
const char* type() const override { return "CPU"; }
bool ending() const override { return ending_; }

std::string GetDirectory() const override;
Expand All @@ -106,7 +105,6 @@ class V8CpuProfilerConnection : public V8ProfilerConnection {
private:
std::unique_ptr<inspector::InspectorSession> session_;
bool ending_ = false;
std::string type_ = "CPU";
};

} // namespace profiler
Expand Down

0 comments on commit 0d2abb4

Please sign in to comment.