Skip to content

Commit c746156

Browse files
gengjiawentargos
authored andcommitted
inspector: mark profile type const
PR-URL: #27712 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 24b26c0 commit c746156

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/inspector_profiler.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class V8CoverageConnection : public V8ProfilerConnection {
7575
void Start() override;
7676
void End() override;
7777

78-
const char* type() const override { return type_.c_str(); }
78+
const char* type() const override { return "coverage"; }
7979
bool ending() const override { return ending_; }
8080

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

9190
class V8CpuProfilerConnection : public V8ProfilerConnection {
@@ -96,7 +95,7 @@ class V8CpuProfilerConnection : public V8ProfilerConnection {
9695
void Start() override;
9796
void End() override;
9897

99-
const char* type() const override { return type_.c_str(); }
98+
const char* type() const override { return "CPU"; }
10099
bool ending() const override { return ending_; }
101100

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

112110
} // namespace profiler

0 commit comments

Comments
 (0)