Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgengjiawen <technicalcute@gmail.com>2019-05-15 17:34:15 +0300
committerAnna Henningsen <anna@addaleax.net>2019-05-20 00:39:08 +0300
commit4e32ce07038b1b56f6bef45b003e5b3a4e76e62e (patch)
treeb9fb3da4927f1b1fa3dbc3a71967c2b2cab0cbb3 /src/inspector_profiler.h
parent79a016a246e5bda9bcd5d03a70f408403b7a56df (diff)
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>
Diffstat (limited to 'src/inspector_profiler.h')
-rw-r--r--src/inspector_profiler.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/inspector_profiler.h b/src/inspector_profiler.h
index 219405b8c7f..345ef90d4e1 100644
--- a/src/inspector_profiler.h
+++ b/src/inspector_profiler.h
@@ -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