inspector: mark profile type const

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
gengjiawen 2019-05-15 22:34:15 +08:00 committed by Anna Henningsen
parent 79a016a246
commit 4e32ce0703
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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;
@ -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 {
@ -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;
@ -106,7 +105,6 @@ class V8CpuProfilerConnection : public V8ProfilerConnection {
private:
std::unique_ptr<inspector::InspectorSession> session_;
bool ending_ = false;
std::string type_ = "CPU";
};
} // namespace profiler