Skip to content

Commit

Permalink
inspector: mark profile type const
Browse files Browse the repository at this point in the history
PR-URL: #27712
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
gengjiawen authored and targos committed May 20, 2019
1 parent 24b26c0 commit c746156
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 c746156

Please sign in to comment.